Ejemplo n.º 1
0
        public IEnumerator Init()
        {
            //yield return new EnterPlayMode();

            var am = new AssetsModel(ScriptableObject.CreateInstance <AssetsConfiguration>(), new UpdateWatcher("test"));

            _simModel = new SimulationModel(_physicsSceneSym, am);
            yield return(new WaitForEndOfFrame());

            _simModel.InstantiatePrefab(am.LoadAsset(ResourceId.SimulationPrefab));

            for (int i = 0; i < 4; i++)
            {
                _simModel.Update(0.02f);
                yield return(new WaitForSeconds(0.1f));
            }

            yield return(new WaitForSeconds(2.5f));

            _simModel.DestroyInstance();
            //yield return new ExitPlayMode();
        }