void SpawnFloatBot() { int spawnPointIndex = Random.Range(0, spawnPoints.Length); FloatBotBehaviour spawnedScript = FloatBot.GetComponent <FloatBotBehaviour>(); spawnedScript.Target = objectivepoint; spawnedScript.enemySpawner = GetComponent <EnemySpawner>(); Instantiate(FloatBot, spawnPoints[spawnPointIndex].position, spawnPoints[spawnPointIndex].rotation); totalEnemies = totalEnemies - 1; foesSinceLastWave = foesSinceLastWave + 1; foesSinceLastUFO = foesSinceLastUFO + 1; }
void collectFloatBotHealthForDisplay(FloatBotBehaviour floatScript) { enemyHealthSlider.value = (floatScript.ownHealth * 100) / 30; enemyHealthDecreaseSlider.value = floatScript.healthInChange; }
void EnemyFloatBotHit(FloatBotBehaviour targetScript, Vector3 ExplosionLocation) { targetScript.TakeExplosiveDamage(damage, ExplosionLocation); }