public override void Draw(RoomGraphics g) { //base.Draw(g); for (int y = 0; y < Height; y++) { for (int x = 0; x < Width; x++) { g.DrawSprite(GameData.SPR_TILE_MOVING_PLATFORM, Zone.ImageVariantID, Position + new Point2I(x, y) * GameSettings.TILE_SIZE, DepthLayer.TileLayer1); } } }
public override void Draw(RoomGraphics g) { base.Draw(g); // Draw 3 links between hook and player (alternating which one is visible). Vector2F hookStartPos = HookStartPosition; int linkIndex = (GameControl.RoomTicks % 3) + 1; float percent = (linkIndex / 4.0f); Vector2F linkPos = Vector2F.Lerp(hookStartPos, position, percent); g.DrawSprite(GameData.SPR_SWITCH_HOOK_LINK, linkPos - new Vector2F(0, zPosition), Graphics.DepthLayer); // Draw collectible over hook. if (collectible != null) { Vector2F pos = Center + Directions.ToVector(direction) * 4; collectible.SetPositionByCenter(pos); collectible.ZPosition = zPosition; collectible.Graphics.Draw(g, Graphics.CurrentDepthLayer); } }
public override void Draw(RoomGraphics g) { // Draw the extension bar. if (extendLength > 0.0f) { Sprite spr; if (Directions.IsHorizontal(direction)) { spr = GameData.SPR_TILE_PULL_HANDLE_BAR_HORIZONTAL; } else { spr = GameData.SPR_TILE_PULL_HANDLE_BAR_VERTICAL; } for (float length = 0.0f; length < extendLength; length += GameSettings.TILE_SIZE) { Vector2F drawPos = Position - Offset + (Directions.ToVector(direction) * (length + 8.0f)); g.DrawSprite(spr, drawPos, DepthLayer.TileLayer1); } } base.Draw(g); }
public override void Draw(RoomGraphics g) { base.Draw(g); g.DrawSprite(GameData.SPR_TILE_STATUE_EYE, Position + eyeOffset, DepthLayer.TileLayer1); }
public override void Draw(RoomGraphics g) { base.Draw(g); // Draw 3 links between hook and player (alternating which one is visible). Vector2F hookStartPos = HookStartPosition; int linkIndex = (GameControl.RoomTicks % 3) + 1; float percent = (linkIndex / 4.0f); Vector2F linkPos = Vector2F.Lerp(hookStartPos, position, percent); g.DrawSprite(GameData.SPR_SWITCH_HOOK_LINK, linkPos - new Vector2F(0, zPosition), Graphics.DepthLayer); // Draw collectible over hook. if (collectible != null) { Vector2F pos = Center + Directions.ToVector(direction) * 4; collectible.SetPositionByCenter(pos); collectible.ZPosition = zPosition; collectible.Graphics.Draw(g, Graphics.CurrentDepthLayer); } }