示例#1
0
        public void SetWave(ModelWave wave, int waveNumber, int waveCount)
        {
            bool lastWave = (waveNumber == waveCount);

            GameFacade.Instance.RetrieveMediator <FashionGameGui>().SetWave(waveNumber, waveCount);
            GameFacade.Instance.RetrieveMediator <FashionGameGui>().EnableNextWave(!lastWave);
        }
示例#2
0
        private IEnumerator <IYieldInstruction> SpawnModels(ModelWave wave)
        {
            foreach (Pair <string, FashionModelNeeds> model in wave.Models)
            {
                yield return(new YieldWhile(delegate()
                {
                    return !mModelFactory.HasInactiveModels;
                }));

                FashionModel newModel = mModelFactory.GetModel(mLevel, model.Second, model.First);

                mActiveModels.Add(newModel.UnityGameObject, newModel);
                newModel.WalkToEndTarget();

                newModel.AddOnTargetReachedAction((new ClosureBugWorkaround(newModel, this)).ExecuteClosureHack);
                wave.ModelSpawned();

                yield return(new YieldForSeconds(wave.TimeBetweenSpawns));
            }
        }