void SetStats(int phase, int level, int maxPhase) { EnemyStatus enemyStatus = GetComponent <EnemyStatus>(); KnifeDummy knifeDummy = GetComponent <KnifeDummy>(); if (maxPhase > 0) { enemyStatus.SetMaxPhase(maxPhase); } else { if (level > 0 && level < 80) { enemyStatus.SetMaxPhase(1); maxPhase = 1; } else if (level == 0 || level < 90) { enemyStatus.SetMaxPhase(2); maxPhase = 2; } else { enemyStatus.SetMaxPhase(3); maxPhase = 3; } this.maxPhase = maxPhase; } GameObject player = GameObject.FindGameObjectWithTag("Player"); knifeDummy.SetPlayerTransform(player.transform); enemyStatus.maxHealth = GetPhaseMaxHP(phase, level, maxPhase); }
void SetStats(int level) { EnemyStatus enemyStatus = GetComponent <EnemyStatus>(); KnifeDummy knifeDummy = GetComponent <KnifeDummy>(); EventMessanger.GetInstance().TriggerEvent(new EnemyDisplayLevelEvent(level)); enemyStatus.maxHealth = 5 * (level + 1); knifeDummy.SetSecondForm(level >= 40); GameObject player = GameObject.FindGameObjectWithTag("Player"); knifeDummy.SetPlayerTransform(player.transform); }