public override void Init() { base.Init(); List <DaMoGu> dataList = DataReader <DaMoGu> .DataList; this.mushroomHitConfig = dataList.get_Item(0); }
protected override void InitUI() { base.InitUI(); this.m_BtnExit = base.FindTransform("BtnExit").GetComponent <ButtonCustom>(); this.m_BtnExit.onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnClickBtnExit); this.m_SecondImage = base.FindTransform("SecondImage").GetComponent <Image>(); this.m_SecondTenImage = base.FindTransform("Second10Image").GetComponent <Image>(); this.m_ComboControl = base.FindTransform("ComboNumRoot").GetComponent <ComboControl>(); this.m_ComboControl.AwakeSelf(); this.m_ComboControl.SetFontStr("mogu_font30", string.Empty); this.m_TextScore = base.FindTransform("TextScore").GetComponent <Text>(); this.m_SpineRoot = base.FindTransform("FXRoot"); Transform transform = base.FindTransform("PanelHoles"); for (int i = 0; i < transform.get_childCount(); i++) { Transform child = transform.GetChild(i); string text = child.get_name().Substring("Hole".get_Length()); int num = int.Parse(text); GameObject instantiate2Prefab = ResourceManager.GetInstantiate2Prefab("MushroomHitItem"); instantiate2Prefab.get_transform().SetParent(child.get_transform(), false); instantiate2Prefab.set_name("MushroomHitItem" + num); instantiate2Prefab.SetActive(true); instantiate2Prefab.GetComponent <MushroomHitItem>().InitMushroomItem(i, new MushroomHitItem.BoolMushroomDelegate(this.CheckMushroomCanHit), new MushroomHitItem.VoidMushroomDelegate(this.OnMushroomHit), new MushroomHitItem.VoidMushroomDelegate(this.OnMushroomWilt), new MushroomHitItem.VoidMushroomDelegate(this.OnMushroomBeforeExplode), new MushroomHitItem.VoidMushroomDelegate(this.OnMushroomAfterExplode)); this.m_HoleList.Add(num, instantiate2Prefab.get_transform()); this.m_MushroomPlantList.Add(num, false); } DaMoGu mushroomHitConfig = MushroomHitManager.Instance.mushroomHitConfig; this.defaultTime = (float)mushroomHitConfig.gameTimes; this.comboMissTime = (float)mushroomHitConfig.comboMiss; this.comboScoreTimes = mushroomHitConfig.comboTimes; this.comboMushroomTimes = mushroomHitConfig.comboMushroom; this.comboScoreNum = mushroomHitConfig.comboNum; this.mushroomAddTime = mushroomHitConfig.mushroomAddTime; }