コード例 #1
0
 void Update()
 {
     if (IsHeroNearCentralWayout())
     {
         _hero.IsInWayoutZone = true;
         if (_isDragListenerActivated)
         {
             if (_hero.IsDragging() && _centralWayout.OverlapPoint(GetCurrentMousePosition()))
             {
                 if (_hero.GetDragTarget().name.Equals(_dragTrainingPassengerName))
                 {
                     _trainingHandler.ShowNext();
                     _isDragListenerActivated = false;
                 }
             }
         }
     }
     else
     {
         bool anyDoorIsReachable = false;
         for (int i = 0; i < _doors.Count; i++)
         {
             if (IsHeroNearWayout(_doors[i], false) && _timer.IsDoorOpenedByNumber(i))
             {
                 anyDoorIsReachable = true;
                 break;
             }
         }
         _hero.IsInWayoutZone = anyDoorIsReachable;
     }
 }