Esempio n. 1
0
    //  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();
    }
Esempio n. 2
0
 internal virtual void PlaceOnTile(Tile tile, Playerbase owner)
 {
     _owner = owner;
     Owner.OwnedBuildings.Add(this);
     _parentTile        = tile;
     transform.position = tile.transform.position + placementOffset;
 }
Esempio n. 3
0
 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;
 }
Esempio n. 4
0
 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]);
     }
 }
Esempio n. 5
0
 // Use this for initialization
 void Start()
 {
     cursor = GetComponent <UI_Cursor>();
     owner  = GameObject.Find(PLAYER).GetComponent <Playerbase>();
 }