Пример #1
0
 private void Update()
 {
     if (follower == null && characterToMove.Target != null)
     {
         SetFollower(characterToMove.Target.move);
     }
     if (follower == null)
     {
         return;
     }
     if (AppInput.GetKey(key))
     {
         RaycastClick(rh => ClickFor(follower, rh));
     }
     if (prefab_waypoint != null && AppInput.GetKeyUp(key))
     {
         follower.ShowCurrentWaypoint();
     }
 }
Пример #2
0
 private void Update()
 {
     if (selection.Count == 0 && c2m.characterToMove.Target != null)
     {
         SetSelection(c2m.characterToMove.Target);
     }
     if (AppInput.GetKey(c2m.key))
     {
         c2m.RaycastClick(rh => {
             if (selection.Count == 0)
             {
                 return;
             }
             for (int i = 0; i < selection.Count; ++i)
             {
                 if (selection[i] == null)
                 {
                     selection.RemoveAt(i--);
                     continue;
                 }
                 c2m.ClickFor(selection[i], rh);
             }
         });
     }
     if (c2m.prefab_waypoint != null && AppInput.GetKeyUp(c2m.key))
     {
         //if (follower != null) { follower.ShowCurrentWaypoint(); }
         if (selection.Count > 0)
         {
             for (int i = 0; i < selection.Count; ++i)
             {
                 selection[i].ShowCurrentWaypoint();
             }
         }
     }
 }