public void ShowCurrentTipObjects() { //AppViewerUIPanelHUD.Instance.inModalAction = true; //AppViewerUIPanelActionTrackerSearch.HideTrackerDetectObject(); //AppViewerUIPanelActionTrackerSearch.HideTrackerDetectLabel(); string tipCode = "tip-" + (currentTipIndex + 1).ToString(); ShowContainer(tipsCenterContainer, tipCode); ShowContainer(tipsTopContainer, tipCode); ShowContainer(tipsBottomContainer, tipCode); ShowContainer(tipsTopLeftContainer, tipCode); ShowContainer(tipsTopRightContainer, tipCode); ShowContainer(tipsBottomLeftContainer, tipCode); ShowContainer(tipsBottomRightContainer, tipCode); ShowContainer(tipsRightContainer, tipCode); ShowContainer(tipsLeftContainer, tipCode); UIUtil.SetLabelValue( labelCurrentTipStatus, string.Format("Tip {0} of {1}", currentTipIndex + 1, tipsTotal)); GameCustomController.BroadcastCustomSync(); }
public virtual void saveCustomItem(GameProfileCustomItem profileCustomItem) { GameProfileCharacters.Current.SetCharacterCustom(profileCustomItem); GameState.SaveProfile(); //LogUtil.Log("saveCustomItem:profileCustomItem:" + profileCustomItem); //LogUtil.Log("saveCustomItem:profileCustomItem:json:" + profileCustomItem.ToJson()); //LogUtil.Log("saveCustomItem:currentCustom:json:" + GameProfileCharacters.currentCustom.ToJson()); GameCustomController.BroadcastCustomSync(); }
public void ShowOverview() { HideStates(); // Update team display //LogUtil.Log("ShowOverview:"); flowState = AppOverviewFlowState.Mode; UIPanelDialogBackground.ShowDefault(); UpdateOverviewWorld(); UIUtil.SetLabelValue(labelOverviewType, AppContentStates.Current.display_name); AnimateInBottom(containerOverview); GameCustomController.BroadcastCustomSync(); foreach (GameCustomPlayer customPlayer in gameObject.GetList <GameCustomPlayer>()) { if (customPlayer.isActorTypeEnemy) { GameTeam team = GameTeams.Current; if (team != null) { UIUtil.SetLabelValue(labelOverviewTeamEnemy, team.display_name); GameCustomCharacterData customInfo = new GameCustomCharacterData(); customInfo.actorType = GameCustomActorTypes.enemyType; customInfo.presetColorCode = team.data.GetColorPreset().code; customInfo.presetTextureCode = team.data.GetTexturePreset().code; customInfo.type = GameCustomTypes.teamType; customInfo.teamCode = team.code; customPlayer.Load(customInfo); } } } ContentPause(); UIColors.UpdateColors(); }
void OnTipsCycleHandler(string objName) { if (objName != lastTipObjectName) { lastTipObjectName = objName; if (flowState == AppOverviewFlowState.GameplayTips) { ChangeTipsState(AppOverviewFlowState.Mode); } else { ChangeTipsState(AppOverviewFlowState.GameplayTips); } } GameCustomController.BroadcastCustomSync(); }
public void LoadPlayer(string characterCodeTo) { if (string.IsNullOrEmpty(characterCodeTo)) { return; } customCharacterData.characterCode = characterCodeTo; if (containerPlayerDisplay == null) { return; } string gameCharacterCode = customCharacterData.characterCode; if (isProfileCharacterCode) { GameProfileCharacterItem gameProfileCharacterItem = GameProfileCharacters.Current.GetCharacter( customCharacterData.characterCode); if (gameProfileCharacterItem == null) { return; } gameCharacterCode = gameProfileCharacterItem.characterCode; } GameCharacter gameCharacter = GameCharacters.Instance.GetById(gameCharacterCode); if (gameCharacter == null) { return; } containerPlayerDisplay.DestroyChildren(); GameObject go = gameCharacter.Load(); if (go == null) { return; } go.transform.parent = containerPlayerDisplay.transform; go.transform.position = Vector3.zero; go.transform.localPosition = Vector3.zero; go.transform.localScale = Vector3.one; go.transform.localRotation = Quaternion.identity;//.Euler(Vector3.zero.WithY(133)); //GameController.CurrentGamePlayerController.LoadCharacter(gameCharacter.data.GetModel().code); go.SetLayerRecursively(gameObject.layer); // LOAD UP PASSED IN VALUES customPlayerObject = go.GetOrSet <GameCustomPlayer>(); if (customPlayerObject != null) { customPlayerObject.Change(customCharacterData); } GameCustomController.BroadcastCustomSync(); if (containerRotator != null) { containerRotator.ResetObject(); } }
public void LoadPlayer(string characterCodeTo, bool isProfileCharacter = false) { isProfileCharacterCode = isProfileCharacter; if (string.IsNullOrEmpty(characterCodeTo)) { return; } if (customCharacterData.characterCode == characterCodeTo && initialized) { return; } customCharacterData.characterCode = characterCodeTo; if (containerPlayerDisplay == null) { return; } string gameCharacterCode = customCharacterData.characterCode; if (isProfileCharacterCode) { // If this is a profile code or profile uuid character code // look it up in teh profile and get the model name there. gameProfileCharacterItem = GameProfileCharacters.Current.GetCharacter( customCharacterData.characterCode); if (gameProfileCharacterItem == null) { return; } // TODO REMOVE and make sure initial sets correctly. if (gameProfileCharacterItem.code == BaseDataObjectKeys.defaultKey) { gameCharacterCode = ProfileConfigs.defaultProfileCharacterCode; } else { gameCharacterCode = gameProfileCharacterItem.characterCode; } } GameCharacter gameCharacter = GameCharacters.Instance.GetById(gameCharacterCode); if (gameCharacter == null) { return; } containerPlayerDisplay.DestroyChildren(); GameObject go = gameCharacter.Load(); if (go == null) { return; } go.transform.parent = containerPlayerDisplay.transform; go.transform.position = Vector3.zero; go.transform.localPosition = Vector3.zero; go.transform.localScale = Vector3.one; go.transform.localRotation = Quaternion.identity;//.Euler(Vector3.zero.WithY(133)); //GameController.CurrentGamePlayerController.LoadCharacter(gameCharacter.data.GetModel().code); go.SetLayerRecursively(gameObject.layer); // LOAD UP PASSED IN VALUES customPlayerObject = go.GetOrSet <GameCustomPlayer>(); if (customPlayerObject != null) { customPlayerObject.Change(customCharacterData); } GameCustomController.BroadcastCustomSync(); if (containerRotator != null) { containerRotator.ResetObject(); } initialized = true; }