예제 #1
0
        public static Vector3 Set3DUIWorldPos_ByScreenPoint(ref Vector3 worldPos, bool bMiniMap)
        {
            float num;
            float num2;

            return(MiniMapSysUT.Set3DUIWorldPos_ByScreenPoint(ref worldPos, bMiniMap, out num, out num2));
        }
예제 #2
0
        public static void SetMapElement_EventParam(UI3DEventCom evtCom, bool bAlien, MinimapSys.ElementType type, uint objID = 0u, uint targetHeroID = 0u)
        {
            if (evtCom == null || type == MinimapSys.ElementType.None)
            {
                return;
            }
            stUIEventParams eventParams = default(stUIEventParams);

            eventParams.tag     = ((!bAlien) ? 0 : 1);
            eventParams.tag2    = (int)type;
            eventParams.tagUInt = objID;
            eventParams.heroId  = targetHeroID;
            if (type == MinimapSys.ElementType.Dragon_3 || type == MinimapSys.ElementType.Dragon_5_big || type == MinimapSys.ElementType.Dragon_5_small)
            {
                eventParams.tag3 = 2;
            }
            else if (type == MinimapSys.ElementType.Tower || type == MinimapSys.ElementType.Base)
            {
                eventParams.tag3 = ((!bAlien) ? 2 : 3);
            }
            else if (type == MinimapSys.ElementType.Hero)
            {
                eventParams.tag3 = ((!bAlien) ? 2 : 5);
            }
            evtCom.m_eventID     = MiniMapSysUT.GetEventId(type);
            evtCom.m_eventParams = eventParams;
        }
예제 #3
0
 public void SetData(Vector3 worldpos, int type, uint id, bool b5v5 = false, bool bUseCache = true, bool bRefreshCache = false, bool bRefreshMM = true)
 {
     if (this.mmDragonNode_3dui != null && bRefreshMM)
     {
         if (this.mmDragonNode_ugui != null)
         {
             RectTransform rectTransform = this.mmDragonNode_ugui.transform as RectTransform;
             rectTransform.anchoredPosition = new Vector2(worldpos.x * Singleton <CBattleSystem> .instance.world_UI_Factor_Small.x, worldpos.z * Singleton <CBattleSystem> .instance.world_UI_Factor_Small.y);
         }
         Vector3 position = MiniMapSysUT.Set3DUIWorldPos_ByScreenPoint(ref worldpos, true);
         this.mmDragonNode_3dui.transform.position = position;
     }
     if (this.bmDragonNode_3dui != null)
     {
         if (this.bmDragonNode_ugui != null)
         {
             RectTransform rectTransform2 = this.bmDragonNode_ugui.transform as RectTransform;
             rectTransform2.anchoredPosition = new Vector2(worldpos.x * Singleton <CBattleSystem> .instance.world_UI_Factor_Big.x, worldpos.z * Singleton <CBattleSystem> .instance.world_UI_Factor_Big.y);
         }
         if (bUseCache)
         {
             if (this.cachePos == Vector3.zero || bRefreshCache)
             {
                 this.cachePos = MiniMapSysUT.Set3DUIWorldPos_ByScreenPoint(ref worldpos, false);
             }
             this.bmDragonNode_3dui.transform.position = this.cachePos;
         }
         else
         {
             this.bmDragonNode_3dui.transform.position = MiniMapSysUT.Set3DUIWorldPos_ByScreenPoint(ref worldpos, false);
         }
     }
     this.objid = id;
 }
