Пример #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;
 }
Пример #2
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);
        }
Пример #3
0
        public DownWalkingState(Player currentPlayer)
        {
            ISpriteFactory factory = new SpriteFactory();

            Sprite = factory.builder(SpriteFactory.sprites.downWalkingPlayer);
            player = currentPlayer;
        }
Пример #4
0
        public RightIdleState(Player currentPlayer)
        {
            ISpriteFactory factory = new SpriteFactory();

            Sprite = factory.builder(SpriteFactory.sprites.rightIdlePlayer);
            player = currentPlayer;
        }
Пример #5
0
 public UniversalGUI(Game1 game)
 {
     this.game     = game;
     columnOne     = new List <KeyValuePair <ICommands, string> >();
     columnTwo     = new List <KeyValuePair <ICommands, string> >();
     defaultOne    = new List <KeyValuePair <ICommands, string> >();
     defaultTwo    = new List <KeyValuePair <ICommands, string> >();
     graphicHolder = new List <KeyValuePair <Texture2D, Rectangle> >();
     font          = Game1.gameContent.Load <SpriteFont>("Fonts/guiFont");
     factory       = new SpriteFactory();
     arrow         = factory.builder(SpriteFactory.sprites.arrow);
 }
Пример #6
0
 public UniversalGUI(Game1 game)
 {
     this.game = game;
     columnOne = new List<KeyValuePair<ICommands, string>>();
     columnTwo = new List<KeyValuePair<ICommands, string>>();
     defaultOne = new List<KeyValuePair<ICommands, string>>();
     defaultTwo = new List<KeyValuePair<ICommands, string>>();
     graphicHolder = new List<KeyValuePair<Texture2D, Rectangle>>();
     font = Game1.gameContent.Load<SpriteFont>("Fonts/guiFont");
     factory = new SpriteFactory();
     arrow = factory.builder(SpriteFactory.sprites.arrow);
 }
Пример #7
0
 public Grass builder(GrassType type, Vector2 location)
 {
     factory = new SpriteFactory();
     if (type == GrassType.shortGrass)
     {
         state = new GrassTileState(SpriteFactory.sprites.grass);
     }
     if (type == GrassType.tallGrass)
     {
         state = new GrassTileState(SpriteFactory.sprites.grass);
     }
     Grass product = new Grass(state, location);
     return product;
 }
Пример #8
0
 public Building builder(BuildingType type, Vector2 location)
 {
     factory = new SpriteFactory();
     if (type == BuildingType.pokeCenterLeft)
     {
         state = new BuildingTileState(SpriteFactory.sprites.pokeCenterLeft);
     }
     if (type == BuildingType.pokeCenterRight)
     {
         state = new BuildingTileState(SpriteFactory.sprites.pokeCenterRight);
     }
     Building product = new Building(state, location);
     return product;
 }
Пример #9
0
        public Grass builder(GrassType type, Vector2 location)
        {
            factory = new SpriteFactory();
            if (type == GrassType.shortGrass)
            {
                state = new GrassTileState(SpriteFactory.sprites.grass);
            }
            if (type == GrassType.tallGrass)
            {
                state = new GrassTileState(SpriteFactory.sprites.grass);
            }
            Grass product = new Grass(state, location);

            return(product);
        }
Пример #10
0
        public Building builder(BuildingType type, Vector2 location)
        {
            factory = new SpriteFactory();
            if (type == BuildingType.pokeCenterLeft)
            {
                state = new BuildingTileState(SpriteFactory.sprites.pokeCenterLeft);
            }
            if (type == BuildingType.pokeCenterRight)
            {
                state = new BuildingTileState(SpriteFactory.sprites.pokeCenterRight);
            }
            Building product = new Building(state, location);

            return(product);
        }
Пример #11
0
 public RightWalkingState(Player currentPlayer)
 {
     ISpriteFactory factory = new SpriteFactory();
     Sprite = factory.builder(SpriteFactory.sprites.rightWalkingPlayer);
     player = currentPlayer;
 }
Пример #12
0
 public LedgeTileState(SpriteFactory.sprites sprite)
 {
     factory = new SpriteFactory();
     this.sprite = factory.builder(sprite);
 }
