public override void Draw(RoomScene room, byte subType, int posX, int posY) { // Drawing For Editor if (room == null) { this.atlas.Draw(this.Texture[subType], posX, posY); return; } byte num = 1; switch (subType) { case (byte)ConveyorSubType.SlowRight: num = (byte)(4 - AnimGlobal.Get3PHSAnimId(Systems.timer)); break; case (byte)ConveyorSubType.SlowLeft: num = AnimGlobal.Get3PHSAnimId(Systems.timer); break; case (byte)ConveyorSubType.Right: num = (byte)(4 - AnimGlobal.Get3PQSAnimId(Systems.timer)); break; case (byte)ConveyorSubType.Left: num = AnimGlobal.Get3PQSAnimId(Systems.timer); break; } // Draw the Track using the Global Animation AnimId string tex = this.TrackStr + num.ToString(); this.atlas.Draw(tex, posX, posY); }
public override void Draw(RoomScene room, byte subType, int posX, int posY) { // Get the Chomping Texture with the Global Animation AnimId string tex = this.SpriteName + (AnimGlobal.Get4PSAnimId(Systems.timer) % 2 + 1).ToString(); if (subType == (byte)FacingSubType.FaceUp) { this.atlas.Draw(tex, posX, posY); } else if (subType == (byte)FacingSubType.FaceDown) { this.atlas.DrawFaceDown(tex, posX, posY); } else if (subType == (byte)FacingSubType.FaceLeft) { this.atlas.DrawFaceLeft(tex, posX, posY); } else if (subType == (byte)FacingSubType.FaceRight) { this.atlas.DrawFaceRight(tex, posX, posY); } }