private void SpawNewObjects(MapComponent mapComponent) { TileMapRandomGeneratorComponent randomGeneratorComponent = mapComponent.GetComponentInChildren <TileMapRandomGeneratorComponent>(); // => PlantSpot (GameObject, int?)randomPlantSpot = _plantSpotList.GetRandomGameObject(mapComponent.Tier); if (randomPlantSpot.Item1 != null) { randomGeneratorComponent.SpawnNewObjects(randomPlantSpot.Item1, randomPlantSpot.Item2.GetValueOrDefault()); } // => Boss BossScriptable randomBoss = _bossList.GetRandomBoss(mapComponent.Tier); if (randomBoss != null) { randomGeneratorComponent.SpawnNewBoss(randomBoss); } // => Mob (MobScriptable, int?)randomMobs = _mobList.GetRandomMob(mapComponent.Tier); if (randomMobs.Item1 != null) { randomGeneratorComponent.SpawnNewMobs(randomMobs.Item1, randomMobs.Item2.GetValueOrDefault()); } }
public void TunIntoABoss(BossScriptable bossScriptable) { _bossScriptable = bossScriptable; _bossAnimator.runtimeAnimatorController = _bossScriptable.BossAnimator; // => DamageTakerOptions _damageTakerComponent.TurnItIntoABoss(bossScriptable); // => DamageDealerOptions _damageDealerComponent.TurnItIntoABoss(bossScriptable); }
public void SpawnNewBoss(BossScriptable randomBoss) { GameObject bossGameObject = GameObject.Instantiate(randomBoss.BossPrefab, _bossSpawnPoint.position, Quaternion.identity); bossGameObject.GetComponentInChildren <BossStructure>().TunIntoABoss(randomBoss); }
public void TurnItIntoABoss(BossScriptable bossScriptable) { _damage = bossScriptable.Damage; _cdwDamage = bossScriptable.CdwDamage; }
public void TurnItIntoABoss(BossScriptable bossScriptable) { _health = bossScriptable.Health; _fullHealth = _health; }