OurSonic.Level.Objects.LevelObjectInfo.Reset C# (CSharp) Method

Reset() public method

public Reset ( ) : void
return void
        public void Reset()
        {
            X = O.X;
            Y = O.Y;
            Xsp = 0;
            Ysp = 0;
            State = null;
            Xflip = O.XFlip;
            Yflip = O.YFlip;
            Dead = false;
            PieceLayoutIndex = 0; //maybe
            Subdata = O.SubType;
            UpperNibble = Subdata >> 4;
            LowerNibble = Subdata & 0xf;
            if (ObjectData.PieceLayouts.Count > PieceLayoutIndex &&
                ObjectData.PieceLayouts[PieceLayoutIndex].Pieces.Count > 0)
                SetPieceLayoutIndex(PieceLayoutIndex);
        }

Usage Example

Beispiel #1
0
 public void Init(LevelObjectInfo @object, SonicLevel level, Sonic.Sonic sonic)
 {
     @object.Reset();
     evalMe("initScript").Me().apply(@object, new object[] {@object, level, sonic});
 }