예제 #4
0
 public void _init(GameObject mmDNode_ugui, GameObject bmDNode_ugui, GameObject mmDNode_3dui, GameObject bmDNode_3dui, byte type, byte optType)
 {
     this.mmDragonNode_ugui = mmDNode_ugui;
     this.bmDragonNode_ugui = bmDNode_ugui;
     this.type                      = type;
     this.optType                   = optType;
     this.mmDragonNode_3dui         = mmDNode_3dui;
     this.dragon_live_icon_smallMap = this.mmDragonNode_3dui.transform.Find("live").gameObject;
     this.dragon_dead_icon_smallMap = this.mmDragonNode_3dui.transform.Find("dead").gameObject;
     this.cdTxtInMini               = Utility.GetComponetInChild <Text>(mmDNode_ugui, "cdTxt");
     this.bmDragonNode_3dui         = bmDNode_3dui;
     this.dragon_live_icon_bigMap   = this.bmDragonNode_3dui.transform.Find("live").gameObject;
     this.dragon_dead_icon_bigMap   = this.bmDragonNode_3dui.transform.Find("dead").gameObject;
     this.cdTxtInBig                = Utility.GetComponetInChild <Text>(bmDNode_ugui, "cdTxt");
     if (type == 7)
     {
         MiniMapSysUT.SetMapElement_EventParam(bmDNode_ugui, false, MinimapSys.ElementType.Dragon_3, 0u, 0u);
     }
     else if (type == 8)
     {
         MiniMapSysUT.SetMapElement_EventParam(bmDNode_ugui, false, MinimapSys.ElementType.Dragon_5_big, 0u, 0u);
     }
     else if (type == 9)
     {
         MiniMapSysUT.SetMapElement_EventParam(bmDNode_ugui, false, MinimapSys.ElementType.Dragon_5_small, 0u, 0u);
     }
 }
예제 #5
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));
        }
        public static void SetMapElement_EventParam(GameObject obj, bool bAlien, MinimapSys.ElementType type, uint objID = 0u, uint targetHeroID = 0u)
        {
            if (obj == null || type == MinimapSys.ElementType.None)
            {
                return;
            }
            CUIEventScript component = obj.GetComponent <CUIEventScript>();

            if (component != null)
            {
                MiniMapSysUT.SetMapElement_EventParam(component, bAlien, type, objID, targetHeroID);
            }
        }
            public Element(string eftName, float time, PoolObjHandle <ActorRoot> relatedActor)
            {
                if (!relatedActor)
                {
                    return;
                }
                bool bMiniMap = Singleton <CBattleSystem> .instance.TheMinimapSys.CurMapType() == MinimapSys.EMapType.Mini;

                this.m_signalRelatedActor = relatedActor;
                Vector3 vector   = (Vector3)this.m_signalRelatedActor.handle.location;
                Vector2 sreenLoc = MiniMapSysUT.CalcScreenPosInMapByWorldPos(ref vector, bMiniMap);

                this.uiParticleInfo = Singleton <CUIParticleSystem> .instance.AddParticle(eftName, time, sreenLoc, default(Quaternion?));
            }
예제 #8
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);
                                }
                            }
                        }
                    }
                }
            }
        }
            public void Update(float deltaTime)
            {
                if (!this.m_signalRelatedActor)
                {
                    return;
                }
                Vector3 vector   = (Vector3)this.m_signalRelatedActor.handle.location;
                bool    bMiniMap = Singleton <CBattleSystem> .instance.TheMinimapSys.CurMapType() == MinimapSys.EMapType.Mini;

                Vector2 vector2 = MiniMapSysUT.CalcScreenPosInMapByWorldPos(ref vector, bMiniMap);

                if (this.uiParticleInfo != null && this.uiParticleInfo.parObj != null)
                {
                    Singleton <CUIParticleSystem> .GetInstance().SetParticleScreenPosition(this.uiParticleInfo, ref vector2);
                }
            }
