Example #1
0
 void PlacePowerSource()
 {
     //client sets powerSource reference separately
     powerSource                    = GameUnit.Instantiate <PowerSource>();
     powerSource.name               = "PowerSource Player" + player.playerNumber;
     powerSource.player             = player;
     powerSource.transform.position = transform.position;
     powerSource.transform.rotation = transform.rotation;
 }
Example #2
0
    void PlaceSpellSource()
    {
        spellSource                    = GameUnit.Instantiate <SpellSource>();
        spellSource.name               = "SpellSource Player" + player.playerNumber;
        spellSource.player             = player;
        spellSource.transform.position = transform.position;
        spellSource.transform.rotation = transform.rotation;

        spellSource.transform.Translate(new Vector3(0, 0, -powerSource.bounds.z));
    }
Example #3
0
    void PlaceUnitTowers()
    {
        towers = new List <Tower>();
        var i = 0;

        foreach (var placement in towerPlacements)
        {
            var tower = GameUnit.Instantiate <Tower>();
            tower.player             = player;
            tower.unitPrefabPath     = App.shared.PrefabPathForUnitType(unitTypes[i]);
            tower.transform.position = placement.transform.position;
            tower.transform.rotation = placement.transform.rotation;
            towers.Add(tower);
            i++;
        }
    }