// Update is called once per frame void Update() { if (targ != null) { explode = targ.GetComponent<Explode> (); if (readyToAttack) { print ("explode"); if(explode != null){ explode.onExplode(); } } } }