예제 #10
0
        public static GameObject GetHeroIconObj(string path, bool bMiniMap, bool bSelf, bool bSameCamp)
        {
            MinimapSys theMinimapSys = Singleton <CBattleSystem> .GetInstance().TheMinimapSys;

            if (theMinimapSys == null)
            {
                return(null);
            }
            GameObject gameObject;

            if (bMiniMap)
            {
                if (bSelf)
                {
                    gameObject = theMinimapSys.mmHeroIconNode_Self;
                }
                else
                {
                    gameObject = ((!bSameCamp) ? theMinimapSys.mmHeroIconNode_Enemy : theMinimapSys.mmHeroIconNode_Friend);
                }
            }
            else if (bSelf)
            {
                gameObject = theMinimapSys.bmHeroIconNode_Self;
            }
            else
            {
                gameObject = ((!bSameCamp) ? theMinimapSys.bmHeroIconNode_Enemy : theMinimapSys.bmHeroIconNode_Friend);
            }
            GameObject gameObject2 = Singleton <CGameObjectPool> .GetInstance().GetGameObject(path, 5);

            if (gameObject2 != null)
            {
                if (gameObject != null)
                {
                    gameObject2.transform.SetParent(gameObject.transform, true);
                }
                gameObject2.transform.localScale    = Vector3.one;
                gameObject2.transform.localRotation = Quaternion.identity;
                float num = (!bMiniMap) ? (40f * Sprite3D.Ratio()) : (20f * Sprite3D.Ratio());
                MiniMapSysUT.NativeSizeLize(gameObject2, num, num);
                Singleton <Camera_UI3D> .get_instance().GetCurrentCanvas().RefreshLayout(null);
            }
            return(gameObject2);
        }
        public static GameObject GetMapTrackObj(string prefabPath, bool bMiniMap)
        {
            MinimapSys theMinimapSys = Singleton <CBattleSystem> .GetInstance().TheMinimapSys;

            if (theMinimapSys == null)
            {
                return(null);
            }
            GameObject gameObject  = bMiniMap ? theMinimapSys.mmpcTrack : theMinimapSys.bmpcTrack;
            GameObject gameObject2 = Singleton <CGameObjectPool> .GetInstance().GetGameObject(prefabPath, enResourceType.BattleScene);

            if (gameObject2 != null)
            {
                if (gameObject != null)
                {
                    gameObject2.transform.SetParent(gameObject.transform, true);
                }
                float num = bMiniMap ? 0.7f : 1f;
                gameObject2.transform.localScale    = new Vector3(num, num, 1f);
                gameObject2.transform.localRotation = Quaternion.identity;
                MiniMapSysUT.NativeSizeLize(gameObject2);
            }
            return(gameObject2);
        }
