private void OnTriggerEnter(Collider other) { //Debug.Log("Collider: " +other.name); int colliderInstanceID = other.GetInstanceID(); if (!RingCatcherHelper.RingCatcherList.ContainsKey(colliderInstanceID)) { return; } var thisRingCatcher = RingCatcherHelper.RingCatcherList[colliderInstanceID]; var minScaleValue = thisRingCatcher.GetMinScaleValue(); //Debug.Log("Ring Catcher Minimum Value: "+ minScaleValue); //Create new Cylinder RingCatcherSpawnManager.Instance.CreateNewRingCatcher(); //Destroy this cylinder StartCoroutine(thisRingCatcher.WaitAndDestroy()); if (transform.parent.localScale.x < minScaleValue) { //Debug.Log("Game over"); StopAllCoroutine(); myData.EndLevel(EndStatus.Lose); return; } _inputData.MinValue = minScaleValue; //Debug.Log("Input Minimum Value: "+_inputData.MinValue); }
private void OnTriggerEnter(Collider other) { var instanceID = other.GetInstanceID(); var isRing = RingHelper.RingList.ContainsKey(instanceID); if (!isRing) { return; } _ringData.MyMinScaleController.StopAllCoroutines(); //Debug.Log("Level Successful"); _ringData.EndLevel(EndStatus.Win); }