public void AttackCalculate() { playerParams.SetEnemyAttack(myParams.GetRandomAttack()); }
public void AttackCalculate() { if (attack_flag == 1) { if (BattleSceneManager.getInstance().CharacterCount == 3) { Debug.Log(myParams.GetRandomAttack()); playerParams[0].SetEnemyAttack(myParams.GetRandomAttack()); } if (BattleSceneManager.getInstance().CharacterCount == 2) { //if (player[0].GetComponent<PlayerParams>().m_cStatus.m_nHp <= 0) //{ // playerParams[1].SetEnemyAttack(myParams.GetRandomAttack()); //} if (player[0] == null) { playerParams[1].SetEnemyAttack(myParams.GetRandomAttack()); } if (player[1] == null) { playerParams[0].SetEnemyAttack(myParams.GetRandomAttack()); } } if (BattleSceneManager.getInstance().CharacterCount == 1) { if (player[0] == null && player[1] == null) { //Debug.Log(playerParams[2].name); playerParams[2].SetEnemyAttack(myParams.GetRandomAttack()); } if (player[0] == null && player[2] == null) { //Debug.Log(playerParams[2].name); playerParams[1].SetEnemyAttack(myParams.GetRandomAttack()); } if (player[1] == null && player[2] == null) { //Debug.Log(playerParams[2].name); playerParams[0].SetEnemyAttack(myParams.GetRandomAttack()); } } } if (attack_flag == 2) { if (BattleSceneManager.getInstance().CharacterCount == 3) { //Debug.Log(playerParams[1].name); playerParams[1].SetEnemyAttack(myParams.GetRandomAttack()); } if (BattleSceneManager.getInstance().CharacterCount == 2) { if (player[1] == null) { Debug.Log(playerParams[2].name); playerParams[2].SetEnemyAttack(myParams.GetRandomAttack()); } else { if (player[0] == null) { Debug.Log(playerParams[2].name); playerParams[2].SetEnemyAttack(myParams.GetRandomAttack()); } else { Debug.Log(playerParams[1].name); playerParams[1].SetEnemyAttack(myParams.GetRandomAttack()); } } } } if (attack_flag == 3) { Debug.Log(playerParams[2].name); playerParams[2].SetEnemyAttack(myParams.GetRandomAttack()); } }