コード例 #1
0
 void OnGameStateChanged(GameStates state)
 {
     if (state == GameStates.Game)
     {
         Cursor.lockState = CursorLockMode.Locked;
         Cursor.visible   = false;
     }
     else
     {
         Cursor.lockState = CursorLockMode.None;
         Cursor.visible   = true;
     }
     pauseScreen.SetState(state == GameStates.Pause);
     gameScreen.SetState(state == GameStates.Game || state == GameStates.Inventory);
     finishScreen.SetState(state == GameStates.Finish);
     dialogScreen.SetState(state == GameStates.Dialog);
     InventoryScreen.SetState(state == GameStates.Inventory);
 }