/// <summary> /// 碰撞检测 /// </summary> private void OnTriggerEnter2D(Collider2D collider) { if (BirdController.instance.currentState == State.Die) { return; } BirdController.instance.smooth = 0.5f; playUI.Die(); }
private void OnTriggerExit2D(Collider2D collider) { if (BirdController.instance.currentState != State.Die) { playUI = UIManager.instance.uiBase[UIPanel.PlayUI] as PlayUIPanel; BirdController.instance.smooth = 0; playUI.Die(); } }