public void PushBack(Vector2 force, UnityEngine.ForceMode2D type)
 {
     if (!isServer)
     {
         return;
     }
     Rpc_PushBack(force, type);
 }
 void Rpc_PushBack(Vector2 force, UnityEngine.ForceMode2D type)
 {
     if (hasAuthority)
     {
         if (_rb != null)
         {
             _rb.AddForce(force, type);
         }
     }
 }
Exemple #3
0
    static bool Rigidbody2D_AddTorque__Single__ForceMode2D(JSVCall vc, int argc)
    {
        int len = argc;

        if (len == 2)
        {
            System.Single           arg0 = (System.Single)JSApi.getSingle((int)JSApi.GetType.Arg);
            UnityEngine.ForceMode2D arg1 = (UnityEngine.ForceMode2D)JSApi.getEnum((int)JSApi.GetType.Arg);
            ((UnityEngine.Rigidbody2D)vc.csObj).AddTorque(arg0, arg1);
        }

        return(true);
    }
Exemple #4
0
    static bool Rigidbody2D_AddRelativeForce__Vector2__ForceMode2D(JSVCall vc, int argc)
    {
        int len = argc;

        if (len == 2)
        {
            UnityEngine.Vector2     arg0 = (UnityEngine.Vector2)JSApi.getVector2S((int)JSApi.GetType.Arg);
            UnityEngine.ForceMode2D arg1 = (UnityEngine.ForceMode2D)JSApi.getEnum((int)JSApi.GetType.Arg);
            ((UnityEngine.Rigidbody2D)vc.csObj).AddRelativeForce(arg0, arg1);
        }

        return(true);
    }