Exemple #1
0
 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);
        }
Exemple #3
0
 public Ledge(ILedgeState state, Vector2 position)
 {
     this.state    = state;
     this.position = position;
 }
Exemple #4
0
 public Ledge(ILedgeState state, Vector2 position)
 {
     this.state = state;
     this.position = position;
 }