12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- using System;
- using System.Collections.Generic;
- using ET;
- using FairyGUI;
- using UI.MiniGame;
- using UnityEngine;
- namespace GFGGame
- {
- public class GameStartView : BaseView
- {
- private UI_GameStartUI _ui;
- //后续这里改成读表内容
- private List<string> name = new List<string>() { "翻牌", "2048" };
- private List<string> viewName = new List<string>() { "FlipGameView", "TZFEGameView" };
- private List<string> CustemsDesc = new List<string>()
- {
- "首次评价达到卓越奖励:",
- "首次评价达到优秀奖励:",
- "首次评价达到良好奖励:",
- };
- private int currentGame = 0;
- public override void Dispose()
- {
- if (_ui != null)
- {
- _ui.Dispose();
- _ui = null;
- }
- base.Dispose();
- }
- protected override void OnInit()
- {
- base.OnInit();
- packageName = UI_GameStartUI.PACKAGE_NAME;
- _ui = UI_GameStartUI.Create();
- this.viewCom = _ui.target;
- isfullScreen = true;
- _ui.m_game1.onClick.Add(OnClickBtnGameOne);
- _ui.m_game2.onClick.Add(OnClickBtnGameTwo);
- _ui.m_btnBack.onClick.Add(OnClickBtnBack);
- _ui.m_shopBtn.onClick.Add(OnClickBtnShop);
- _ui.m_addIcon.onClick.Add(OnClickBtnAdd);
- _ui.m_rewardBtn.onClick.Add(OnClickBtnReward);
- }
- protected override void OnShown()
- {
- base.OnShown();
- }
- protected override void OnHide()
- {
- base.OnHide();
- }
- private void UpdateView()
- {
- _ui.m_ticketNum.text = "999";
- _ui.m_game1name.text = name[0];
- _ui.m_game2name.text = name[1];
- }
- private void OnClickBtnBack()
- {
- this.Hide();
- }
- private void OnClickBtnShop()
- {
- ViewManager.Show<StoreView>(new object[] { ConstStoreTabId.STORE_EXCHANGE, ConstStoreSubId.STORE_ACTIVITY_EXCHANGE });
- }
- private void OnClickBtnReward()
- {
- ViewManager.Show<ChallengeRewardView>(new object[] { new List<int>() { 0,1 } });
- }
- private void OnClickBtnAdd()
- {
- }
- private void OnClickBtnGameOne()
- {
- ViewManager.Show($"GFGGame.{viewName[0]}");
- this.Hide();
- }
- private void OnClickBtnGameTwo()
- {
- ViewManager.Show($"GFGGame.{viewName[1]}");
- this.Hide();
- }
- }
- }
|