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; }
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); }
public Building(IBuildingState state, Vector2 position) { this.state = state; this.position = position; }