예제 #1
0
 /// <summary>
 ///  碰撞检测
 /// </summary>
 private void OnTriggerEnter2D(Collider2D collider)
 {
     if (BirdController.instance.currentState == State.Die)
     {
         return;
     }
     BirdController.instance.smooth = 0.5f;
     playUI.Die();
 }
예제 #2
0
 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();
     }
 }