Esempio n. 1
0
        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());
            }
        }
Esempio n. 2
0
        public void TunIntoABoss(BossScriptable bossScriptable)
        {
            _bossScriptable = bossScriptable;
            _bossAnimator.runtimeAnimatorController = _bossScriptable.BossAnimator;

            // => DamageTakerOptions
            _damageTakerComponent.TurnItIntoABoss(bossScriptable);

            // => DamageDealerOptions
            _damageDealerComponent.TurnItIntoABoss(bossScriptable);
        }
Esempio n. 3
0
        public void SpawnNewBoss(BossScriptable randomBoss)
        {
            GameObject bossGameObject = GameObject.Instantiate(randomBoss.BossPrefab, _bossSpawnPoint.position, Quaternion.identity);

            bossGameObject.GetComponentInChildren <BossStructure>().TunIntoABoss(randomBoss);
        }
Esempio n. 4
0
 public void TurnItIntoABoss(BossScriptable bossScriptable)
 {
     _damage    = bossScriptable.Damage;
     _cdwDamage = bossScriptable.CdwDamage;
 }
Esempio n. 5
0
 public void TurnItIntoABoss(BossScriptable bossScriptable)
 {
     _health     = bossScriptable.Health;
     _fullHealth = _health;
 }