示例#1
0
        public GameState(IntPtr nativePtr)
            : base(nativePtr)
        {
            _scene = new CombatScene(0, this);

            _scene.AddSystem <CharacterCameraSystem>();
            var playerCtrlSystem = _scene.AddSystem <PlayerControllerSystem>();

            //    ControllerSystem ctrlSystem =_scene.AddSystem<ControllerSystem>();

            _entityBase = _scene.CreateEntity();

            _cameraRender = (CameraRenderable)_entityBase.Assign_Component(new CameraRenderable());
            _camera       = (CameraFree)_entityBase.Assign_Component(new CameraFree(_entityBase, _cameraRender));

            _controller = (Controller)_entityBase.Assign_Component(new Controller(_entityBase));
            _player     = (PlayerComponent)_entityBase.Assign_Component(new PlayerComponent(_entityBase));

            _entityBase.Assign_Component(new NetIdComponent(_entityBase));

            _player.PlayerSetActionMap(_controller);
            _screen = _entityBase.Assign_ScreenComponent(_cameraRender);

            playerCtrlSystem.SetBasicInputEvents(_controller);
            //   CtrlSetBasicInputEvents(_controller.CPointer, "E:\\Projekte\\coop\\XEngine\\data\\Test\\XETController\\Controller.cfg");

            _screen.AddUIState(_entityBase);


            _NetObserver = new NetObserver(this);
        }