示例#1
0
文件: EnemyManager.cs 项目: Cdrix/SM
    void SpawnEnemy(string rootP, Vector3 spawnPos)
    {
        var ene = UnitT.CreateU(rootP, spawnPos, "Enemy." + rootP, null);

        _enemies.Add(ene);
        _enemiesTransform.Add(ene.transform);
    }
示例#2
0
文件: UnitsManager.cs 项目: Cdrix/SM
    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);
    }