예제 #1
0
파일: Controller.cs 프로젝트: r2d2m/TinyECS
    private void Awake()
    {
        mWorldContext = new WorldContextFactory().CreateNewWorldInstance();

        mSystemManager = new SystemManager(mWorldContext);

        WorldContextsManagerUtils.CreateWorldContextManager(mWorldContext, "WorldContextManager_System");
        SystemManagerObserverUtils.CreateSystemManagerObserver(mSystemManager, "SystemManagerObserver_System");

        mSystemManager.Init();
    }
예제 #2
0
    protected void Awake()
    {
        mWorldContext = new WorldContextFactory().CreateNewWorldInstance();

        mSystemManager = new SystemManager(mWorldContext);

        WorldContextsManagerUtils.CreateWorldContextManager(mWorldContext, "WorldsContextsManager_System");
        SystemManagerObserverUtils.CreateSystemManagerObserver(mSystemManager, "SystemManagerObserver_System");

        mSystemManager.RegisterSystem(new RegisterViewSystem(mWorldContext));

        mSystemManager.Init();
    }
예제 #3
0
파일: Controller.cs 프로젝트: r2d2m/TinyECS
    private void Awake()
    {
        mWorldContext = new WorldContextFactory().CreateNewWorldInstance();

        mSystemManager = new SystemManager(mWorldContext);

        WorldContextsManagerUtils.CreateWorldContextManager(mWorldContext, "WorldContextManager_System");
        SystemManagerObserverUtils.CreateSystemManagerObserver(mSystemManager, "SystemManagerObserver_System");

        // register our systems here
        mSystemManager.RegisterUpdateSystem(new InputSystem(mWorldContext, Camera.main));
        mSystemManager.RegisterReactiveSystem(new ImprovedSpawnSystem(mWorldContext, mPrefab, new GameObjectFactory(mWorldContext)));
        mSystemManager.RegisterReactiveSystem(new RegisterViewSystem(mWorldContext));
        mSystemManager.RegisterUpdateSystem(new RotatingCubesSystem(mWorldContext));

        mSystemManager.Init();
    }