Пример #13
0
        public Tile builder(TileType type, Vector2 location)
        {
            factory = new SpriteFactory();
            if (type == TileType.treeTile)
            {
                state = new GenericTileState(SpriteFactory.sprites.treeTile);
            }
            if (type == TileType.ledgeLeftCurve)
            {
                state = new GenericTileState(SpriteFactory.sprites.ledgeLeftCurve);
            }
            if (type == TileType.ledgeLeftEnd)
            {
                state = new GenericTileState(SpriteFactory.sprites.ledgeLeftEnd);
            }
            if (type == TileType.ledgeMiddle)
            {
                state = new GenericTileState(SpriteFactory.sprites.ledgeMiddle);
            }
            if (type == TileType.ledgeRightCurve)
            {
                state = new GenericTileState(SpriteFactory.sprites.ledgeRightCurve);
            }
            if (type == TileType.ledgeRightEnd)
            {
                state = new GenericTileState(SpriteFactory.sprites.ledgeRightEnd);
            }
            if (type == TileType.pokeEndCornerLeft)
            {
                state = new GenericTileState(SpriteFactory.sprites.pokeEndCornerLeft);
            }
            if (type == TileType.pokeEndCornerRight)
            {
                state = new GenericTileState(SpriteFactory.sprites.pokeEndCornerRight);
            }
            if (type == TileType.pokeEndCounterLeft)
            {
                state = new GenericTileState(SpriteFactory.sprites.pokeEndCounterLeft);
            }
            if (type == TileType.pokeEndCounterRight)
            {
                state = new GenericTileState(SpriteFactory.sprites.pokeEndCounterRight);
            }
            if (type == TileType.pokeHorizontal)
            {
                state = new GenericTileState(SpriteFactory.sprites.pokeHorizontal);
            }
            if (type == TileType.pokeMiddleSection)
            {
                state = new GenericTileState(SpriteFactory.sprites.pokeMiddleSection);
            }
            if (type == TileType.pokeVerticalLeft)
            {
                state = new GenericTileState(SpriteFactory.sprites.pokeVerticalLeft);
            }
            if (type == TileType.pokeVerticalRight)
            {
                state = new GenericTileState(SpriteFactory.sprites.pokeVerticalRight);
            }
            if (type == TileType.exit)
            {
                state = new GenericTileState(SpriteFactory.sprites.exit);
            }
            if (type == TileType.grass)
            {
                state = new GenericTileState(SpriteFactory.sprites.grassBack);
            }
            if (type == TileType.pokeFloorSpot)
            {
                state = new GenericTileState(SpriteFactory.sprites.pokeFloorSpot);
            }
            if (type == TileType.pokePlainFloor)
            {
                state = new GenericTileState(SpriteFactory.sprites.pokePlainFloor);
            }
            if (type == TileType.pokeBookShelf)
            {
                state = new GenericTileState(SpriteFactory.sprites.pokeBookShelf);
            }
            if (type == TileType.pokeChairs)
            {
                state = new GenericTileState(SpriteFactory.sprites.pokeChairs);
            }
            if (type == TileType.pokeComputer)
            {
                state = new GenericTileState(SpriteFactory.sprites.pokeComputer);
            }
            if (type == TileType.pokeFloorPrint)
            {
                state = new GenericTileState(SpriteFactory.sprites.pokeFloorPrint);
            }
            if (type == TileType.pokeStairsDown)
            {
                state = new GenericTileState(SpriteFactory.sprites.pokeStairsDown);
            }
            if (type == TileType.pokeTree)
            {
                state = new GenericTileState(SpriteFactory.sprites.pokeTree);
            }
            if (type == TileType.sign)
            {
                state = new GenericTileState(SpriteFactory.sprites.sign);
            }
            Tile product = new Tile(state, location);

            return(product);
        }
Пример #14
0
 public UpIdleState(Player currentPlayer)
 {
     ISpriteFactory factory = new SpriteFactory();
     Sprite = factory.builder(SpriteFactory.sprites.upIdlePlayer);
     player = currentPlayer;
 }
