Exemple #1
0
 void Start()
 {
     rigidbody = GetComponent <Rigidbody2D>();
     animator  = GetComponent <Animator>();
     health    = GetComponent <Health>();
     fallable  = GetComponent <Fallable>();
 }
Exemple #2
0
    public void PlayFall(Fallable fallable)
    {
        this.fallable = fallable;
        var playerController = fallable.fallableRoot.GetComponent <PlayerController>();

        if (playerController)
        {
            playerController.rb.constraints = RigidbodyConstraints2D.FreezePosition;
        }
        falling = true;
    }