示例#1
0
    public virtual void OnTriggerEnter2D(Collider2D other)
    {
        IPowerUp playerCollectPowerUp = other.gameObject.GetComponent <Player>();

        if (playerCollectPowerUp != null)
        {
            playerCollectPowerUp.PowerUpCollected(PowerUpIndex);
            ReturnPowerUp();
        }
    }