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);
}
public void Init(LevelObjectInfo @object, SonicLevel level, Sonic.Sonic sonic) { @object.Reset(); evalMe("initScript").Me().apply(@object, new object[] {@object, level, sonic}); }