public void reset() { isOnDelayMode = false; currentMeteor = null; isShooting = false; stopLasers(); CancelInvoke(); }
void onPointerEnter(RaycastResult result) { raycastOnMeteor = result.gameObject.layer == LayerMask.NameToLayer(meteorLayerName); if (raycastOnMeteor && isShooting) { currentMeteor = result.gameObject.GetComponentInParent <meteorMovementManager>(); currentMeteor.signalHitStart(); } }
void onPointerExit(GameObject go) { if (currentMeteor == null) { return; } if (go == currentMeteor.gameObject) { currentMeteor.signalHitEnd(); currentMeteor = null; raycastOnMeteor = false; } }