protected override void Awake() { base.Awake(); addScriptDelegate = new NewbieGuideScriptControl.AddScriptDelegate(NewbieGuideSctiptFactory.AddScript); DebugHelper.Assert(addScriptDelegate != null); this.mCompleteCacheDic = new Dictionary <uint, bool>(); this.mWeakCompleteCacheDic = new Dictionary <uint, bool>(); this.mSingleBattleCompleteCacheDic = new List <uint>(); List <uint> mainLineIDList = Singleton <NewbieGuideDataManager> .GetInstance().GetMainLineIDList(); int count = mainLineIDList.Count; for (int i = 0; i < count; i++) { this.mCompleteCacheDic.Add(mainLineIDList[i], false); } List <uint> weakMianLineIDList = Singleton <NewbieGuideDataManager> .GetInstance().GetWeakMianLineIDList(); count = weakMianLineIDList.Count; for (int j = 0; j < count; j++) { this.mWeakCompleteCacheDic.Add(weakMianLineIDList[j], false); } this.newbieGuideEnable = true; this.bTimeOutSkip = true; this.Initialize(); }
private void DestroyCurrentScriptControl() { this.mCurrentScriptControl.CompleteEvent -= new NewbieGuideScriptControl.NewbieGuideScriptControlDelegate(this.NewbieGuideCompleteHandler); this.mCurrentScriptControl.SaveEvent -= new NewbieGuideScriptControl.NewbieGuideScriptControlDelegate(this.NewbieGuideSaveHandler); this.mCurrentScriptControl.addScriptDelegate = null; UnityEngine.Object.Destroy(this.mCurrentScriptControl); this.mCurrentScriptControl = null; this.mCurrentNewbieGuideId = 0; }
private void TriggerNewbieGuide(NewbieGuideMainLineConf conf, int startIndex) { if (Singleton <NetworkModule> .GetInstance().lobbySvr.connected || (conf.bIndependentNet == 1)) { this.SetCurrentNewbieGuideId(conf.dwID); this.mCurrentScriptControl = base.gameObject.AddComponent <NewbieGuideScriptControl>(); this.mCurrentScriptControl.CompleteEvent += new NewbieGuideScriptControl.NewbieGuideScriptControlDelegate(this.NewbieGuideCompleteHandler); this.mCurrentScriptControl.SaveEvent += new NewbieGuideScriptControl.NewbieGuideScriptControlDelegate(this.NewbieGuideSaveHandler); this.mCurrentScriptControl.SetData(conf.dwID, startIndex); this.mCurrentScriptControl.addScriptDelegate = addScriptDelegate; } }