public Ledge builder(LedgeType type, Vector2 location) { factory = new SpriteFactory(); if (type == LedgeType.ledgeLeftCurve) { state = new LedgeTileState(SpriteFactory.sprites.ledgeLeftCurve); } if (type == LedgeType.ledgeLeftEnd) { state = new LedgeTileState(SpriteFactory.sprites.ledgeLeftEnd); } if (type == LedgeType.ledgeMiddle) { state = new LedgeTileState(SpriteFactory.sprites.ledgeMiddle); } if (type == LedgeType.ledgeRightCurve) { state = new LedgeTileState(SpriteFactory.sprites.ledgeRightCurve); } if (type == LedgeType.ledgeRightEnd) { state = new LedgeTileState(SpriteFactory.sprites.ledgeRightEnd); } Ledge product = new Ledge(state, location); return product; }
public Ledge builder(LedgeType type, Vector2 location) { factory = new SpriteFactory(); if (type == LedgeType.ledgeLeftCurve) { state = new LedgeTileState(SpriteFactory.sprites.ledgeLeftCurve); } if (type == LedgeType.ledgeLeftEnd) { state = new LedgeTileState(SpriteFactory.sprites.ledgeLeftEnd); } if (type == LedgeType.ledgeMiddle) { state = new LedgeTileState(SpriteFactory.sprites.ledgeMiddle); } if (type == LedgeType.ledgeRightCurve) { state = new LedgeTileState(SpriteFactory.sprites.ledgeRightCurve); } if (type == LedgeType.ledgeRightEnd) { state = new LedgeTileState(SpriteFactory.sprites.ledgeRightEnd); } Ledge product = new Ledge(state, location); return(product); }
public Ledge(ILedgeState state, Vector2 position) { this.state = state; this.position = position; }
public Ledge(ILedgeState state, Vector2 position) { this.state = state; this.position = position; }