コード例 #1
0
ファイル: TeamManager.cs プロジェクト: tristangarzon/Offrole
    private void SpawnUnit(GameObject prefab, int spawnLoc)
    {
        GameObject go = Instantiate(prefab, SpawnPoints[spawnLoc].transform.position, Quaternion.identity);

        go.transform.SetParent(Minions);

        Minion minion = go.GetComponent <Minion>();

        //Minion Pathing
        minion.Path   = InGameManager.MakePath(TeamID, spawnLoc);
        minion.Target = minion.Path[0].transform;
    }