public void ResetFlags() { build_flag = Building.Building_Type.NOTHING; terra_flag = Terrain.TerrainType.NOTHING; magic_cast_flag = MagicController.SpellType.NOTHING; round_bonus_flag = RoundBonusManager.RoundBonusType.NOTHING; }
void ReplaceTerrainModel(Terrain.TerrainType t_type) //These extra two methods are required until all terrain models are completed { Destroy(transform.GetChild(0).gameObject); GameObject go = Instantiate(terrainModels[(int)t_type], transform); go.transform.SetAsFirstSibling(); }
public bool CheckCanTerraform(Terrain.TerrainType target, Terrain.TerrainType tile) { int distance = Terrain.GetDistance(target, tile); //If player has either enough shovels or has enough resources to buy shovels if (distance <= shovel_count || distance - shovel_count * faction.Get_Cost_Terraform(current_upgrade_terraform).Worker <= publicPlayerAttributes.PlayerWorkers) { return(true); } return(false); }
//Only resets locally, prevents turns being executed twice. public void ResetData() { CoordinateX = 0; CoordinateY = 0; Built = Building.Building_Type.NOTHING; Terraformed = Terrain.TerrainType.NOTHING; PickedRoundBonus = RoundBonusManager.RoundBonusType.NOTHING; ReturnedRoundBonus = RoundBonusManager.RoundBonusType.NOTHING; FoundedCityBonus = TownFoundingBonusManager.TownTiletype.NOTHING; CastedSpell = MagicController.SpellType.NOTHING; Change = ChangeFlag.NOTHING; }
public void Terraform(Terrain.TerrainType target, Terrain.TerrainType tile) { int distance = Terrain.GetDistance(target, tile); for (int i = 0; i < distance; i++) { if (shovel_count > 0) { shovel_count--; } else //If we still need to terraform, convert workers into shovels and then use them { AddSingleIncome(faction.Get_Cost_Terraform(current_upgrade_terraform).Reciprocal()); CheckPoints(PointBonus.Action_Type.Terraform); } } ui.UpdatePoints(publicPlayerAttributes.PlayerPoints); }
public void Terraform(Terrain.TerrainType t_type) { switch (t_type) //Switch until all models are created { case Terrain.TerrainType.Forest: ReplaceTerrainModel(t_type); break; case Terrain.TerrainType.Mountain: ReplaceTerrainModel(t_type); break; case Terrain.TerrainType.Wasteland: ReplaceTerrainModel(t_type); break; case Terrain.TerrainType.Desert: ReplaceTerrainModel(t_type); break; case Terrain.TerrainType.Plains: ReplaceTerrainModel(t_type); break; case Terrain.TerrainType.Swamp: ReplaceTerrainModel(t_type); break; case Terrain.TerrainType.Lakes: ReplaceTerrainModel(t_type); break; } terrain.Set(t_type); }
public static ITerrain GetTerrain(TerrainType type, Game game) { ITerrain terrain = null; switch (type) { case TerrainType.Quadtree: terrain = new Quadtree.Terrain(game); break; case TerrainType.GeoMipMap: terrain = new GeoMipMap.Terrain(game); break; case TerrainType.ROAM: terrain = new ROAM.Terrain(game); break; } return(terrain); }
public void SendTerraformData(int[] coordinate, Terrain.TerrainType newTerrain) { Cmd_ChangeTerraformFlagData(newTerrain); Cmd_ChangeCoordinateData(coordinate[0], coordinate[1]); Cmd_SetChangeFlag(ChangeFlag.Terraform); }
void Rpc_ChangeTerraformFlagData(Terrain.TerrainType newTerrain) { Terraformed = newTerrain; }
void Cmd_ChangeTerraformFlagData(Terrain.TerrainType newTerrain) { Rpc_ChangeTerraformFlagData(newTerrain); }
public bool CheckNeighbourSettleable(List <Coordinate> buildingLocs, Tile target, Terrain.TerrainType habitat, int shipping) { HashSet <Tile> neighbours = GetAllNeighbours(buildingLocs, shipping); foreach (Tile t in neighbours) { if (t.GetCoordinates().Equals(target.GetCoordinates()) && Terrain.TerrainEquals(t.GetTerrainType(), habitat)) { return(true); } } return(false); }
void Terraform(Terrain.TerrainType t_type, Tile t) { localPlayer.Terraform(t_type, t.GetTerrainType()); endTurnOrBuild = true; }
public void Set_Terraform_Flag(int flag_) { ResetFlags(); terra_flag = (Terrain.TerrainType)flag_; }
void Awake() { terrain_flag = Terrain.TerrainType.NOTHING; }
public void ResetFlag() { terrain_flag = Terrain.ParseInt(7); }
public void SetTerraformFlag(int terrain_type) { terrain_flag = Terrain.ParseInt(terrain_type); }
void ReplaceMaterialViaRenderer(Terrain.TerrainType t_type) { GetRenderer().material = terrains[(int)t_type]; terrain.Set(t_type); }
//Takes a coordinate, type of terrain and player information and simulates //the terraforming of the given tile. Ownership of this tile is not given at this point public void SimulateTerraform(int[] coordinate, Terrain.TerrainType terrain) { tileMap.GetTile(coordinate).Terraform(terrain); }