示例#1
0
    void OnCollisionEnter(Collision tanque)
    {
        Debug.Log(tanque.gameObject.tag);
        if (tanque.gameObject.CompareTag("Player"))
        {
            MotorLau other = (MotorLau)tanque.gameObject.GetComponent(typeof(MotorLau));

            other.Destruir();
        }
    }
示例#2
0
 // Start is called before the first frame update
 void Start()
 {
     rb    = GetComponent <Rigidbody>();
     motor = GetComponent <MotorLau>();
 }