private void OnTriggerEnter(Collider other) { var picker = other.GetComponent <PickerPhysicsController>(); if (picker != null) { Debug.Log("Finished!"); Timer.Instance.TimerWait(2f, () => GameEventBus.InvokeEvent(GameEventType.FINISHED)); } }
private void CheckContinue(PickerBase picker) { var counter = _checkPointCounterPlatform.GetCounter(); if (counter >= _target) { _checkPointCounterPlatform.SuccesfulAction(); _gate1.transform.DORotate(new Vector3(-60, 90, 90), 1f); _gate2.transform.DORotate(new Vector3(60, 90, 90), 1f).OnComplete(() => { GameEventBus.InvokeEvent(GameEventType.CHECKPOINT); }); picker.OnPointGained.SafeInvoke(counter * 5); } else { Debug.Log("Fail"); GameEventBus.InvokeEvent(GameEventType.FAIL); } }