Example #1
0
        private void onDragon_Born(ActorRoot actor)
        {
            DragonNode node = this.getDragonNode(actor.ObjID, actor.ActorControl.GetActorSubSoliderType());

            DebugHelper.Assert(node != null, "onDragon_Born node == null, check out...");
            if (node != null)
            {
                node.SetData(actor.gameObject.transform.position, actor.ActorControl.GetActorSubSoliderType(), actor.ObjID, this.m_b5v5);
                node.ShowDead(actor.ActorControl.IsDeadState);
                switch (actor.ActorControl.GetActorSubSoliderType())
                {
                case 8:
                case 9:
                case 13:
                {
                    bool flag = Singleton <CBattleSystem> .instance.GetMinimapSys().CurMapType() == MinimapSys.EMapType.Mini;

                    if (flag)
                    {
                        TowerHit._play_effect("Prefab_Skill_Effects/tongyong_effects/Indicator/blin_01_c.prefab", 3f, !flag ? node.node_in_bigMap : node.node_in_smallMap);
                    }
                    Singleton <CSoundManager> .GetInstance().PlayBattleSound("Play_BaoJun_VO_Anger", null);

                    MiniMapSysUT.RefreshMapPointerBig(node.node_in_bigMap);
                    break;
                }
                }
            }
        }
Example #2
0
        public void Init(GameObject mmNode_ugui, GameObject bmNode_ugui, GameObject mmNode_3dui, GameObject bmNode_3dui, bool b5V5)
        {
            this.m_b5v5 = b5V5;
            Singleton <EventRouter> .GetInstance().AddEventHandler <ActorRoot>("Dragon_born", new Action <ActorRoot>(this.onDragon_Born));

            Singleton <EventRouter> .GetInstance().AddEventHandler <ActorRoot>("Dragon_dead", new Action <ActorRoot>(this.onDragon_Dead));

            Singleton <GameEventSys> .instance.AddEventHandler <NextSpawnGroupsParam>(GameEventDef.Event_NextSpawnGroups, new RefAction <NextSpawnGroupsParam>(this.OnNextSpawnGroups));

            for (int i = 0; i < mmNode_ugui.transform.childCount; i++)
            {
                mmNode_ugui.transform.GetChild(i).gameObject.CustomSetActive(false);
            }
            for (int j = 0; j < bmNode_ugui.transform.childCount; j++)
            {
                bmNode_ugui.transform.GetChild(j).gameObject.CustomSetActive(false);
            }
            for (int k = 0; k < mmNode_3dui.transform.childCount; k++)
            {
                mmNode_3dui.transform.GetChild(k).gameObject.CustomSetActive(false);
            }
            for (int l = 0; l < bmNode_3dui.transform.childCount; l++)
            {
                bmNode_3dui.transform.GetChild(l).gameObject.CustomSetActive(false);
            }
            this.node_ary.Add(new DragonIcon.DragonNode(mmNode_ugui, bmNode_ugui, mmNode_3dui, bmNode_3dui, "d_3", 7, 0));
            this.node_ary.Add(new DragonIcon.DragonNode(mmNode_ugui, bmNode_ugui, mmNode_3dui, bmNode_3dui, "d_5_big", 8, 0));
            this.node_ary.Add(new DragonIcon.DragonNode(mmNode_ugui, bmNode_ugui, mmNode_3dui, bmNode_3dui, "d_5_small_1", 9, 13));
            this.node_ary.Add(new DragonIcon.DragonNode(mmNode_ugui, bmNode_ugui, mmNode_3dui, bmNode_3dui, "d_5_small_2", 9, 13));
            ListView <SpawnGroup> spawnGroups = Singleton <BattleLogic> .instance.mapLogic.GetSpawnGroups();

            if (spawnGroups != null)
            {
                for (int m = 0; m < spawnGroups.Count; m++)
                {
                    SpawnGroup spawnGroup = spawnGroups[m];
                    if (spawnGroup != null)
                    {
                        ActorMeta         actorMeta = spawnGroup.TheActorsMeta[0];
                        ResMonsterCfgInfo dataCfgInfoByCurLevelDiff = MonsterDataHelper.GetDataCfgInfoByCurLevelDiff(actorMeta.ConfigId);
                        if (dataCfgInfoByCurLevelDiff != null)
                        {
                            bool flag = dataCfgInfoByCurLevelDiff.bSoldierType == 8 || dataCfgInfoByCurLevelDiff.bSoldierType == 9 || dataCfgInfoByCurLevelDiff.bSoldierType == 7 || dataCfgInfoByCurLevelDiff.bSoldierType == 13;
                            if (flag && !spawnGroup.bTriggerSpawn)
                            {
                                DragonIcon.DragonNode dragonNode = this.getDragonNode(dataCfgInfoByCurLevelDiff.bSoldierType);
                                if (dragonNode != null)
                                {
                                    dragonNode.spawnGroup = spawnGroup;
                                    dragonNode.SetData(spawnGroup.gameObject.transform.position, (int)dataCfgInfoByCurLevelDiff.bSoldierType, 0u, this.m_b5v5, true, true, true);
                                    dragonNode.ShowDead(true);
                                    MiniMapSysUT.RefreshMapPointerBig(dragonNode.bmDragonNode_3dui);
                                }
                            }
                        }
                    }
                }
            }
            this.m_cdTimer = Singleton <CTimerManager> .GetInstance().AddTimer(1000, 0, new CTimer.OnTimeUpHandler(this.OnCDTimer));
        }
