Example #1
0
    /// <summary>
    /// Drop the graned object
    /// </summary>
    public virtual void DropObject()
    {
        // If the character doesn't have a projectile to drop, return
        if (!projectile)
        {
            return;
        }

        // Drop the projectile and remove it from the current weared object
        projectile.Drop();
        projectile = null;
    }
Example #2
0
    /// <summary>
    /// Drop the weared throwable.
    /// </summary>
    /// <returns>Returns true if successfully dropped the object, false if not having an object to drop.</returns>
    public virtual bool DropObject()
    {
        // Call this method in owner only
        if (!photonView.isMine)
        {
            TDS_RPCManager.Instance.RPCPhotonView.RPC("CallMethodOnline", photonView.owner, TDS_RPCManager.GetInfo(photonView, GetType(), "DropObject"), new object[] { });
            return(false);
        }

        // If no throwable, return
        if (!throwable)
        {
            return(false);
        }

        // Drooop
        throwable.Drop();
        return(true);
    }