OurSonic.Level.Objects.LevelObject.Tick C# (CSharp) Method

Tick() public method

public Tick ( LevelObjectInfo @object, SonicLevel level, Sonic sonic ) : bool
@object LevelObjectInfo
level SonicLevel
sonic OurSonic.Sonic.Sonic
return bool
        public bool Tick(LevelObjectInfo @object, SonicLevel level, Sonic.Sonic sonic)
        {
            if (@object.lastDrawTick != SonicManager.Instance.tickCount - 1)
                Init(@object, level, sonic);

            @object.lastDrawTick = SonicManager.Instance.tickCount;

            evalMe("tickScript").Me().apply(@object, new object[] {@object, level, sonic});

            if (@object.State.Truthy()) {
                @object.Xsp = @object.State.Xsp;
                @object.Ysp = @object.State.Ysp;
            }
            @object.X += @object.Xsp;
            @object.Y += @object.Ysp;
            return true;
        }