Example #3
0
        private void onDragon_Born(ActorRoot actor)
        {
            DragonNode node = this.getDragonNode(actor.ObjID, actor.ActorControl.GetActorSubSoliderType());

            DebugHelper.Assert(node != null, "onDragon_Born node == null, check out...");
            if (node != null)
            {
                node.SetData(actor.gameObject.transform.position, actor.ActorControl.GetActorSubSoliderType(), actor.ObjID, this.m_b5v5);
                node.ShowDead(actor.ActorControl.IsDeadState);
                byte actorSubSoliderType = actor.ActorControl.GetActorSubSoliderType();
                if (((actorSubSoliderType == 8) || (actorSubSoliderType == 9)) || (actorSubSoliderType == 13))
                {
                    MinimapSys theMinimapSys = Singleton <CBattleSystem> .GetInstance().TheMinimapSys;

                    bool flag = (theMinimapSys != null) && (theMinimapSys.CurMapType() == MinimapSys.EMapType.Mini);
                    if (flag)
                    {
                        TowerHit._play_effect("Prefab_Skill_Effects/tongyong_effects/Indicator/blin_01_c.prefab", 3f, !flag ? node.node_in_bigMap : node.node_in_smallMap);
                    }
                    switch (actorSubSoliderType)
                    {
                    case 7:
                        MiniMapSysUT.SetMapElement_EventParam(node.node_in_bigMap, false, MinimapSys.ElementType.Dragon_3, actor.ObjID, 0);
                        break;

                    case 8:
                        MiniMapSysUT.SetMapElement_EventParam(node.node_in_bigMap, false, MinimapSys.ElementType.Dragon_5_big, actor.ObjID, 0);
                        break;

                    case 9:
                        MiniMapSysUT.SetMapElement_EventParam(node.node_in_bigMap, false, MinimapSys.ElementType.Dragon_5_small, actor.ObjID, 0);
                        break;
                    }
                    MiniMapSysUT.RefreshMapPointerBig(node.node_in_bigMap);
                }
                switch (actorSubSoliderType)
                {
                case 8:
                    Singleton <CSoundManager> .GetInstance().PlayBattleSound2D("Play_DaLong_VO_Refresh");

                    break;

                case 9:
                    Singleton <CSoundManager> .GetInstance().PlayBattleSound2D("Play_XiaoLong_VO_Refresh");

                    break;

                default:
                    Singleton <CSoundManager> .GetInstance().PlayBattleSound2D("Play_BaoJun_VO_Anger");

                    break;
                }
            }
        }
