예제 #1
0
        private IEnumerator createTileFloorInternal(TileData tileData)
        {
            SpawnPointInstruction.gameObject.SetActive(true);
            m_State        = TilesGeneratorState.ChooseSpawn;
            m_RaycastPlane = new UnityEngine.Plane();
            m_RaycastPlane.SetNormalAndPosition(Vector3.up, RoomManager.Instance.Floor.transform.position);
            m_CurrentTile = tileData;
            yield return(null);

            InputManager.Instance.PushModalInputHandler(gameObject);
        }
예제 #2
0
 private void handleSpawnPointCase()
 {
     if (m_CurrentSpawnPoint != null)
     {
         m_State = TilesGeneratorState.ChooseDirection;
         SpawnPointInstruction.gameObject.SetActive(false);
         DirectionPointInstruction.gameObject.SetActive(true);
     }
     else
     {
         TextManager.Instance.ShowWarning("Kein Ausgangspunkt ausgewählt!");
     }
 }
예제 #3
0
        private void goBackToSpawnState()
        {
            if (m_State != TilesGeneratorState.ChooseDirection)
            {
                return;
            }

            m_CurrentDirectionPoint.GetComponent <GazeScaler>().ForceOnFocusExit();
            m_CurrentDirectionPoint = null;
            m_CurrentSpawnPoint.GetComponent <GazeScaler>().ForceOnFocusExit();
            m_CurrentSpawnPoint = null;
            SpawnPointInstruction.gameObject.SetActive(true);
            DirectionPointInstruction.gameObject.SetActive(false);
            m_State = TilesGeneratorState.ChooseSpawn;
        }
예제 #4
0
        private void reset()
        {
            if (m_CurrentSpawnPoint)
            {
                m_CurrentSpawnPoint.GetComponent <GazeScaler>().ForceOnFocusExit();
            }
            if (m_CurrentDirectionPoint)
            {
                m_CurrentDirectionPoint.GetComponent <GazeScaler>().ForceOnFocusExit();
            }

            m_CurrentSpawnPoint     = null;
            m_CurrentDirectionPoint = null;
            m_CurrentTile           = null;

            DirectionPointInstruction.gameObject.SetActive(false);
            SpawnPointInstruction.gameObject.SetActive(false);

            InputManager.Instance.PopModalInputHandler();
            m_State = TilesGeneratorState.Idle;
        }