Пример #15
0
 public IAnimatedSprite builder(SpriteFactory.sprites sprite)
 {
     if (sprite == sprites.downIdlePlayer)
     {
         Texture2D downIdleTexture = Game1.gameContent.Load<Texture2D>("PlayerSprites/DownIdlePlayer");
         return new StaticSprite(downIdleTexture);
     }
     if (sprite == sprites.downWalkingPlayer)
     {
         Texture2D downWalkingTexture = Game1.gameContent.Load<Texture2D>("PlayerSprites/playerDownMoving");
         return new PlayerMovingSprite(downWalkingTexture, 1, 4);
     }
     if (sprite == sprites.leftIdlePlayer)
     {
         Texture2D leftIdleTexture = Game1.gameContent.Load<Texture2D>("PlayerSprites/LeftIdlePlayer");
         return new StaticSprite(leftIdleTexture);
     }
     if (sprite == sprites.leftWalkingPlayer)
     {
         Texture2D leftWalkingTexture = Game1.gameContent.Load<Texture2D>("PlayerSprites/playerLeftMoving");
         return new PlayerMovingSprite(leftWalkingTexture, 1, 4);
     }
     if (sprite == sprites.rightIdlePlayer)
     {
         Texture2D rightIdleTexture = Game1.gameContent.Load<Texture2D>("PlayerSprites/RightIdlePlayer");
         return new StaticSprite(rightIdleTexture);
     }
     if (sprite == sprites.rightWalkingPlayer)
     {
         Texture2D rightWalkingTexture = Game1.gameContent.Load<Texture2D>("PlayerSprites/playerRightMoving");
         return new PlayerMovingSprite(rightWalkingTexture, 1, 4);
     }
     if (sprite == sprites.upIdlePlayer)
     {
         Texture2D upIdleTexture = Game1.gameContent.Load<Texture2D>("PlayerSprites/UpIdlePlayer");
         return new StaticSprite(upIdleTexture);
     }
     if (sprite == sprites.upWalkingPlayer)
     {
         Texture2D upWalkingTexture = Game1.gameContent.Load<Texture2D>("PlayerSprites/playerUpMoving");
         return new PlayerMovingSprite(upWalkingTexture, 1, 4);
     }
     if (sprite == sprites.treeTile)
     {
         Texture2D treeTileTexture = Game1.gameContent.Load<Texture2D>("TileSprites/treeTileSprite");
         return new StaticSprite(treeTileTexture);
     }
     if (sprite == sprites.arrow)
     {
         Texture2D arrowTexture = Game1.gameContent.Load<Texture2D>("arrowCursor");
         return new StaticSprite(arrowTexture);
     }
     if (sprite == sprites.grass)
     {
         Texture2D grassTexture = Game1.gameContent.Load<Texture2D>("TileSprites/grassTexture");
         return new DynamicSprite(grassTexture, 1, 1);
     }
     if (sprite == sprites.ledgeLeftCurve)
     {
         Texture2D ledgeTexture = Game1.gameContent.Load<Texture2D>("TileSprites/Ledges/ledgeLeftCurve");
         return new StaticSprite(ledgeTexture);
     }
     if (sprite == sprites.ledgeLeftEnd)
     {
         Texture2D ledgeTexture = Game1.gameContent.Load<Texture2D>("TileSprites/Ledges/ledgeLeftEnd");
         return new StaticSprite(ledgeTexture);
     }
     if (sprite == sprites.ledgeMiddle)
     {
         Texture2D ledgeTexture = Game1.gameContent.Load<Texture2D>("TileSprites/Ledges/ledgeMiddle");
         return new StaticSprite(ledgeTexture);
     }
     if (sprite == sprites.ledgeRightCurve)
     {
         Texture2D ledgeTexture = Game1.gameContent.Load<Texture2D>("TileSprites/Ledges/ledgeRightCurve");
         return new StaticSprite(ledgeTexture);
     }
     if (sprite == sprites.ledgeRightEnd)
     {
         Texture2D ledgeTexture = Game1.gameContent.Load<Texture2D>("TileSprites/Ledges/ledgeRightEnd");
         return new StaticSprite(ledgeTexture);
     }
     if (sprite == sprites.pokeCenterLeft)
     {
         Texture2D pokeLTexture = Game1.gameContent.Load<Texture2D>("TileSprites/Buildings/pokeCenterLeft");
         return new StaticSprite(pokeLTexture);
     }
     if (sprite == sprites.pokeCenterRight)
     {
         Texture2D pokeRTexture = Game1.gameContent.Load<Texture2D>("TileSprites/Buildings/pokeCenterRight");
         return new StaticSprite(pokeRTexture);
     }
     if (sprite == sprites.pokeEndCornerLeft)
     {
         Texture2D pokeCounter = Game1.gameContent.Load<Texture2D>("TileSprites/PokeCenter/pokeEndCornerLeft");
         return new StaticSprite(pokeCounter);
     }
     if (sprite == sprites.pokeEndCornerRight)
     {
         Texture2D pokeCounter = Game1.gameContent.Load<Texture2D>("TileSprites/PokeCenter/pokeEndCornerRight");
         return new StaticSprite(pokeCounter);
     }
     if (sprite == sprites.pokeEndCounterLeft)
     {
         Texture2D pokeCounter = Game1.gameContent.Load<Texture2D>("TileSprites/PokeCenter/pokeEndCounterLeft");
         return new StaticSprite(pokeCounter);
     }
     if (sprite == sprites.pokeEndCounterRight)
     {
         Texture2D pokeCounter = Game1.gameContent.Load<Texture2D>("TileSprites/PokeCenter/pokeEndCounterRight");
         return new StaticSprite(pokeCounter);
     }
     if (sprite == sprites.pokeHorizontal)
     {
         Texture2D pokeCounter = Game1.gameContent.Load<Texture2D>("TileSprites/PokeCenter/pokeHorizontal");
         return new StaticSprite(pokeCounter);
     }
     if (sprite == sprites.pokeMiddleSection)
     {
         Texture2D pokeCounter = Game1.gameContent.Load<Texture2D>("TileSprites/PokeCenter/pokeMiddleSection");
         return new StaticSprite(pokeCounter);
     }
     if (sprite == sprites.pokeVerticalLeft)
     {
         Texture2D pokeCounter = Game1.gameContent.Load<Texture2D>("TileSprites/PokeCenter/pokeVerticalLeft");
         return new StaticSprite(pokeCounter);
     }
     if (sprite == sprites.pokeVerticalRight)
     {
         Texture2D pokeCounter = Game1.gameContent.Load<Texture2D>("TileSprites/PokeCenter/pokeVerticalRight");
         return new StaticSprite(pokeCounter);
     }
     if (sprite == sprites.exit)
     {
         Texture2D pokeCounter = Game1.gameContent.Load<Texture2D>("TileSprites/PokeCenter/exitTexture");
         return new StaticSprite(pokeCounter);
     }
     if (sprite == sprites.grassBack)
     {
         Texture2D back = Game1.gameContent.Load<Texture2D>("Backgrounds/grassSquare");
         return new StaticSprite(back);
     }
     if (sprite == sprites.pokeFloorSpot)
     {
         Texture2D back = Game1.gameContent.Load<Texture2D>("Backgrounds/pokeFloorSpot");
         return new StaticSprite(back);
     }
     if (sprite == sprites.pokePlainFloor)
     {
         Texture2D back = Game1.gameContent.Load<Texture2D>("Backgrounds/pokePlainFloor");
         return new StaticSprite(back);
     }
     if (sprite == sprites.pokeBookShelf)
     {
         Texture2D poke = Game1.gameContent.Load<Texture2D>("TileSprites/PokeCenter/pokeBookShelf");
         return new StaticSprite(poke);
     }
     if (sprite == sprites.pokeChairs)
     {
         Texture2D poke = Game1.gameContent.Load<Texture2D>("TileSprites/PokeCenter/pokeChairs");
         return new StaticSprite(poke);
     }
     if (sprite == sprites.pokeComputer)
     {
         Texture2D poke = Game1.gameContent.Load<Texture2D>("TileSprites/PokeCenter/pokeComputer");
         return new StaticSprite(poke);
     }
     if (sprite == sprites.pokeFloorPrint)
     {
         Texture2D poke = Game1.gameContent.Load<Texture2D>("TileSprites/PokeCenter/pokeFloorPrint");
         return new StaticSprite(poke);
     }
     if (sprite == sprites.pokeStairsDown)
     {
         Texture2D poke = Game1.gameContent.Load<Texture2D>("TileSprites/PokeCenter/pokeStairsDown");
         return new StaticSprite(poke);
     }
     if (sprite == sprites.pokeTree)
     {
         Texture2D poke = Game1.gameContent.Load<Texture2D>("TileSprites/PokeCenter/pokeTree");
         return new StaticSprite(poke);
     }
     if (sprite == sprites.sign)
     {
         Texture2D sign = Game1.gameContent.Load<Texture2D>("TileSprites/sign");
         return new StaticSprite(sign);
     }
     if (sprite == sprites.instructions)
     {
         Texture2D sign = Game1.gameContent.Load<Texture2D>("GUI Sprites/infoWindow");
         return new StaticSprite(sign);
     }
     return null;
 }
