コード例 #1
0
 void SpawnAI()
 {
     if (dinosaursSpawned.Length > 0)
     {
         Dinosaur dinosaur = Instantiate(dinosaursSpawned[Random.Range(0, dinosaursSpawned.Length)], transform.position, Quaternion.identity);
         dinosaur.Initialise(targetsInMap, pteroGroundTargets, pteroAirTargets, weaponsSpawnedOnDinoDeath);
     }
 }
コード例 #2
0
ファイル: Egg.cs プロジェクト: CedarBishop/Stellarsaurus
    void HatchUnit()
    {
        if (hasHatched)
        {
            return;
        }

        hasHatched = true;
        Dinosaur dinosaur = Instantiate(dinosaurToSpawn, transform.position, Quaternion.identity);

        dinosaur.Initialise(jumpRaptorTargets, pteroGroundTargets, pteroAirTargets);
        Destroy(gameObject);
    }