Exemple #1
0
    private void OnTriggerEnter2D(Collider2D other)
    {
        if (other.tag == "Player")
        {
            player playerer = other.GetComponent <player>();


            if (powerupID == 0)
            {
                playerer.TripleShotPowerUpOn();
            }
            else if (powerupID == 1)
            {
                playerer.BoostPowerUpOn();
            }
            //else if(powerupID ==2)
            //{
            //  playerer.
            //}


            Destroy(this.gameObject);
        }
        //Debug.Log("Collision with :" + other);
        //player player = GetComponent<player>();
        //player.canTripleShot = true;
    }