public void FireExtra() { if (!photonView.isMine) { return; } if (extraCtrl == null) { return; } Run(); extraCtrl.Fire(targetTran); }
IEnumerator Attack() { int weaponNo = 0; for (;;) { if (atackIntervalTime == 0) { yield return(new WaitForSeconds(1.0f)); } if (!GameController.Instance.isGameStart && !GameController.Instance.isPractice) { yield return(null); continue; } float interval = atackIntervalTime; if (targetTran == null) { yield return(null); continue; } //専用武器 if (extraCtrl != null) { if (extraCtrl.IsShooting()) { yield return(null); continue; } if (extraCtrl.IsEnabled()) { extraCtrl.Fire(targetTran); continue; } } //通常武器 weaponNo = Random.Range(0, weapons.Count); for (;;) { if (weapons[weaponNo].IsEnableFire()) { QuickTarget(targetTran); yield return(new WaitForSeconds(0.15f)); quickTurnTime = 0; weapons[weaponNo].Fire(targetTran); break; } weaponNo = (weaponNo + 1) % weapons.Count; yield return(null); } yield return(new WaitForSeconds(interval)); } }