コード例 #1
0
ファイル: SpawnerCollision.cs プロジェクト: Minty163/TestGame
    private GameObject Spawn(GameObject gameObject, Vector3 position)
    {
        return(WorkerFactory.GiveMeWorker(position + spawnDirection, Quaternion.identity, allegiance, collectionZone));

        //GameObject createdWorker = Instantiate(gameObject, position + spawnDirection, Quaternion.identity);
        //createdWorker.GetComponent<Renderer>().material = myMaterial;
        //Worker workerObject = createdWorker.GetComponent<Worker>();
        //workerObject.SetHomeZone(collectionZone);
        //workerObject.SetAllegiance(allegiance);
        //workerObject.SetGameResources(gameResources);
        //return createdWorker;
    }