public void Submit(bool isRunOut) { BattleData_Enemy enemy = BattleController.getEnemyData(); BattleData_Player player = BattleController.getPlayerData(); noteControl.SubmitResult(out int correctNote); if (curentPhase == Phase.player) { if (!isRunOut) { enemy.TakeDamage(player.CalculateDamage(correctNote)); } } else { if (!isRunOut) { player.TakeDamage(enemy.CalculateDamage(player.defense_fix, correctNote)); } else { player.TakeDamage(enemy.CalculateDamage(0, player.defense_fix)); } } StartCoroutine(GetNextPhase()); BattleController.isBattlePause = true; }
public void SetEnemy() { int ran = Random.Range(0, enemys.Count); BattleData_Enemy enemyData = new BattleData_Enemy(curentTier, enemys[ran]); BattleController.setEnemyData(enemyData); ui.NewTime((enemys[ran].noteAmount * 0.4f) + 3); ui.SetEnemyData(enemyData); }
public void SetEnemyData(BattleData_Enemy enemy) { this.enemy = enemy; setHealth_enemy = enemy.health_fix; healthValue_enemy = setHealth_enemy; //Set pict of enemy if (enemyPictPlace.transform.GetChild(0).GetComponent <UI_EnemyPictControl> () != null) { Destroy(enemyPictPlace.transform.GetChild(0).gameObject); } UI_EnemyPictControl pict = Instantiate(enemyPictTemplate, enemyPictPlace); pict.SetPict(enemy.enemyPict); pict.transform.SetAsFirstSibling(); UpdateStat_enemy(); }
public static void setEnemyData(BattleData_Enemy data) { _instance.enemy = data; _instance.noteControl.setNoteAmout(data.noteAmount); }