public void StartMatch(VisualPlayer v_player = null, VisualMinion v_minion = null, int visualBoardHeight = 0, MatchUI matchUI = null) { V_Player = v_player; V_Minion = v_minion; VisualBoardHeight = visualBoardHeight; if (Visual) { // UI MatchUI = matchUI; MatchUI.Match = this; MatchUI.UpdatePlayerBar(); MatchUI.UpdateTurnText(); if (MatchType == MatchType.AI_vs_AI) { MatchUI.UpdatePlayerGenomes(); } // Summon Players Player1.Visual = GameObject.Instantiate(V_Player, new Vector3(0, 0, -(VisualBoardHeight / 2)), Quaternion.identity); Player2.Visual = GameObject.Instantiate(V_Player, new Vector3(0, 0, VisualBoardHeight / 2), Quaternion.identity); Player1.Color = PlayerColor; Player2.Color = PlayerColor; VisualActions.Add(new VA_SummonPlayer(Player1.Visual, PlayerColor)); VisualActions.Add(new VA_SummonPlayer(Player2.Visual, PlayerColor)); } // Let's go Phase = MatchPhase.GameReady; }
public VA_ShowChosenCards(Player player, Card card, MatchUI matchUI) { Frames = DefaultFrames * 1.5f; Player = player; Card = card; MatchUI = matchUI; }
private static MatchUI instance; // 인스턴스 private void Start() { if (serverManager.GetInstance() != null) { SetNickName(); } instance = this; }
public void OpenMatchUI(int coolDown = 30) { MatchUI matchUI = UIManagerControl.Instance.OpenUI("MatchUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush) as MatchUI; matchUI.SetData(coolDown, true, delegate { }); }
public VA_IncreaseCardOption(VisualEntity visual, MatchUI UI) { Frames = DefaultFrames * 1.5f; Visual = visual; ParticleSystem = GameObject.Instantiate(UI.PS_CardOptionIncrease, visual.transform.position, Quaternion.identity); var main = ParticleSystem.main; main.duration = Frames; ParticleSystem.Play(); }
private void OnTeamAotoMatch(bool arg1) { if (!arg1) { MatchUI matchUI = TeamManager.Instance.OpenMatchUI(); matchUI.Title.set_text(GameDataUtils.GetChineseContent(513632, false)); matchUI.ButtonText.set_text(GameDataUtils.GetChineseContent(513637, false)); ResourceManager.SetSprite(matchUI.TipsImage, ResourceManager.GetIconSprite("zhengzaiqianwangmudidi")); matchUI.time = 9999; } }
public MatchUI OpenMatchUI() { MatchUI matchUI = null; if (!this.isQuick) { this.isMatching = true; matchUI = (UIManagerControl.Instance.OpenUI("MatchUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush) as MatchUI); matchUI.SetDataCanle((int)(float.Parse(DataReader <MultiCopy> .Get("match_2_time").value + 5000) * 0.001f), true, delegate { this.SendCancelAutoMatchReq(); }, new Action(this.MatchEnd)); } return(matchUI); }
IEnumerator _Goto() { _isSwitching = true; if (GetNeedLoadingMask()) { LoadingMask.StartLoading(); yield return(new WaitForSeconds(LoadingMask.Instance.TimeToUnload)); } BaseUI newUI = null; switch (_targetUIState) { case UIStateName.Entrance: newUI = EntranceUI.EnterStage(); break; case UIStateName.Menu: newUI = MenuUI.EnterStage(); break; case UIStateName.Match: newUI = MatchUI.EnterStage(); break; case UIStateName.Game: newUI = GameUI.EnterStage(); break; case UIStateName.PushLevel: newUI = PushLevelUI.EnterStage(); break; case UIStateName.EndRound: newUI = EndRoundUI.EnterStage(); break; default: Debug.LogError("ERROR uiState:" + _targetUIState); break; } switch (_targetUIState) { case UIStateName.Entrance: var sr = Background.GetComponent <SpriteRenderer>(); sr.sprite = SprSplash; break; case UIStateName.PushLevel: //Background.gameObject.SetActive(false); break; default: //Background.gameObject.SetActive(true); sr = Background.GetComponent <SpriteRenderer>(); sr.sprite = SprBg; break; } if (!newUI) { Debug.LogError("GotoUI却没有成功创建UI:" + _targetUIState); } for (int i = 0; i < _baseUIs.Length; i++) { if (i == (int)_targetUIState) { _baseUIs[i] = newUI; } else { if (_baseUIs[i]) { _baseUIs[i].OffStage(); _baseUIs[i] = null; Resources.UnloadUnusedAssets(); } } } LoadingMask.EndLoading(); _isSwitching = false; }
void Awake( ) { instance = this; }
// Use this for initialization void Start() { singleton = this; }
void Awake() { Instance = this; }