コード例 #1
0
ファイル: SpawnHeroTask.cs プロジェクト: whztt07/mobahero_src
 public override void Start()
 {
     this.MyCoroutineManager.StartCoroutine(BaseSpawnTask.ConcatEnum(new IEnumerator[]
     {
         this.SpawnLmHeros(),
         this.SpawnBlHeros(),
         base.TriggerFinishEvents(true)
     }), true);
 }
コード例 #2
0
        public override void Start()
        {
            this.MyScene.hero2_location = "11,12,13,14,15";
            IEnumerator[] array = new IEnumerator[this._heroDict.Count + 1];
            int           num   = 0;

            foreach (TeamType current in this._heroDict.Keys)
            {
                array[num++] = base.DoSpawnPvpHeroes_Coroutinue(this._heroDict[current], "Hero", current, this.MyScene.hero2_location, 0f, 0f, null, this._onSpawnAction);
            }
            array[num++] = base.TriggerFinishEvents(true);
            this.MyCoroutineManager.StartCoroutine(BaseSpawnTask.ConcatEnum(array), true);
        }
コード例 #3
0
        public override void Start()
        {
            this.MyScene.hero2_location = "11,12,13,14,15";
            IEnumerator enumerator  = base.DoSpawnPvpHeroes_Coroutinue(this._lmHeroList, "Hero", TeamType.LM, this.MyScene.hero2_location, 0f, 0f, null, this._onSpawnAction);
            IEnumerator enumerator2 = base.DoSpawnPvpHeroes_Coroutinue(this._blHeroList, "Hero", TeamType.BL, this.MyScene.hero2_location, 0f, 0f, null, this._onSpawnAction);

            this.MyCoroutineManager.StartCoroutine(BaseSpawnTask.ConcatEnum(new IEnumerator[]
            {
                enumerator,
                enumerator2,
                base.TriggerFinishEvents(true)
            }), true);
        }
コード例 #4
0
        private void SpawnTowers()
        {
            if (this.MyScene.guard_id != "[]")
            {
                string[] stringValue = StringUtils.GetStringValue(this.MyScene.guard_id, ',');
                EntityVo entityVo    = this._entityVoCreator.GetEntityVo(stringValue[0], EntityType.Home, TeamType.LM, 1);
                Units    units       = this.SpawnUtility.SpawnInstance(entityVo, "Home", TeamType.LM, 0, "[]", null, UnitControlType.None, UnitType.None);
                this.OnTowerSpawned(units, entityVo);
                if (stringValue.Length > 1)
                {
                    EntityVo entityVo2 = this._entityVoCreator.GetEntityVo(stringValue[1], EntityType.Home, TeamType.BL, 51);
                    Units    units2    = this.SpawnUtility.SpawnInstance(entityVo2, "Home", TeamType.BL, 0, "[]", null, UnitControlType.None, UnitType.None);
                    this.OnTowerSpawned(units2, entityVo2);
                }
            }
            IEnumerator enumerator = null;

            if (this.MyScene.tower_1 != "[]")
            {
                enumerator = base.SpawnInstances_Coroutinue(this._entityVoCreator.GetPvpEntityVos(this.MyScene.tower_1, EntityType.Tower, TeamType.LM, 2), "Building", TeamType.LM, string.Empty, 0f, 0f, "[]", null, new BaseSpawnTask.OnSpawnUnit(this.OnTowerSpawned));
            }
            IEnumerator enumerator2 = null;

            if (this.MyScene.tower_2 != "[]")
            {
                enumerator2 = base.SpawnInstances_Coroutinue(this._entityVoCreator.GetPvpEntityVos(this.MyScene.tower_2, EntityType.Tower, TeamType.BL, 52), "Building", TeamType.BL, string.Empty, 0f, 0f, "[]", null, new BaseSpawnTask.OnSpawnUnit(this.OnTowerSpawned));
            }
            IEnumerator enumerator3 = null;

            if (!string.IsNullOrEmpty(this.MyScene.tower_3) && this.MyScene.tower_3 != "[]")
            {
                enumerator3 = base.SpawnInstances_Coroutinue(this._entityVoCreator.GetPvpEntityVos(this.MyScene.tower_3, EntityType.Tower, TeamType.Team_3, 102), "Building", TeamType.Team_3, string.Empty, 0f, 0f, "[]", null, new BaseSpawnTask.OnSpawnUnit(this.OnTowerSpawned));
            }
            this.MyCoroutineManager.StartCoroutine(BaseSpawnTask.ConcatEnum(new IEnumerator[]
            {
                enumerator,
                enumerator2,
                enumerator3,
                base.TriggerFinishEvents(true)
            }), true);
        }