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

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