public void ClickStatsButton() { SoundManager.Instance.PlaySoundEffect(SoundType.BUTTON_CLICK); UIViewController.DeactivateUIView("ClientMainView"); UIViewController.ActivateUIView(BackgroundView.Load()); UIViewController.ActivateUIView(HistoryView.Load()); }
public void ClickBattleButton() { SoundManager.Instance.PlaySoundEffect(SoundType.BUTTON_CLICK); UIViewController.DeactivateUIView("ClientMainView"); UIViewController.ActivateUIView(RoleView.Load()); ClientGameManager.Instance.gameObject.SetActive(true); }
public void ClickNextButton() { Avatar.Instance.SetAvatarStats(_health, _speed, _range); UIViewController.ActivateUIView(RoleView.Load()); ClientGameManager.Instance.gameObject.SetActive(true); UIViewController.DeactivateUIView("BackgroundView"); UIViewController.DeactivateUIView("StatsView"); }
public void ClickBack() { SoundManager.Instance.PlaySoundEffect(SoundType.BUTTON_CLICK); UIViewController.DeactivateUIView("HistoryView"); UIViewController.DeactivateUIView("BackgroundView"); UIViewController.ActivateUIView("ClientMainView"); }
void SetUpGameFromData() { UIViewController.DeactivateUIView("MainView"); UIViewController.DeactivateUIView("ResultsView"); if (!_bgAssets) { _bgAssets = true; for (int i = 0; i < BGSprites.Count; i++) { BGSprites[i].enabled = true; } } ClearAllObjects(); if (_redTeam != null) { _redTeam.Reset(); } if (_blueTeam != null) { _blueTeam.Reset(); } CreateFlags(); // create teams List <Piece> redPieces = new List <Piece>(); _redTeam = new Team(TeamColor.RED, null, _redFlag.Position); List <Piece> bluePieces = new List <Piece>(); _blueTeam = new Team(TeamColor.BLUE, null, _blueFlag.Position); List <Piece> currentPieceList; Team team; for (int i = 0; i < OnlineManager.Instance.GameData.pieces.Count; i++) { PieceData pieceData = OnlineManager.Instance.GameData.pieces[i]; if (pieceData.team_name == "red") { team = _redTeam; currentPieceList = redPieces; } else { team = _blueTeam; currentPieceList = bluePieces; } CreatePiece(currentPieceList, pieceData); } _redTeam.Pieces = redPieces; _redTeam.SetPieceLookups(); _blueTeam.Pieces = bluePieces; _blueTeam.SetPieceLookups(); _startTime = DateTime.UtcNow; }
IEnumerator PostInfo() { yield return(StartCoroutine(OnlineManager.Instance.StartPutPlayer())); yield return(StartCoroutine(OnlineManager.Instance.StartPieceInfoPostCoroutine(true))); UIViewController.DeactivateUIView("AvatarCreationView"); UIViewController.DeactivateUIView("AvatarChoiceView"); }
public void ClickNextButton() { SoundManager.Instance.PlaySoundEffect(SoundType.BUTTON_CLICK); if (_state == AvatarCreationViewState.STATS) { UIViewController.DeactivateUIView("AvatarStatsView"); UIViewController.ActivateUIView(AvatarChoiceView.Load()); NextButton.Deactivate(); _state = AvatarCreationViewState.GEAR; } }
public void ClickStoreButton() { SoundManager.Instance.PlaySoundEffect(SoundType.BUTTON_CLICK); UIViewController.DeactivateUIView("ClientMainView"); UIViewController.ActivateUIView(BackgroundView.Load()); UIViewController.ActivateUIView(GearEquipView.Load()); AvatarView avatarView = AvatarView.Load(); UIViewController.ActivateUIView(avatarView); StoreRefreshButtonObj.SetActive(true); StoreRefreshButtonObj.transform.SetAsLastSibling(); avatarView.StoreRefreshButtonObj = StoreRefreshButtonObj; }
public void ClickBackButton() { SoundManager.Instance.PlaySoundEffect(SoundType.BUTTON_CLICK); UIViewController.DeactivateUIView("AvatarView"); UIViewController.DeactivateUIView("GearEquipView"); UIViewController.DeactivateUIView("AmmoEquipView"); UIViewController.DeactivateUIView("StoreView"); UIViewController.DeactivateUIView("AmmoBeltView"); UIViewController.DeactivateUIView("CoinsGemsView"); UIViewController.DeactivateUIView("BackgroundView"); UIViewController.ActivateUIView("ClientMainView"); }
public void ClickBackButton() { if (Client) { SceneManager.LoadScene("Client"); } else { UIViewController.DeactivateUIView("ResultsView"); UIViewController.ActivateUIView("MainView"); SetUpButtons(); } }
public void ClickShop() { SoundManager.Instance.PlaySoundEffect(SoundType.BUTTON_CLICK); AvatarView.Instance.State = AvatarViewState.STORE; UIViewController.ActivateUIView(StoreView.Load()); UIViewController.DeactivateUIView("GearEquipView"); UIViewController.DeactivateUIView("AmmoEquipView"); UIViewController.DeactivateUIView("AmmoBeltView"); NavButtons[0].Disable(); NavButtons[0].transform.localScale = new Vector3(1.2f, 1.2f, 1.2f); NavButtons[1].Enable(); NavButtons[1].transform.localScale = Vector3.one; CoinsGemsView.Instance.MoveToFront(); StoreRefreshButtonObj.transform.SetAsLastSibling(); _state = AvatarViewState.STORE; }
public void ClickAmmoEquip() { SoundManager.Instance.PlaySoundEffect(SoundType.BUTTON_CLICK); AvatarView.Instance.State = AvatarViewState.AMMO; UIViewController.ActivateUIView(AmmoEquipView.Load()); UIViewController.ActivateUIView(AmmoBeltView.Load()); UIViewController.DeactivateUIView("GearEquipView"); UIViewController.DeactivateUIView("StoreView"); NavButtons[0].Enable(); NavButtons[0].transform.localScale = Vector3.one; NavButtons[1].Disable(); NavButtons[1].transform.localScale = new Vector3(1.2f, 1.2f, 1.2f); CoinsGemsView.Instance.MoveToFront(); StoreRefreshButtonObj.transform.SetAsLastSibling(); if (_displayedItem != null) { RemoveGear(_displayedItem); } _state = AvatarViewState.AMMO; }
public void ClickBack() { UIViewController.DeactivateUIView("StatsView"); UIViewController.ActivateUIView(JobView.Load()); }
void FixedUpdate() { if (_mouseOverInfo != null && _mouseOverPiece != null) { _mouseOverInfo.SetPosition(_mouseOverPiece.transform.position); } if (_replay) { if (_gameOver) { _gameOverTimer += Time.deltaTime; if (_gameOverTimer >= GAME_OVER_TIME) { enabled = false; LoadingAlert.Present(); PlayerPrefs.SetString("LAST_GAME_VIEWED", OnlineManager.Instance.GameData.id); //Debug.Log("saved game id " + OnlineManager.Instance.GameData.id); PlayerPrefs.Save(); ActivateResultsView(); } } else { if (_countdown) { _countdownTimer -= Time.deltaTime; if (_countdownTimer < 0.0f) { UIViewController.DeactivateUIView("CountdownView"); _countdown = false; //Debug.Log("here!"); } else { int count = (int)Mathf.Ceil(_countdownTimer); CountdownText.Text = count.ToString(); } } else { if (_replayWatcherInfo != null) { _replayWatcherInfo.SetPosition(_replayWatcherPiece.transform.position); //SetWatcherInfoPosition(); } TurnData turnData = DataRecorder.Instance.TurnDataList[_replayIndex]; ReplayTurn(turnData); _replayIndex++; // game over if (_gameOver) { _gameOverTimer += Time.deltaTime; if (_gameOverTimer >= GAME_OVER_TIME) { if (_mouseOverInfo != null) { Destroy(_mouseOverInfo.gameObject); } enabled = false; LoadingAlert.Present(); PlayerPrefs.SetString("LAST_GAME_VIEWED", OnlineManager.Instance.GameData.id); //Debug.Log("saved game id " + OnlineManager.Instance.GameData.id); PlayerPrefs.Save(); ActivateResultsView(); } } else if (_replayIndex >= DataRecorder.Instance.TurnDataList.Count) { if (_replayWatcherInfo != null) { Destroy(_replayWatcherInfo.gameObject); } if (_mouseOverInfo != null) { Destroy(_mouseOverInfo.gameObject); } _redTeam.StopPieceAnimations(); _blueTeam.StopPieceAnimations(); _gameOver = true; _gameOverTimer = 0.0f; } } } } else { if (_gameOver) { _gameOverTimer += Time.deltaTime; if (_gameOverTimer >= GAME_OVER_TIME) { enabled = false; LoadingAlert.Present(); _gameTime = DateTime.UtcNow - _startTime; _redTeam.CalulateMVPs(); _blueTeam.CalulateMVPs(); DisplayGameResults(); } } else { #if SLOW_MOTION if (Input.GetKey(KeyCode.A)) #endif { StartTurn(Time.deltaTime); Attack(Time.deltaTime); RecordMoves(); RemoveDoneBalloons(); if (CheckGameOver()) { _redTeam.StopPieceAnimations(); _blueTeam.StopPieceAnimations(); SoundManager.Instance.PlaySoundEffect(SoundType.CHEER); _gameOver = true; _gameOverTimer = 0.0f; } } } } }
public void ClickBack() { SoundManager.Instance.PlaySoundEffect(SoundType.BUTTON_CLICK); if (PositionView.Instance != null) { PositionView.Instance.RemovePositions(); } if (PathView.Instance != null) { PathView.Instance.RemovePaths(); } UIViewController.DeactivateUIView(ATTACK_SETUP_VIEW); UIViewController.DeactivateUIView(DEFENSE_SETUP_VIEW); UIViewController.DeactivateUIView(ROLE_VIEW); ClientGameManager.Instance.gameObject.SetActive(false); UIViewController.ActivateUIView("ClientMainView"); /* * switch (State) * { * case RoleViewState.ROLE: * if (PositionView.Instance != null) * PositionView.Instance.RemovePositions(); * if (PathView.Instance != null) * PathView.Instance.RemovePaths(); * UIViewController.DeactivateUIView(ATTACK_SETUP_VIEW); * UIViewController.DeactivateUIView(DEFENSE_SETUP_VIEW); * UIViewController.DeactivateUIView(ROLE_VIEW); * ClientGameManager.Instance.gameObject.SetActive(false); * UIViewController.ActivateUIView("ClientMainView"); * break; * case RoleViewState.PATH: * if (PathView.Instance != null) * PathView.Instance.RemovePaths(); * UIViewController.DeactivateUIView(ATTACK_SETUP_VIEW); * PrepareSplashImage.Activate(); * State = RoleViewState.ROLE; * SelectButton.Deactivate(); * break; * case RoleViewState.POSITION: * if (PositionView.Instance != null) * PositionView.Instance.RemovePositions(); * UIViewController.DeactivateUIView(DEFENSE_SETUP_VIEW); * PrepareSplashImage.Activate(); * State = RoleViewState.ROLE; * SelectButton.Deactivate(); * break; * case RoleViewState.PATH_SELECTED: * case RoleViewState.POSITION_SELECTED: * if (PositionView.Instance != null) * PositionView.Instance.RemovePositions(); * if (PathView.Instance != null) * PathView.Instance.RemovePaths(); * UIViewController.DeactivateUIView(ATTACK_SETUP_VIEW); * UIViewController.DeactivateUIView(DEFENSE_SETUP_VIEW); * UIViewController.DeactivateUIView(ROLE_VIEW); * ClientGameManager.Instance.gameObject.SetActive(false); * UIViewController.ActivateUIView("ClientMainView"); * break; * } */ }
public void ClickJob(int jobIndex) { Avatar.Instance.Type = (PieceType)jobIndex; UIViewController.ActivateUIView(StatsView.Load()); UIViewController.DeactivateUIView("JobView"); }
public void ClickColor(int colorIndex) { Avatar.Instance.Color = (TeamColor)colorIndex; UIViewController.ActivateUIView(JobView.Load()); UIViewController.DeactivateUIView("ColorView"); }
public void ClickBackButton() { SoundManager.Instance.PlaySoundEffect(SoundType.BUTTON_CLICK); UIViewController.DeactivateUIView("SettingsView"); }
public void ClickBack() { UIViewController.DeactivateUIView("JobView"); UIViewController.ActivateUIView(ColorView.Load()); }