/// <summary> /// Throw the grabed object /// </summary> public virtual void ThrowObject() { // If the character doesn't have a projectile to throw, return if (!projectile) { return; } // Throw the projectile and remove it from the current weared object projectile.Throw(FacingSide); projectile = null; }
/// <summary> /// Throws the weared throwable. /// </summary> /// <param name="_targetPosition">Position where the object should land</param> public virtual bool ThrowObject(Vector3 _targetPosition) { // Call this method in owner only if (!photonView.isMine) { TDS_RPCManager.Instance.RPCPhotonView.RPC("CallMethodOnline", photonView.owner, TDS_RPCManager.GetInfo(photonView, GetType(), "ThrowObject_A"), new object[] { }); return(false); } // Return false if no throwable if (!throwable) { return(false); } // Alright, then throw it ! throwable.Throw(_targetPosition, aimAngle, RandomThrowBonusDamages); return(true); }