void Start() { tooltip = GameObject.Find("UI").transform.Find("Tooltip").GetComponent <Tooltip>(); survivorManager = GameObject.Find("GameManager").GetComponent <SurvivorManager> (); specialisationDatabase = GameObject.Find("SpecialisationDatabase").GetComponent <SpecialisationDatabase> (); specialisation = specialisationDatabase.specialisations [specialisationId]; }
void Start() { livingEntity = GetComponent <LivingEntity> (); gunController = GetComponent <GunController> (); unit = GetComponent <Unit> (); database = GameObject.Find("SpecialisationDatabase").GetComponent <SpecialisationDatabase> (); survivor = GetComponent <Survivor> (); waveManager = GameObject.Find("GameManager").GetComponent <WaveManager> (); waveManager.waveEndEvent += OnWaveEnd; }
void Start() { specialisationDatabase = GameObject.Find("SpecialisationDatabase").GetComponent <SpecialisationDatabase> (); achievement = GameObject.Find("GameManager").GetComponent <AchievementManager> (); gameOverManager = GetComponent <GameOverManager> (); gameModeManager = GetComponent <GameModeManager> (); waveManager = GetComponent <WaveManager> (); waveManager.waveStartEvent += OnWaveStart; waveManager.viewReportEvent += OnWaveEnd; GenerateList(); ChangeSurvivorCount(); }
void Start() { GameObject.Find("GameManager").GetComponent <ScoreManager> ().totalSurvivors++; livingEntity = GetComponent <LivingEntity> (); itemDatabase = GameObject.Find("Databases").transform.Find("ItemDatabase").GetComponent <ItemDatabase> (); database = GameObject.Find("SpecialisationDatabase").GetComponent <SpecialisationDatabase> (); survivorManager = GameObject.Find("GameManager").GetComponent <SurvivorManager> (); reportManager = GameObject.Find("GameManager").GetComponent <ReportManager> (); waveManager = GameObject.Find("GameManager").GetComponent <WaveManager> (); scoutManager = GameObject.Find("GameManager").GetComponent <ScoutManager> (); scoreManager = GameObject.Find("GameManager").GetComponent <ScoreManager> (); livingEntity.deathEvent += OnDeath; waveManager.waveStartEvent += OnWaveStart; waveManager.waveEndEvent += OnWaveEnd; }
void Start() { player = GameObject.Find("Player").gameObject; waveManager = GetComponent <WaveManager> (); chanceNewSurvivor = GetComponent <ChanceNewSurvivor> (); survivorManager = GetComponent <SurvivorManager> (); inventory = GetComponent <Inventory> (); specialisationDatabase = GameObject.Find("SpecialisationDatabase").GetComponent <SpecialisationDatabase> (); itemDatabase = GameObject.Find("Databases").transform.Find("ItemDatabase").GetComponent <ItemDatabase> (); playerEntity = player.GetComponent <LivingEntity> (); gameMode = PlayerPrefs.GetString("gameMode"); if (gameMode == "colony") { chanceNewSurvivor.acceptingNewSurvivor = false; specialisationDatabase.specialisations [0].pickupNearbyItems = false; for (int i = 0; i < 15; i++) { Vector3 randomPos = new Vector3(Random.Range(colonySpawn.position.x - 10f, colonySpawn.position.x + 10f), colonySpawn.position.y, Random.Range(colonySpawn.position.z - 10f, colonySpawn.position.z + 10f)); survivorManager.SpawnSurvivor(randomPos); } } else if (gameMode == "devil") { waveManager.SetWave(666); for (int i = 0; i < startingSurvivors; i++) { Vector3 randomPos = new Vector3(Random.Range(colonySpawn.position.x - 10f, colonySpawn.position.x + 10f), colonySpawn.position.y, Random.Range(colonySpawn.position.z - 10f, colonySpawn.position.z + 10f)); survivorManager.SpawnSurvivor(randomPos); } inventory.startingItemIds = startingItems; } else if (gameMode == "staying-alive") { player.GetComponent <LivingEntity> ().startingHealth = 100; chanceNewSurvivor.acceptingNewSurvivor = false; StartCoroutine(ReduceHealth()); } }