Exemple #1
0
 public UserInputProcessingService(Internal.Model.World world, IPlayerInputHandler inputHandler, WorldRenderingService renderer, ToolSelectionMenu toolSelectionMenu)
 {
     this.world             = world;
     this.inputHandler      = inputHandler;
     this.renderer          = renderer;
     this.toolSelectionMenu = toolSelectionMenu;
 }
        public void Setup()
        {
            world = TestWorldBuilder.createTestWorld(20, 10);

            gameState = new GameState(world);

            inputHandler = Substitute.For <IPlayerInputHandler>();
            npf          = new NetworkedPlayerFactory(
                (transporter, handler) => new NetworkPlayerInputForwarder(transporter, handler, world),
                state => inputHandler, gameState);
        }
Exemple #3
0
 public PlayerInputComponent(IPlayerInputHandler input)
 {
     Handler = input;
 }
 public NetworkPlayerInputForwarder(IClientPacketTransporter <UserInputHandlerPacket> transporter, IPlayerInputHandler handler, Internal.Model.World world)
 {
     this.transporter = transporter;
     this.handler     = handler;
     this.world       = world;
 }