예제 #1
0
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Space))
     {
         Game.GalaxyView = true;
         CameraViewChange.ChangeCameraView();
     }
 }
예제 #2
0
 void Update()
 {
     hitInfo = new RaycastHit();
     if (Input.GetKey(KeyCode.Mouse1))
     {
         UnitTravelOrder();
     }
     else if (Input.GetKey(KeyCode.Mouse0))
     {
         SystemViewChange();
     }
     else if (Input.GetKeyDown(KeyCode.Space))
     {
         CameraViewChange.ChangeCameraView();
     }
 }
예제 #3
0
 void SystemViewChange()
 {
     hit = Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), out hitInfo);
     if (hit)
     {
         if (selectedObject != hitInfo.transform.gameObject)
         {
             selectedObject = hitInfo.transform.gameObject;
         }
         else if (selectedObject.tag == "StarSystem")
         {
             selectedObject          = hitInfo.transform.gameObject;
             Game.GalaxyView         = false;
             game.currentSolarSystem = game.Systems.Find(x => x.Name == selectedObject.name);
             CameraViewChange.ChangeCameraView();
         }
     }
 }