示例#1
0
 void spawnExpandWeapon()
 {
     if (weaponsActiveCount < maxAllowedWeapons)
     {
         weaponsActiveCount++;
         Vector3 pos = SpawnHelpers.GetRandomLocation(walls, player);
         Instantiate(expandWeapon, pos, Quaternion.Euler(Vector3.zero));
     }
 }
示例#2
0
 void spawnShield()
 {
     if (weaponsActiveCount < maxAllowedWeapons)
     {
         weaponsActiveCount++;
         Vector3 pos = SpawnHelpers.GetRandomLocation(walls, player);
         Instantiate(shieldWeapon, pos, Quaternion.Euler(new Vector3(90, 0, 0)));
     }
 }
示例#3
0
    void spawnEnemy()
    {
        Vector3    pos          = SpawnHelpers.GetRandomLocation(walls, player);
        GameObject spawnedEnemy = Instantiate(enemy, pos, Quaternion.Euler(Vector3.zero));

        if (DifficultyManager.difficulty == (int)Difficulty.EASY)
        {
            spawnedEnemy.GetComponent <EnemyMovement>().setSpeed(4f);
        }
        if (DifficultyManager.difficulty == (int)Difficulty.MEDIUM)
        {
            spawnedEnemy.GetComponent <EnemyMovement>().setSpeed(6f);
        }
    }