// This class adds X amount of move speed to the agent internal override void PlaceOnTile(Tile _tile, Playerbase _owner) { base.PlaceOnTile(_tile, _owner); _buildingName = BuildingType.ROAD; _parentTile = _tile; OnPlacedOnTile(); }
internal virtual void PlaceOnTile(Tile tile, Playerbase owner) { _owner = owner; Owner.OwnedBuildings.Add(this); _parentTile = tile; transform.position = tile.transform.position + placementOffset; }
internal override void PlaceOnTile(Tile _tile, Playerbase _owner) { base.PlaceOnTile(_tile, _owner); _buildingName = BuildingType.ATTRACTOR; _parentTile = _tile; OnPlacedOnTile(); baseColor = GetComponentsInChildren <MeshRenderer>()[1].material.color; IsOn = true; }
void PlaceBases() { Playerbase[] playerbases; playerbases = new Playerbase[Services.GameManager.numPlayers]; for (int i = 0; i < Services.GameManager.numPlayers; i++) { playerbases[i] = Instantiate(Services.Prefabs.Playerbase, Services.Main.transform).GetComponent <Playerbase>(); playerbases [i].Init(Services.GameManager.players[i].playerNum); playerbases[i].PlaceOnTile(map[0 + (i * (mapWidth - 1)), 0 + (i * (mapLength - 1))]); Services.BuildingManager.AddBuilding(playerbases[i]); } }
// Use this for initialization void Start() { cursor = GetComponent <UI_Cursor>(); owner = GameObject.Find(PLAYER).GetComponent <Playerbase>(); }