Пример #16
0
 public Tile builder(TileType type, Vector2 location)
 {
     factory = new SpriteFactory();
     if (type == TileType.treeTile)
     {
         state = new GenericTileState(SpriteFactory.sprites.treeTile);
     }
     if (type == TileType.ledgeLeftCurve)
     {
         state = new GenericTileState(SpriteFactory.sprites.ledgeLeftCurve);
     }
     if (type == TileType.ledgeLeftEnd)
     {
         state = new GenericTileState(SpriteFactory.sprites.ledgeLeftEnd);
     }
     if (type == TileType.ledgeMiddle)
     {
         state = new GenericTileState(SpriteFactory.sprites.ledgeMiddle);
     }
     if (type == TileType.ledgeRightCurve)
     {
         state = new GenericTileState(SpriteFactory.sprites.ledgeRightCurve);
     }
     if (type == TileType.ledgeRightEnd)
     {
         state = new GenericTileState(SpriteFactory.sprites.ledgeRightEnd);
     }
     if (type == TileType.pokeEndCornerLeft)
     {
         state = new GenericTileState(SpriteFactory.sprites.pokeEndCornerLeft);
     }
     if (type == TileType.pokeEndCornerRight)
     {
         state = new GenericTileState(SpriteFactory.sprites.pokeEndCornerRight);
     }
     if (type == TileType.pokeEndCounterLeft)
     {
         state = new GenericTileState(SpriteFactory.sprites.pokeEndCounterLeft);
     }
     if (type == TileType.pokeEndCounterRight)
     {
         state = new GenericTileState(SpriteFactory.sprites.pokeEndCounterRight);
     }
     if (type == TileType.pokeHorizontal)
     {
         state = new GenericTileState(SpriteFactory.sprites.pokeHorizontal);
     }
     if (type == TileType.pokeMiddleSection)
     {
         state = new GenericTileState(SpriteFactory.sprites.pokeMiddleSection);
     }
     if (type == TileType.pokeVerticalLeft)
     {
         state = new GenericTileState(SpriteFactory.sprites.pokeVerticalLeft);
     }
     if (type == TileType.pokeVerticalRight)
     {
         state = new GenericTileState(SpriteFactory.sprites.pokeVerticalRight);
     }
     if (type == TileType.exit)
     {
         state = new GenericTileState(SpriteFactory.sprites.exit);
     }
     if (type == TileType.grass)
     {
         state = new GenericTileState(SpriteFactory.sprites.grassBack);
     }
     if (type == TileType.pokeFloorSpot)
     {
         state = new GenericTileState(SpriteFactory.sprites.pokeFloorSpot);
     }
     if (type == TileType.pokePlainFloor)
     {
         state = new GenericTileState(SpriteFactory.sprites.pokePlainFloor);
     }
     if (type == TileType.pokeBookShelf)
     {
         state = new GenericTileState(SpriteFactory.sprites.pokeBookShelf);
     }
     if (type == TileType.pokeChairs)
     {
         state = new GenericTileState(SpriteFactory.sprites.pokeChairs);
     }
     if (type == TileType.pokeComputer)
     {
         state = new GenericTileState(SpriteFactory.sprites.pokeComputer);
     }
     if (type == TileType.pokeFloorPrint)
     {
         state = new GenericTileState(SpriteFactory.sprites.pokeFloorPrint);
     }
     if (type == TileType.pokeStairsDown)
     {
         state = new GenericTileState(SpriteFactory.sprites.pokeStairsDown);
     }
     if (type == TileType.pokeTree)
     {
         state = new GenericTileState(SpriteFactory.sprites.pokeTree);
     }
     if (type == TileType.sign)
     {
         state = new GenericTileState(SpriteFactory.sprites.sign);
     }
     Tile product = new Tile(state, location);
     return product;
 }