Exemplo n.º 1
0
        // TODO: Move presenter out of the system
        // TODO: Separate the rest of the UI from the logic
        public override void Initialize()
        {
            base.Initialize();

            SubscribeNetworkEvent <VerbSystemMessages.VerbsResponseMessage>(FillEntityPopup);
            SubscribeNetworkEvent <PlayerContainerVisibilityMessage>(HandleContainerVisibilityMessage);

            _contextMenuPresenter = new ContextMenuPresenter(this);
            SubscribeLocalEvent <MoveEvent>(_contextMenuPresenter.HandleMoveEvent);

            CommandBinds.Builder
            .Bind(ContentKeyFunctions.OpenContextMenu,
                  new PointerInputCmdHandler(HandleOpenContextMenu))
            .Register <VerbSystem>();
        }