1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- using UnityEngine;
- using FairyGUI;
- using UI.OpenServerActivity;
- using UI.CommonGame;
- using System.Collections.Generic;
- namespace GFGGame
- {
- public class OpenServerStoryView : BaseWindow
- {
- private UI_OpenServerStoryUI _ui;
- private int itemIndex = 0;
- private List<StoryLevelCfg> _storyLevelCfgs;
- private ActivityFightCfg _activityFightCfg;
- private int _activityId;
- private int _activityType;
- private ActivityOpenCfg _activityCfg;
- public override void Dispose()
- {
- if (_ui != null)
- {
- _ui.Dispose();
- _ui = null;
- }
- base.Dispose();
- }
- protected override void Init()
- {
- base.Init();
- }
- protected override void OnInit()
- {
- base.OnInit();
- packageName = UI_OpenServerStoryUI.PACKAGE_NAME;
- _ui = UI_OpenServerStoryUI.Create();
- viewCom = _ui.target;
- isfullScreen = true;
- isReturnView = true;
- _ui.m_btnBack.onClick.Add(OnClickBtnBack);
- }
- protected override void AddEventListener()
- {
- base.AddEventListener();
- }
- protected override void OnShown()
- {
- base.OnShown();
- _activityType = (int)this.viewData;
- StudioDataManager.Instance.VIEW_NAME = typeof(OpenServerStoryView).FullName;
- StudioDataManager.Instance.PROPERTY_SELECT_INDEX = _activityType;
- _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("kfhd_sdcy_bg");
- _activityId = ActivityDataManager.Instance.GetCurOpenActiveByType(_activityType);
- _activityCfg = ActivityOpenCfgArray.Instance.GetCfg(_activityId);
- _activityFightCfg = ActivityFightCfgArray.Instance.GetCfg(_activityCfg.params3Arr[0]);
- _storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(_activityFightCfg.type, _activityFightCfg.subType, _activityCfg.params3Arr[0]);
- }
- protected override void OnHide()
- {
- base.OnHide();
- }
- protected override void RemoveEventListener()
- {
- base.RemoveEventListener();
- }
- private void OnClickBtnBack()
- {
- ViewManager.GoBackFrom(typeof(OpenServerStoryView).FullName);
- }
- }
- }
|