Example #4
0
        public void Init(GameObject node, GameObject bigNode, bool b5V5)
        {
            this.m_b5v5 = b5V5;
            Singleton <EventRouter> .GetInstance().AddEventHandler <ActorRoot>("Dragon_born", new Action <ActorRoot>(this.onDragon_Born));

            Singleton <EventRouter> .GetInstance().AddEventHandler <ActorRoot>("Dragon_dead", new Action <ActorRoot>(this.onDragon_Dead));

            for (int i = 0; i < node.transform.childCount; i++)
            {
                node.transform.GetChild(i).gameObject.CustomSetActive(false);
            }
            for (int j = 0; j < bigNode.transform.childCount; j++)
            {
                bigNode.transform.GetChild(j).gameObject.CustomSetActive(false);
            }
            this.node_ary.Add(new DragonNode(node, bigNode, "d_3", 7, 0));
            this.node_ary.Add(new DragonNode(node, bigNode, "d_5_big", 8, 0));
            this.node_ary.Add(new DragonNode(node, bigNode, "d_5_small_1", 9, 13));
            this.node_ary.Add(new DragonNode(node, bigNode, "d_5_small_2", 9, 13));
            SpawnGroup            group       = null;
            ListView <SpawnGroup> spawnGroups = Singleton <BattleLogic> .instance.mapLogic.GetSpawnGroups();

            if (spawnGroups != null)
            {
                for (int k = 0; k < spawnGroups.Count; k++)
                {
                    group = spawnGroups[k];
                    if ((group != null) && (group.NextGroups.Length == 0))
                    {
                        ActorMeta         meta = group.TheActorsMeta[0];
                        ResMonsterCfgInfo dataCfgInfoByCurLevelDiff = MonsterDataHelper.GetDataCfgInfoByCurLevelDiff(meta.ConfigId);
                        if ((dataCfgInfoByCurLevelDiff != null) && ((((dataCfgInfoByCurLevelDiff.bSoldierType == 8) || (dataCfgInfoByCurLevelDiff.bSoldierType == 9)) || (dataCfgInfoByCurLevelDiff.bSoldierType == 7)) || (dataCfgInfoByCurLevelDiff.bSoldierType == 13)))
                        {
                            DragonNode node2 = this.getDragonNode(dataCfgInfoByCurLevelDiff.bSoldierType);
                            if (node2 != null)
                            {
                                node2.spawnGroup = group;
                                node2.SetData(group.gameObject.transform.position, dataCfgInfoByCurLevelDiff.bSoldierType, 0, this.m_b5v5);
                                node2.ShowDead(true);
                                MiniMapSysUT.RefreshMapPointerBig(node2.node_in_bigMap);
                            }
                        }
                    }
                }
            }
            if (Singleton <WatchController> .GetInstance().IsWatching)
            {
                this.m_cdTimer = Singleton <CTimerManager> .GetInstance().AddTimer(0x3e8, 0, new CTimer.OnTimeUpHandler(this.OnCDTimer));
            }
        }
Example #5
0
        public void RefreshDragNode(bool bUseCache, bool bRefreshMM = false)
        {
            ListView <SpawnGroup> spawnGroups = Singleton <BattleLogic> .get_instance().mapLogic.GetSpawnGroups();

            if (spawnGroups != null)
            {
                for (int i = 0; i < spawnGroups.get_Count(); i++)
                {
                    SpawnGroup spawnGroup = spawnGroups.get_Item(i);
                    if (spawnGroup != null && spawnGroup.NextGroups.Length == 0)
                    {
                        ActorMeta         actorMeta = spawnGroup.TheActorsMeta[0];
                        ResMonsterCfgInfo dataCfgInfoByCurLevelDiff = MonsterDataHelper.GetDataCfgInfoByCurLevelDiff(actorMeta.ConfigId);
                        if (dataCfgInfoByCurLevelDiff != null)
                        {
                            bool flag = dataCfgInfoByCurLevelDiff.bSoldierType == 8 || dataCfgInfoByCurLevelDiff.bSoldierType == 9 || dataCfgInfoByCurLevelDiff.bSoldierType == 7 || dataCfgInfoByCurLevelDiff.bSoldierType == 13;
                            if (flag)
                            {
                                DragonIcon.DragonNode dragonNode = this.getDragonNode(dataCfgInfoByCurLevelDiff.bSoldierType);
                                if (dragonNode != null)
                                {
                                    dragonNode.spawnGroup = spawnGroup;
                                    dragonNode.SetData(spawnGroup.gameObject.transform.position, (int)dataCfgInfoByCurLevelDiff.bSoldierType, dragonNode.objid, this.m_b5v5, bUseCache, false, bRefreshMM);
                                    if (dragonNode.objid != 0u)
                                    {
                                        PoolObjHandle <ActorRoot> actor = Singleton <GameObjMgr> .GetInstance().GetActor(dragonNode.objid);

                                        if (actor)
                                        {
                                            dragonNode.ShowDead(actor.get_handle().ActorControl.IsDeadState);
                                        }
                                        else
                                        {
                                            dragonNode.ShowDead(true);
                                        }
                                    }
                                    else
                                    {
                                        dragonNode.ShowDead(true);
                                    }
                                    MiniMapSysUT.RefreshMapPointerBig(dragonNode.bmDragonNode_3dui);
                                }
                            }
                        }
                    }
                }
            }
        }