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

        CharacterSettings.ActivateRagDoll(transform, false, false);
        Invoke("UndoFloat", floatTime);
    }
Ejemplo 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();
    }
Ejemplo 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);
        }
    }
Ejemplo n.º 4
0
 public void UndoRagdoll()
 {
     CharacterSettings.ActivateRagDoll(transform, true, true);
     EnableAnimationSystem();
 }