Exemplo n.º 1
0
 public void Init()
 {
     if (this.m_internalSpawner != null)
     {
         return;
     }
     SpawnerWrapper.ESpawnObjectType spawnType = this.SpawnType;
     if (spawnType != SpawnerWrapper.ESpawnObjectType.Tailsman)
     {
         if (spawnType == SpawnerWrapper.ESpawnObjectType.Actor)
         {
             this.m_internalSpawner = new SpawnerActor(this)
             {
                 TheActorMeta          = this.TheActorMeta,
                 bSequentialMeta       = this.bSequentialMeta,
                 InitRandPassSkillRule = this.InitRandPassSkillRule,
                 InitBuffDemand        = this.InitBuffDemand,
                 m_rangePolygon        = this.m_rangePolygon,
                 m_rangeDeadPoint      = this.m_rangeDeadPoint
             };
         }
     }
     else
     {
         this.m_internalSpawner = new SpawnerTailsman(this)
         {
             TailsmanId   = this.ConfigId,
             SrcActorCond = this.SrcActorCond
         };
     }
 }
Exemplo n.º 2
0
 public SCommonSpawnEventParam(VInt3 inPos, int inLeftTime, int inAlertPreroll, SpawnerWrapper.ESpawnObjectType inObjType)
 {
     this.SpawnPos     = inPos;
     this.LeftTime     = inLeftTime;
     this.AlertPreroll = inAlertPreroll;
     this.SpawnObjType = inObjType;
 }
Exemplo n.º 3
0
 protected virtual SpawnerWrapper.ESpawnObjectType QuerySpawnObjType()
 {
     SpawnerWrapper.ESpawnObjectType result = SpawnerWrapper.ESpawnObjectType.Invalid;
     if (this.SpawnerList.Length > 0)
     {
         result = this.SpawnerList[0].SpawnType;
     }
     return(result);
 }
Exemplo n.º 4
0
 protected virtual SpawnerWrapper.ESpawnObjectType QuerySpawnObjType()
 {
     SpawnerWrapper.ESpawnObjectType invalid = SpawnerWrapper.ESpawnObjectType.Invalid;
     if (base.SpawnerList.Length > 0)
     {
         invalid = base.SpawnerList[0].SpawnType;
     }
     return(invalid);
 }
Exemplo n.º 5
0
        private void AddSpawnGroupCounter(int inCountdown, int inAlertPreroll, Vector3 inInitPos, SpawnerWrapper.ESpawnObjectType inObjType)
        {
            this.m_spawnGroupCounterContainer = this.GetSpawnGroupTextContainer();
            if (this.m_spawnGroupCounterContainer != null)
            {
                int element = this.m_spawnGroupCounterContainer.GetElement();
                if (element >= 0)
                {
                    SpawnGroupCounter counter;
                    counter = new SpawnGroupCounter {
                        CountdownTime = inCountdown,
                        timer         = counter.CountdownTime,
                        AlertTime     = counter.timer - inAlertPreroll,
                        bAlertPreroll = inAlertPreroll > 0,
                        bDidAlert     = false
                    };
                    RectTransform mapPointerRectTransform = null;
                    GameObject    p = this.m_spawnGroupCounterContainer.GetElement(element);
                    if (p != null)
                    {
                        mapPointerRectTransform = p.transform as RectTransform;
                        counter.TextObj         = p;
                        counter.timerText       = Utility.FindChild(p, "TimerText").GetComponent <Text>();
                    }
                    if (mapPointerRectTransform != null)
                    {
                        mapPointerRectTransform.SetAsFirstSibling();
                    }
                    SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext();

                    if ((curLvelContext != null) && curLvelContext.isPVPMode)
                    {
                        this.UpdateUIMap(mapPointerRectTransform, inInitPos, (float)curLvelContext.mapWidth, (float)curLvelContext.mapHeight);
                    }
                    this.m_spawnGroupCounter.Add(counter);
                }
            }
        }
Exemplo n.º 6
0
        private void AddSpawnGroupCounter(int inCountdown, int inAlertPreroll, Vector3 inInitPos, SpawnerWrapper.ESpawnObjectType inObjType)
        {
            this.m_spawnGroupCounterContainer = this.GetSpawnGroupTextContainer();
            if (this.m_spawnGroupCounterContainer != null)
            {
                int element = this.m_spawnGroupCounterContainer.GetElement();
                if (element >= 0)
                {
                    MinimapView.SpawnGroupCounter spawnGroupCounter = new MinimapView.SpawnGroupCounter();
                    spawnGroupCounter.CountdownTime = inCountdown;
                    spawnGroupCounter.timer         = spawnGroupCounter.CountdownTime;
                    spawnGroupCounter.AlertTime     = spawnGroupCounter.timer - inAlertPreroll;
                    spawnGroupCounter.bAlertPreroll = (inAlertPreroll > 0);
                    spawnGroupCounter.bDidAlert     = false;
                    RectTransform rectTransform = null;
                    GameObject    element2      = this.m_spawnGroupCounterContainer.GetElement(element);
                    if (element2 != null)
                    {
                        rectTransform               = (element2.transform as RectTransform);
                        spawnGroupCounter.TextObj   = element2;
                        spawnGroupCounter.timerText = Utility.FindChild(element2, "TimerText").GetComponent <Text>();
                    }
                    if (rectTransform != null)
                    {
                        rectTransform.SetAsFirstSibling();
                    }
                    SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext();

                    if (curLvelContext != null && curLvelContext.IsMobaMode())
                    {
                        this.UpdateUIMap(rectTransform, inInitPos, (float)curLvelContext.m_mapWidth, (float)curLvelContext.m_mapHeight);
                    }
                    this.m_spawnGroupCounter.Add(spawnGroupCounter);
                }
            }
        }
Exemplo n.º 7
0
 public SpawnerWrapper(SpawnerWrapper.ESpawnObjectType inSpawnType)
 {
     this.SpawnType = inSpawnType;
 }