Esempio n. 1
0
    public void DoFloat(float floatTime)
    {
        DisableAnimationSystem();

        CharacterSettings.ActivateRagDoll(transform, false, false);
        Invoke("UndoFloat", floatTime);
    }
Esempio n. 2
0
    public void UndoFloat()
    {
        CharacterSettings.ActivateRagDoll(transform, true, true);

        // Set the character where the rigidbody is
        transform.position = Settings.RootTransform.position;
        Settings.RootTransform.localPosition = Vector3.zero;

        EnableAnimationSystem();
    }
Esempio n. 3
0
    public virtual void DoRagDoll(Vector3 push)
    {
        DisableAnimationSystem();

        // Start the ragdoll system
        CharacterSettings.ActivateRagDoll(transform, false, true);

        // Apply the push
        if (Settings.RootRigidBody != null)
        {
            Settings.RootRigidBody.AddForce(push);
        }
    }
Esempio n. 4
0
 public void UndoRagdoll()
 {
     CharacterSettings.ActivateRagDoll(transform, true, true);
     EnableAnimationSystem();
 }