Esempio n. 1
0
 private void OnDestroy()
 {
     kinematicBubbleManager.RemoveFromKinematicList(this);
     if (!droped)
     {
         kinematicBubbleManager.SetTimerAndCheckForScroll();
     }
     kinematicBubbleManager.SetTimerForDropToZero();
 }
Esempio n. 2
0
    private void Awake()
    {
        myAnimator = GetComponent <Animator>();
        myAnimator.SetBool("BubbleBlow", true);
        myAnimator.enabled = false;

        myCollider2D  = GetComponent <CapsuleCollider2D>();
        myRigidbody2D = GetComponent <Rigidbody2D>();
        myRigidbody2D.useFullKinematicContacts = true;
        InitialRayDirections();
        SetColliderDependOnPosition();

        kinematicBubbleManager = FindObjectOfType <KinematicBubbleManager>();
        kinematicBubbleManager.AddToKinematicList(this);
        kinematicBubbleManager.SetTimerAndCheckForScroll();
    }