示例#1
0
 void OnInput(int type, Vector2 pos)
 {
     if (type == 0)
     {
         Ray        ray = Camera.main.ScreenPointToRay(pos);
         RaycastHit hitInfo;
         if (Physics.Raycast(ray.origin, ray.direction, out hitInfo))
         {
             unitSystem.SetUnitMotion(unitSystem.GetFocusId(), hitInfo.point, 5.0f);
         }
     }
 }