示例#1
0
        void OnTriggerEnter(Collider other)
        {
            //here you must see if your powerup was hit by a player
            GameObject car = other.gameObject;

            if (car)
            {
                //we were hit by a player
                StartCoroutine(carController.SetPowerupValue(Value, Duration));
                Destroy(gameObject);
            }
        }