// Update is called once per frame void Update() { ShowBothStats(); CheckEnemyNumber(); CheckBattleScenePhases(); enemyClone = Enemy[SelectedEnemyID].GetComponent <WeakEnemySampleScript>(); Debug.Log(battlePhase); if (startBattleScene) { battlePhase = BattleScenePhases._LocatorMove.ToString(); } if (playerClone.addDamage == true) { DamageEnemy(playerClone.GetAttack()); } if (enemyClone.addDamage == true) { DamagePlayer(enemyClone.GetAttack()); } if (Input.GetKeyDown(KeyCode.KeypadEnter)) { Application.LoadLevel(0); } }
//shows the stats of player and enemy void ShowBothStats() { p_Class.text = "Class: " + playerClone.GetClass(); p_Level.text = "Level: " + playerClone.GetLevel(); p_Exp.text = "Exp: " + playerClone.GetCurrentExp() + "/ " + playerClone.GetTotalExp(); p_HP.text = "HP: " + playerClone.GetCurrentHP() + "/ " + playerClone.GetMaxHP(); p_Attack.text = "Atk: " + playerClone.GetAttack(); p_Defense.text = "Def: " + playerClone.GetDefense(); p_Speed.text = "Spd: " + playerClone.GetSpeed(); p_Intuition.text = "Int: " + playerClone.GetIntuition(); e_HP.text = "HP: " + enemyClone.GetCurrentHP() + "/ " + enemyClone.GetMaxHP(); e_Attack.text = "Atk: " + enemyClone.GetAttack(); e_Defense.text = "Def: " + enemyClone.GetDefense(); e_Speed.text = "Spd: " + enemyClone.GetSpeed(); e_ExpReward.text = "ExpRwd: " + enemyClone.GetExpReward(); }