Exemplo n.º 1
0
        public void Player_service_can_get_player_by_name()
        {
            IPlayerService service = new LocalPlayerService();
            var            player  = service.GetPlayerStatsByName("Bjergsen");

            Assert.AreEqual(player.Id, 60);
        }
        public UIRenderingService(Internal.Model.World world, LocalPlayerService localPlayerService, UserInputProcessingService inputSim)
        {
            this.world            = world;
            this.localPlayerState = localPlayerService.Player;
            this.inputSim         = inputSim;

            reticle = new TargetingReticle();

            textarea          = new Textarea();
            textarea.Position = new Vector2(TW.Graphics.Form.Form.ClientSize.Width - 120, 20);
            textarea.Size     = new Vector2(100, 50);

            debugTextarea          = new Textarea();
            debugTextarea.Position = new Vector2(TW.Graphics.Form.Form.ClientSize.Width - 200, 150);
            debugTextarea.Size     = new Vector2(180, 400);
        }
 public GodGameClient(UserInputProcessingService userInputProcessingService,
                      UIRenderingService uiRenderingService,
                      DeveloperConsoleService developerConsoleService,
                      ClearGameStateChangesService clearStateChangesSimulator,
                      WorldRenderingSimulator worldRenderingSimulator,
                      WorldRenderingService simpleWorldRenderer,
                      INetworkConnectorClient networkConnectorClient,
                      GameStateDeltaPacketBuilder gameStateDeltaPacketBuilder,
                      LocalPlayerService localPlayerService,
                      UserInputService userInputService)
 {
     this.userInputProcessingService  = userInputProcessingService;
     this.uiRenderingService          = uiRenderingService;
     this.developerConsoleService     = developerConsoleService;
     this.clearStateChangesSimulator  = clearStateChangesSimulator;
     this.worldRenderingSimulator     = worldRenderingSimulator;
     this.simpleWorldRenderer         = simpleWorldRenderer;
     this.networkConnectorClient      = networkConnectorClient;
     this.gameStateDeltaPacketBuilder = gameStateDeltaPacketBuilder;
     this.localPlayerService          = localPlayerService;
     this.userInputService            = userInputService;
 }
        public WorldRenderingService(Model.World world, IVoxelWorldRenderer voxelWorldRenderer, LocalPlayerService localPlayerS, VoxelContentsFactory factory)
        {
            this.world = world;
            this.voxelWorldRenderer = voxelWorldRenderer;
            this.localPlayer        = localPlayerS.Player;

            Debug.Assert(Math.Abs(world.VoxelSize.X - world.VoxelSize.Y) < 0.001f);



            light1 = TW.Graphics.AcquireRenderer().CreateSpotLight();
            light2 = TW.Graphics.AcquireRenderer().CreateSpotLight();
            customVoxelsRenderer = new CustomVoxelsRenderer(world);
        }
 public WorldRenderingService(Model.World world, LocalPlayerService localPlayerS, VoxelContentsFactory factory)
     : this(world, new PerEntityVoxelWorldRenderer(world, new Point2(RenderSize, RenderSize)), localPlayerS, factory)
 {
 }
Exemplo n.º 6
0
        public void Player_service_can_get_players()
        {
            IPlayerService service = new LocalPlayerService();

            Assert.IsNotNull(service.GetAllPlayerStats());
        }