Ejemplo n.º 1
0
 void OnTriggerEnter2D(Collider2D boxCollider2D)
 {
     if (boxCollider2D.CompareTag("Player"))
     {
         Debug.Log("has collected an upgrade");
         dashBar.AddMaxDash();
         pickupObject.SetActive(false);
     }
 }
Ejemplo n.º 2
0
    private void FixedUpdate()
    {
        counter.text = "Collectibles: " + collectiblesCollected + "/2";

        if (collectiblesCollected == 2)
        {
            dashBar.AddMaxDash();
            collectiblesCollected = 0;
        }
    }