Ejemplo n.º 1
0
        public void BindScene()
        {
            for (int i = 0; i < nodes.Count; i++)
            {
                nodes[i].Populate();
            }

            foreach (var factory in factories)
            {
                Toolbox.Add(factory);
            }



            Add <ProcessorEntities>();
            Add <ProcessorObserver>();

            if (SettingsEngine.DefineDebugMode)
            {
                Add <ProcessorDebug>();
            }

            Setup();

            initialized = true;

            var objs = FindObjectsOfType <MonoBehaviour>().OfType <IRequireStarter>();

            foreach (var obj in objs)
            {
                obj.Launch();
            }

            Timer.Add(Time.deltaFixed, PostSetup);
        }
Ejemplo n.º 2
0
        void Awake()
        {
            if (ProcessorUpdate.Default == null)
            {
                ProcessorUpdate.Create();
            }

            for (var i = 0; i < pluggables.Count; i++)
            {
                pluggables[i].Plug();
            }

            if (gameSession != null)
            {
                Toolbox.Add(gameSession);
            }
            if (gameSettings != null)
            {
                Toolbox.Add(gameSettings);
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// <para>Adds an object to the toolbox by type. It is mainly used to add processing scripts.</para>
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <returns></returns>
 protected static T Add <T>() where T : new()
 {
     return(Toolbox.Add <T>());
 }
Ejemplo n.º 4
0
Archivo: Starter.cs Proyecto: bmjoy/ecs
 public void Add <T>() where T : new()
 {
     Toolbox.Add <T>();
 }