//プレイヤー側が攻撃をする関数----------------------------------------------------------------------------------------------- void PlayerBattle() { bool Run = false; for (int i = 0; i < 10; i++) { if (_characterAttackCircle[i].CircleCheck()) { if (_circleAttack[i].activeInHierarchy) { _turnManeger._targetCharaNum = hit.collider.gameObject.GetComponent <CharacterWalk>().ARRAYNUMBER; if (_radius[i] > (_characterManeger.CharacterPos(i) - _characterManeger.CharacterPos(_turnManeger._targetCharaNum)).magnitude) { _circleChecker = true; if (hit.collider.gameObject.tag == ("Enemy") || hit.collider.gameObject.tag == ("SubEnemy")) { _attackCheck = true; _circleChecker = false; _battleManeger.EnemyInput(); _characterManeger.PlayerBattle(i); _characterManeger.GetPosThree(true); _uiManeger.PosUiResponse(false); Run = true; } } } } } if (Run == true) { Invoke("PlayerRun", RunTIme); } }
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- //敵フロイデの攻撃------------------------------------------------------------------------------------------------------------ public void EnemyFuroideCpuAttack(int arrayNumber) { if (_characterManeger.GetCharacterWalk(arrayNumber).gameObject.activeSelf)//死んでいないとき処理をする { if (_playerScrript.AttackRadius(arrayNumber) >= _mini) { // Debug.Log("こうげき"); _playerScrript.SetTargetCharaNum(_num);//攻撃ターゲットを設定 _characterManeger.AttackRestriction(arrayNumber); //_characterManeger.EnemyPosition (_num); _battleManger.EnemyInput(); _battleManger.PlayerInputisEnemyAttack(_num); _battleManger.EnemyRun(_num, arrayNumber); Attackset = false; GetMiniReset(); } } }