예제 #12
0
        public static GameObject GetMapGameObject(ActorRoot actor, bool bMiniMap, out UI3DEventCom evtCom)
        {
            evtCom = null;
            float      num           = 1f;
            GameObject gameObject    = null;
            string     text          = string.Empty;
            bool       flag          = actor.IsHostCamp();
            MinimapSys theMinimapSys = Singleton <CBattleSystem> .GetInstance().TheMinimapSys;

            if (theMinimapSys == null)
            {
                return(null);
            }
            if (actor.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero)
            {
                text = ((!flag) ? MiniMapSysUT.Map_HeroEnemy_prefab : MiniMapSysUT.Map_HeroAlice_prefab);
                bool flag2 = actor.TheActorMeta.PlayerId == Singleton <GamePlayerCenter> .GetInstance().HostPlayerId;

                if (flag2)
                {
                    text = MiniMapSysUT.Map_HeroSelf_prefab;
                }
                gameObject = ((!bMiniMap) ? theMinimapSys.bmpcHero : theMinimapSys.mmpcHero);
                if (!bMiniMap)
                {
                    if (evtCom == null)
                    {
                        evtCom = new UI3DEventCom();
                    }
                    MiniMapSysUT.SetEventComScreenSize(evtCom, 40f, 40f, 1f);
                    MiniMapSysUT.SetMapElement_EventParam(evtCom, actor.IsHostCamp(), MinimapSys.ElementType.Hero, actor.ObjID, (uint)actor.TheActorMeta.ConfigId);
                    if (evtCom != null)
                    {
                        theMinimapSys.UI3DEventMgr.Register(evtCom, UI3DEventMgr.EventComType.Hero);
                    }
                }
            }
            else if (actor.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_EYE)
            {
                text       = ((!flag) ? MiniMapSysUT.Map_EyeEnemy_prefab : MiniMapSysUT.Map_EyeAlice_prefab);
                gameObject = ((!bMiniMap) ? theMinimapSys.bmpcEye : theMinimapSys.mmpcEye);
                num        = ((!bMiniMap) ? 1f : 0.5f);
                if (!bMiniMap)
                {
                    if (evtCom == null)
                    {
                        evtCom = new UI3DEventCom();
                    }
                    MiniMapSysUT.SetEventComScreenSize(evtCom, 30f, 18f, 1f);
                    MiniMapSysUT.SetMapElement_EventParam(evtCom, actor.IsHostCamp(), MinimapSys.ElementType.Eye, actor.ObjID, (uint)actor.TheActorMeta.ConfigId);
                    if (evtCom != null)
                    {
                        theMinimapSys.UI3DEventMgr.Register(evtCom, UI3DEventMgr.EventComType.Eye);
                    }
                }
            }
            else if (actor.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Monster)
            {
                byte actorSubType = actor.ActorControl.GetActorSubType();
                if (actorSubType == 2)
                {
                    byte actorSubSoliderType = actor.ActorControl.GetActorSubSoliderType();
                    if (actorSubSoliderType == 8 || actorSubSoliderType == 9 || actorSubSoliderType == 13 || actorSubSoliderType == 7)
                    {
                        return(null);
                    }
                    if (actorSubSoliderType == 11)
                    {
                        text       = MiniMapSysUT.Map_RedBuff_prefab;
                        gameObject = ((!bMiniMap) ? theMinimapSys.bmpcRedBuff : theMinimapSys.mmpcRedBuff);
                        num        = ((!bMiniMap) ? 1f : 0.6f);
                    }
                    else if (actorSubSoliderType == 10)
                    {
                        text       = MiniMapSysUT.Map_BlueBuff_prefab;
                        gameObject = ((!bMiniMap) ? theMinimapSys.bmpcBlueBuff : theMinimapSys.mmpcBlueBuff);
                        num        = ((!bMiniMap) ? 1f : 0.6f);
                    }
                    else
                    {
                        text       = MiniMapSysUT.Map_Jungle_prefab;
                        gameObject = ((!bMiniMap) ? theMinimapSys.bmpcJungle : theMinimapSys.mmpcJungle);
                        num        = ((!bMiniMap) ? 1.3f : 1f);
                    }
                }
                else
                {
                    if (bMiniMap)
                    {
                        gameObject = ((!flag) ? theMinimapSys.mmpcEnemy : theMinimapSys.mmpcAlies);
                    }
                    else
                    {
                        gameObject = ((!flag) ? theMinimapSys.bmpcEnemy : theMinimapSys.bmpcAlies);
                    }
                    text = ((!flag) ? MiniMapSysUT.Map_SoilderEnemy_prefab : MiniMapSysUT.Map_SoilderAlice_prefab);
                    num  = ((!bMiniMap) ? 0.6f : 0.3f);
                }
            }
            else if (actor.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Organ)
            {
                if (actor.TheStaticData.TheOrganOnlyInfo.OrganType == 1 || actor.TheStaticData.TheOrganOnlyInfo.OrganType == 4)
                {
                    text       = ((!flag) ? MiniMapSysUT.Map_OrganEnemy_prefab : MiniMapSysUT.Map_OrganAlice_prefab);
                    gameObject = ((!bMiniMap) ? theMinimapSys.bmpcOrgan : theMinimapSys.mmpcOrgan);
                    num        = ((!bMiniMap) ? 1f : 0.5f);
                    if (!bMiniMap)
                    {
                        if (evtCom == null)
                        {
                            evtCom = new UI3DEventCom();
                        }
                        MiniMapSysUT.SetEventComScreenSize(evtCom, 30f, 32f, 1f);
                        MiniMapSysUT.SetMapElement_EventParam(evtCom, flag, MinimapSys.ElementType.Tower, actor.ObjID, 0u);
                        if (evtCom != null)
                        {
                            theMinimapSys.UI3DEventMgr.Register(evtCom, UI3DEventMgr.EventComType.Tower);
                        }
                        if (flag)
                        {
                            Singleton <CBattleSystem> .GetInstance().TowerHitMgr.Register(actor.ObjID, actor.TheStaticData.TheOrganOnlyInfo.OrganType);
                        }
                    }
                }
                else
                {
                    if (actor.TheStaticData.TheOrganOnlyInfo.OrganType != 2)
                    {
                        return(null);
                    }
                    text       = ((!flag) ? MiniMapSysUT.Map_BaseEnemy_prefab : MiniMapSysUT.Map_BaseAlice_prefab);
                    gameObject = ((!bMiniMap) ? theMinimapSys.bmpcOrgan : theMinimapSys.mmpcOrgan);
                    num        = ((!bMiniMap) ? 1f : 0.5f);
                    if (!bMiniMap)
                    {
                        if (evtCom == null)
                        {
                            evtCom = new UI3DEventCom();
                        }
                        MiniMapSysUT.SetEventComScreenSize(evtCom, 30f, 32f, 1f);
                        MiniMapSysUT.SetMapElement_EventParam(evtCom, flag, MinimapSys.ElementType.Base, actor.ObjID, 0u);
                        if (evtCom != null)
                        {
                            theMinimapSys.UI3DEventMgr.Register(evtCom, UI3DEventMgr.EventComType.Tower);
                        }
                        if (flag)
                        {
                            Singleton <CBattleSystem> .GetInstance().TowerHitMgr.Register(actor.ObjID, actor.TheStaticData.TheOrganOnlyInfo.OrganType);
                        }
                    }
                }
            }
            if (string.IsNullOrEmpty(text))
            {
                return(null);
            }
            GameObject gameObject2 = Singleton <CGameObjectPool> .GetInstance().GetGameObject(text, 0);

            if (gameObject == null)
            {
                return(null);
            }
            if (gameObject2 != null)
            {
                gameObject2.transform.SetParent(gameObject.transform, true);
                gameObject2.transform.localScale    = new Vector3(num, num, 1f);
                gameObject2.transform.localRotation = Quaternion.identity;
                MiniMapSysUT.NativeSizeLize(gameObject2);
            }
            if (actor.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero)
            {
                float num2 = (!bMiniMap) ? (65f * Sprite3D.Ratio()) : (34f * Sprite3D.Ratio());
                MiniMapSysUT.NativeSizeLize(gameObject2, num2, num2);
            }
            return(gameObject2);
        }
        public static GameObject GetMapGameObject(ActorRoot actor, bool bMiniMap, out UI3DEventCom evtCom)
        {
            evtCom = null;
            float      num        = 1f;
            GameObject gameObject = null;
            string     text       = string.Empty;
            bool       flag       = Singleton <WatchController> .GetInstance().IsWatching ? (actor.TheActorMeta.ActorCamp == COM_PLAYERCAMP.COM_PLAYERCAMP_1) : actor.IsHostCamp();

            MinimapSys theMinimapSys = Singleton <CBattleSystem> .GetInstance().TheMinimapSys;

            if (theMinimapSys == null)
            {
                return(null);
            }
            if (actor.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero || actor.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Call)
            {
                if (!flag && actor.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Call)
                {
                    CallActorWrapper callActorWrapper = actor.ActorControl as CallActorWrapper;
                    if (callActorWrapper != null && !callActorWrapper.IsTrueType)
                    {
                        flag = true;
                    }
                }
                text = (flag ? MiniMapSysUT.Map_HeroAlice_prefab : MiniMapSysUT.Map_HeroEnemy_prefab);
                bool flag2 = actor.TheActorMeta.PlayerId == Singleton <GamePlayerCenter> .GetInstance().HostPlayerId;

                if (flag2)
                {
                    text = MiniMapSysUT.Map_HeroSelf_prefab;
                }
                if (bMiniMap)
                {
                    gameObject = (flag ? theMinimapSys.mmpcHeroBgFrame_Friend : theMinimapSys.mmpcHeroBgFrame_Enemy);
                }
                else
                {
                    gameObject = (flag ? theMinimapSys.bmpcHeroBgFrame_Friend : theMinimapSys.bmpcHeroBgFrame_Enemy);
                }
                if (!bMiniMap)
                {
                    evtCom = new UI3DEventCom();
                    MiniMapSysUT.SetEventComScreenSize(evtCom, 40f, 40f, 1f);
                    MiniMapSysUT.SetMapElement_EventParam(evtCom, actor.IsHostCamp(), MinimapSys.ElementType.Hero, actor.ObjID, (uint)actor.TheActorMeta.ConfigId);
                    theMinimapSys.UI3DEventMgr.Register(evtCom, UI3DEventMgr.EventComType.Hero);
                }
            }
            else if (actor.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_EYE)
            {
                text       = (flag ? MiniMapSysUT.Map_EyeAlice_prefab : MiniMapSysUT.Map_EyeEnemy_prefab);
                gameObject = (bMiniMap ? theMinimapSys.mmpcEye : theMinimapSys.bmpcEye);
                num        = (bMiniMap ? 0.5f : 1f);
                if (!bMiniMap)
                {
                    evtCom = new UI3DEventCom();
                    MiniMapSysUT.SetEventComScreenSize(evtCom, 30f, 18f, 1f);
                    MiniMapSysUT.SetMapElement_EventParam(evtCom, actor.IsHostCamp(), MinimapSys.ElementType.Eye, actor.ObjID, (uint)actor.TheActorMeta.ConfigId);
                    theMinimapSys.UI3DEventMgr.Register(evtCom, UI3DEventMgr.EventComType.Eye);
                }
            }
            else if (actor.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Monster)
            {
                byte actorSubType = actor.ActorControl.GetActorSubType();
                if (actorSubType == 2)
                {
                    byte actorSubSoliderType = actor.ActorControl.GetActorSubSoliderType();
                    if (actorSubSoliderType == 8 || actorSubSoliderType == 9 || actorSubSoliderType == 13 || actorSubSoliderType == 7)
                    {
                        return(null);
                    }
                    if (actorSubSoliderType == 11)
                    {
                        text       = MiniMapSysUT.Map_RedBuff_prefab;
                        gameObject = (bMiniMap ? theMinimapSys.mmpcRedBuff : theMinimapSys.bmpcRedBuff);
                        num        = (bMiniMap ? 0.6f : 1f);
                    }
                    else if (actorSubSoliderType == 10)
                    {
                        text       = MiniMapSysUT.Map_BlueBuff_prefab;
                        gameObject = (bMiniMap ? theMinimapSys.mmpcBlueBuff : theMinimapSys.bmpcBlueBuff);
                        num        = (bMiniMap ? 0.6f : 1f);
                    }
                    else
                    {
                        text       = MiniMapSysUT.Map_Jungle_prefab;
                        gameObject = (bMiniMap ? theMinimapSys.mmpcJungle : theMinimapSys.bmpcJungle);
                        num        = (bMiniMap ? 1f : 1.3f);
                    }
                }
                else
                {
                    if (bMiniMap)
                    {
                        gameObject = (flag ? theMinimapSys.mmpcAlies : theMinimapSys.mmpcEnemy);
                    }
                    else
                    {
                        gameObject = (flag ? theMinimapSys.bmpcAlies : theMinimapSys.bmpcEnemy);
                    }
                    text = (flag ? MiniMapSysUT.Map_SoilderAlice_prefab : MiniMapSysUT.Map_SoilderEnemy_prefab);
                    num  = (bMiniMap ? 0.3f : 0.6f);
                    byte actorSubSoliderType2 = actor.ActorControl.GetActorSubSoliderType();
                    if (actorSubSoliderType2 == 16)
                    {
                        text = MiniMapSysUT.Map_Vanguard_prefab;
                        num  = (bMiniMap ? 1f : 1.5f);
                    }
                    if (!bMiniMap)
                    {
                        evtCom = new UI3DEventCom();
                        MiniMapSysUT.SetEventComScreenSize(evtCom, 30f, 18f, 1f);
                        MiniMapSysUT.SetMapElement_EventParam(evtCom, actor.IsHostCamp(), MinimapSys.ElementType.Solider, actor.ObjID, (uint)actor.TheActorMeta.ConfigId);
                        theMinimapSys.UI3DEventMgr.Register(evtCom, UI3DEventMgr.EventComType.Solider);
                    }
                }
            }
            else if (actor.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Organ)
            {
                if (actor.TheStaticData.TheOrganOnlyInfo.OrganType == 1 || actor.TheStaticData.TheOrganOnlyInfo.OrganType == 4)
                {
                    text       = (flag ? MiniMapSysUT.Map_OrganAlice_prefab : MiniMapSysUT.Map_OrganEnemy_prefab);
                    gameObject = (bMiniMap ? theMinimapSys.mmpcOrgan : theMinimapSys.bmpcOrgan);
                    num        = (bMiniMap ? 0.5f : 1f);
                    if (!bMiniMap)
                    {
                        evtCom = new UI3DEventCom();
                        MiniMapSysUT.SetEventComScreenSize(evtCom, 30f, 32f, 1f);
                        MiniMapSysUT.SetMapElement_EventParam(evtCom, flag, MinimapSys.ElementType.Tower, actor.ObjID, 0u);
                        theMinimapSys.UI3DEventMgr.Register(evtCom, UI3DEventMgr.EventComType.Tower);
                        if (flag)
                        {
                            Singleton <CBattleSystem> .GetInstance().TowerHitMgr.Register(actor.ObjID, (RES_ORGAN_TYPE)actor.TheStaticData.TheOrganOnlyInfo.OrganType);
                        }
                    }
                }
                else
                {
                    if (actor.TheStaticData.TheOrganOnlyInfo.OrganType != 2)
                    {
                        return(null);
                    }
                    text       = (flag ? MiniMapSysUT.Map_BaseAlice_prefab : MiniMapSysUT.Map_BaseEnemy_prefab);
                    gameObject = (bMiniMap ? theMinimapSys.mmpcOrgan : theMinimapSys.bmpcOrgan);
                    num        = (bMiniMap ? 0.5f : 1f);
                    if (!bMiniMap)
                    {
                        evtCom = new UI3DEventCom();
                        MiniMapSysUT.SetEventComScreenSize(evtCom, 30f, 32f, 1f);
                        MiniMapSysUT.SetMapElement_EventParam(evtCom, flag, MinimapSys.ElementType.Base, actor.ObjID, 0u);
                        theMinimapSys.UI3DEventMgr.Register(evtCom, UI3DEventMgr.EventComType.Tower);
                        if (flag)
                        {
                            Singleton <CBattleSystem> .GetInstance().TowerHitMgr.Register(actor.ObjID, (RES_ORGAN_TYPE)actor.TheStaticData.TheOrganOnlyInfo.OrganType);
                        }
                    }
                }
            }
            if (string.IsNullOrEmpty(text) || gameObject == null)
            {
                return(null);
            }
            GameObject gameObject2 = Singleton <CGameObjectPool> .GetInstance().GetGameObject(text, enResourceType.BattleScene);

            if (gameObject2 != null)
            {
                gameObject2.transform.SetParent(gameObject.transform, true);
                gameObject2.transform.localScale    = new Vector3(num, num, 1f);
                gameObject2.transform.localRotation = Quaternion.identity;
                MiniMapSysUT.NativeSizeLize(gameObject2);
            }
            if (actor.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Hero || actor.TheActorMeta.ActorType == ActorTypeDef.Actor_Type_Call)
            {
                float num2 = bMiniMap ? (34f * Sprite3D.Ratio()) : (65f * Sprite3D.Ratio());
                MiniMapSysUT.NativeSizeLize(gameObject2, num2, num2);
            }
            return(gameObject2);
        }