Example #1
0
    void SpawnEnemy(string rootP, Vector3 spawnPos)
    {
        var ene = UnitT.CreateU(rootP, spawnPos, "Enemy." + rootP, null);

        _enemies.Add(ene);
        _enemiesTransform.Add(ene.transform);
    }
Example #2
0
    public void CreateFixed(string buildingPath, Vector3 pos)
    {
        var u = UnitT.CreateU("Prefab/Units/" + buildingPath, pos, buildingPath, transform);

        u.WasFixed = true;
        //add to cell
        Units.Add(u);
    }