Beispiel #1
0
        public void Init()
        {
            if (this.m_internalSpawner == null)
            {
                switch (this.SpawnType)
                {
                case ESpawnObjectType.Tailsman:
                {
                    SpawnerTailsman tailsman = new SpawnerTailsman(this)
                    {
                        TailsmanId   = this.ConfigId,
                        SrcActorCond = this.SrcActorCond
                    };
                    this.m_internalSpawner = tailsman;
                    break;
                }

                case ESpawnObjectType.Actor:
                {
                    SpawnerActor actor = 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
                    };
                    this.m_internalSpawner = actor;
                    break;
                }
                }
            }
        }
 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
         };
     }
 }
Beispiel #3
0
 public void Destroy()
 {
     if (this.m_internalSpawner != null)
     {
         this.m_internalSpawner.Destroy();
         this.m_internalSpawner = null;
     }
 }