Ejemplo n.º 1
0
        /// <summary>
        /// Engine entry.... all begins from here
        /// </summary>
        public static CCosmosEngine New(GameObject gameObjectToAttach, ICModule[] modules, CoroutineDelegate before, CoroutineDelegate after)
        {
            CDebug.Assert(gameObjectToAttach != null && modules != null);
            CCosmosEngine engine = gameObjectToAttach.AddComponent <CCosmosEngine>();

            engine.GameModules       = modules;
            engine.BeforeInitModules = before;
            engine.AfterInitModules  = after;
            return(engine);
        }
Ejemplo n.º 2
0
        private void Awake()
        {
            if (EngineInstance != null)
            {
                CDebug.LogError("Duplicated Instance CCosmosEngine!!!");
            }

            EngineInstance = this;

            Init();
        }
Ejemplo n.º 3
0
        private void Awake()
        {
            IsDebugBuild = Debug.isDebugBuild;

            if (EngineInstance != null)
            {
                CDebug.LogError("Duplicated Instance CCosmosEngine!!!");
            }

            EngineInstance = this;

            Init();
        }