public void Reload() { if (!CanReload()) { return; } StartCoroutine(_startReloadingCoroutine()); reloadCue.Execute(transform.position, Quaternion.identity); }
private void RPC_TakeDamage() { Animator.TakeDamage(); if (photonView.IsMine) { var transformCached = transform; playerDamagedCue.Execute(transformCached.position, transformCached.rotation); } }
private void OnTriggerEnter(Collider other) { if (1 << other.gameObject.layer == obstacleLayer) { if (_colliders.Count == 0) { phasingCue.Execute(transform.position, Quaternion.identity); } _colliders.Add(other); } }
public void Shoot() { var now = Time.time; if (!CanShoot(now)) { return; } _lastShoot = now; _currentClipAmmo -= 1; OnAmmoChange?.Invoke(_currentClipAmmo); var shootingPosition = ShootingPoints[_currentShootingPoint].Transform.position; photonView.RPC(nameof(RPC_SpawnBullet), RpcTarget.MasterClient, PhotonNetwork.LocalPlayer.UserId, addForceVelocity, PhotonNetwork.LocalPlayer.GetPlayerNumber(), shootingPosition, GetShootingDirection() ); shootCue.Execute(shootingPosition, Quaternion.identity); _currentShootingPoint = (_currentShootingPoint + 1) % ShootingPoints.Length; }
private void ExecuteCueAndWaitToFinish(float time) { countdownCue.Execute(transform.position, Quaternion.identity); _waitSeconds.Wait(time); }
private void ExecuteCue() { cue.Execute(transform.position, Quaternion.identity); }