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); }
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!"); } }
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; }
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; }