Ejemplo n.º 1
0
        public void SpawnCommand(Player sender, VehicleModelType model, IWorldService worldService)
        {
            var vehicle = worldService.CreateVehicle(model, sender.Position + Vector3.Up, 0, -1, -1);

            sender.PutInVehicle(vehicle.Entity);
            sender.SendClientMessage($"{model} spawned!");
        }
Ejemplo n.º 2
0
 public void OnGameModeInit(IWorldService worldService)
 {
     _menu = worldService.CreateMenu("Test menu", new Vector2(200, 300), 100);
     _menu.AddItem("Hello!!!");
     _menu.AddItem("Hello!!");
     _menu.AddItem("Hello!");
 }
Ejemplo n.º 3
0
        public void OnGameModeInit(IWorldService worldService)
        {
            var green = Color.Green;

            green.A = 128;
            worldService.CreateTextLabel("text", green, new Vector3(10, 10, 10), 1000);
        }
        public void OnGameModeInit(IWorldService worldService, IEntityManager entityManager,
                                   INativeObjectProxyFactory proxyFactory, ITimerService timerService)
        {
            // Only test FastNative performance if FastNative is not activated
            if (proxyFactory is FastNativeBasedNativeObjectProxyFactory)
            {
                return;
            }

            // Benchmarking
            var fastFactory = new FastNativeBasedNativeObjectProxyFactory(_client);
            var fastProxy   = (TestingFastNative)fastFactory.CreateInstance(typeof(TestingFastNative));

            _fastProxy = fastProxy;
            _nativeGetVehicleParamsEx = Interop.FastNativeFind("GetVehicleParamsEx");
            _testVehicleId            = worldService.CreateVehicle(VehicleModelType.BMX, Vector3.One, 0, 0, 0).Entity.Handle;
            //timerService.Start(_ => BenchmarkRunTimer(), TimeSpan.FromSeconds(2));
            //timerService.Start(_ => BenchmarkRunTimerProxy(), TimeSpan.FromSeconds(2));

            // Test native features
            Console.WriteLine("TEST WITH HANDLE FACTORY:");
            RunTests(proxyFactory);
            Console.WriteLine("TEST WITH FAST FACTORY:");
            RunTests(fastFactory);

            // Threading test
            // timerService.Start(_ => ThreadingTest(fastProxy, handleProxy), TimeSpan.FromSeconds(15));

            // Multiple calls test
            InvokeVehicleNatives(entityManager, fastProxy);
        }
Ejemplo n.º 5
0
 public DbSeeder(
     IWorldService worldService,
     IFactionService factionService,
     IItemService itemService,
     IItemCategoryService itemCategoryService,
     IZoneService zoneService,
     IProfileService profileService,
     ILoadoutService loadoutService,
     IScrimRulesetManager rulesetManager,
     IFacilityService facilityService,
     IFacilityTypeService facilityTypeService,
     IVehicleService vehicleService,
     IVehicleTypeService vehicleTypeService,
     IDeathEventTypeService deathTypeService,
     ISqlScriptRunner sqlScriptRunner,
     ILogger <DbSeeder> logger
     )
 {
     _worldService        = worldService;
     _factionService      = factionService;
     _itemService         = itemService;
     _itemCategoryService = itemCategoryService;
     _zoneService         = zoneService;
     _profileService      = profileService;
     _loadoutService      = loadoutService;
     _rulesetManager      = rulesetManager;
     _facilityService     = facilityService;
     _facilityTypeService = facilityTypeService;
     _vehicleService      = vehicleService;
     _vehicleTypeService  = vehicleTypeService;
     _deathTypeService    = deathTypeService;
     _sqlScriptRunner     = sqlScriptRunner;
     _logger = logger;
 }
Ejemplo n.º 6
0
 public void Configure(NetworkServicesConfig config)
 {
     if (clubPenguinClient != null)
     {
         clubPenguinClient.Destroy();
     }
     clubPenguinClient = new ClubPenguinClient(monoBehaviour, config.CPAPIServicehost, config.CPAPIClientToken, config.ClientApiVersion, config.CPGameServerZone, !offlineMode && config.CPGameServerEncrypted, config.CPGameServerDebug, config.CPLagMonitoring, config.CPGameServerLatencyWindowSize, config.CPWebServiceLatencyWindowSize, config.CPMonitoringServicehost, config.CPWebsiteAPIServicehost, offlineMode);
     currentConfig     = config;
     worldService      = new WorldService();
     worldService.Initialize(clubPenguinClient);
     playerStateService = new PlayerStateService();
     playerStateService.Initialize(clubPenguinClient);
     chatService = new ChatService();
     chatService.Initialize(clubPenguinClient);
     playerActionService = new PlayerActionService();
     playerActionService.Initialize(clubPenguinClient);
     iglooService = new IglooService();
     iglooService.Initialize(clubPenguinClient);
     inventoryService = new InventoryService();
     inventoryService.Initialize(clubPenguinClient);
     breadcrumbService = new BreadcrumbService();
     breadcrumbService.Initialize(clubPenguinClient);
     savedOutfitService = new SavedOutfitService();
     savedOutfitService.Initialize(clubPenguinClient);
     prototypeService = new PrototypeService();
     prototypeService.Initialize(clubPenguinClient);
     questService = new QuestService();
     questService.Initialize(clubPenguinClient);
     consumableService = new ConsumableService();
     consumableService.Initialize(clubPenguinClient);
     friendsService = new FriendsService();
     friendsService.Initialize(clubPenguinClient);
     rewardService = new RewardService();
     rewardService.Initialize(clubPenguinClient);
     taskService = new TaskNetworkService();
     taskService.Initialize(clubPenguinClient);
     minigameService = new MinigameService();
     minigameService.Initialize(clubPenguinClient);
     iapService = new IAPService();
     iapService.Initialize(clubPenguinClient);
     tutorialService = new TutorialService();
     tutorialService.Initialize(clubPenguinClient);
     moderationService = new ModerationService();
     moderationService.Initialize(clubPenguinClient);
     disneyStoreService = new DisneyStoreService();
     disneyStoreService.Initialize(clubPenguinClient);
     newsfeedService = new NewsfeedService();
     newsfeedService.Initialize(clubPenguinClient);
     catalogService = new CatalogService();
     catalogService.Initialize(clubPenguinClient);
     partyGameService = new PartyGameService();
     partyGameService.Initialize(clubPenguinClient);
     scheduledEventService = new ScheduledEventService();
     scheduledEventService.Initialize(clubPenguinClient);
     diagnosticsService = new DiagnosticsService();
     diagnosticsService.Initialize(clubPenguinClient);
     captchaService = new CaptchaService();
     captchaService.Initialize(clubPenguinClient);
 }
Ejemplo n.º 7
0
        public void OnGameModeInit(IVehicleRepository vehiclesRepository, IWorldService worldService,
                                   IServerService serverService, IVehicleInfoService vehicleInfoService)
        {
            // Event methods have dependency injection alongside the arguments

            Console.WriteLine("Do game mode loading goodies...");

            vehiclesRepository.Foo();

            worldService.CreateActor(101, new Vector3(0, 0, 20), 0);

            var blue = Color.Blue;

            blue.A      = 128;
            _zone       = worldService.CreateGangZone(0, 0, 100, 100);
            _zone.Color = blue;
            _zone.Show();

            var obj = worldService.CreateObject(16638, new Vector3(10, 10, 40), Vector3.Zero, 1000);

            obj.DisableCameraCollisions();

            worldService.CreateVehicle(VehicleModelType.Alpha, new Vector3(40, 40, 10), 0, 0, 0);

            var green = Color.Green;

            green.A = 128;
            worldService.CreateTextLabel("text", green, new Vector3(10, 10, 10), 1000);

            _welcome              = worldService.CreateTextDraw(new Vector2(20, 40), "Hello, world");
            _welcome.Alignment    = TextDrawAlignment.Left;
            _welcome.Font         = TextDrawFont.Diploma;
            _welcome.Proportional = true;
            Console.WriteLine("TD pos: " + _welcome.Position);
            Console.WriteLine(_welcome.Entity.ToString());

            _menu = worldService.CreateMenu("Test menu", new Vector2(200, 300), 100);
            _menu.AddItem("Hello!!!");
            _menu.AddItem("Hello!!");
            _menu.AddItem("Hello!");

            var ctx = SynchronizationContext.Current;

            Task.Run(() =>
            {
                // ... Run things on a worker thread.

                ctx.Send(_ =>
                {
                    // ... Run things on the main thead.
                }, null);
            });

            serverService.SetGameModeText("SampSharp.Entities");

            var size = vehicleInfoService.GetModelInfo(VehicleModelType.AT400, VehicleModelInfoType.Size);

            Console.WriteLine($"AT400 size {size}");
        }
Ejemplo n.º 8
0
 public void OnGameModeInit(IWorldService worldService)
 {
     _welcome              = worldService.CreateTextDraw(new Vector2(20, 40), "Hello, world");
     _welcome.Alignment    = TextDrawAlignment.Left;
     _welcome.Font         = TextDrawFont.Diploma;
     _welcome.Proportional = true;
     Console.WriteLine("TD pos: " + _welcome.Position);
     Console.WriteLine(_welcome.Entity.ToString());
 }
Ejemplo n.º 9
0
        public void OnGameModeInit(IWorldService worldService)
        {
            var blue = Color.Blue;

            blue.A      = 128;
            _zone       = worldService.CreateGangZone(0, 0, 100, 100);
            _zone.Color = blue;
            _zone.Show();
        }
Ejemplo n.º 10
0
 private static void Initialize(IWorldService worldService)
 {
     try
     {
         worldService.Initialize();
     }
     catch
     {
         // TODO.  Log
     }
 }
Ejemplo n.º 11
0
        public void HelloPlayerCommand(Player player, IWorldService worldService)
        {
            var welcome = worldService.CreatePlayerTextDraw(player, new Vector2(100, 80), "Hello, Player");

            welcome.Alignment    = TextDrawAlignment.Left;
            welcome.Font         = TextDrawFont.Diploma;
            welcome.Proportional = true;
            welcome.LetterSize   = new Vector2(1, 1.2f);
            welcome.Show();
            player.SendClientMessage("Show see msg now...");
        }
Ejemplo n.º 12
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DefaultGame" /> class.
        /// </summary>
        /// <param name="loggingService">The logging service.</param>
        /// <param name="worldService">The world service.</param>
        public DefaultGame(ILoggingService loggingService, IWorldService worldService)
        {
            ExceptionFactory
                .ThrowIf<ArgumentNullException>(loggingService == null, "Logging service can not be null.", this)
                .Or(worldService == null, "World service can not be null.");

            this.loggingService = loggingService;
            this.worldService = worldService;

            this.Information = new GameInformation();
            this.Autosave = new Autosave<DefaultGame>(this, this.SaveWorlds) { AutoSaveFrequency = 1 };
        }
Ejemplo n.º 13
0
        public World(IWorldService service)
        {
            Settings = new WorldSettings();

            _service = service;

            _rooms       = new ConcurrentDictionary <Reference <Room>, Room>();
            _players     = new ConcurrentDictionary <Reference <Player>, Player>();
            _saveHistory = new ConcurrentDictionary <Reference <IGameObject>, DateTime>();

            _ticker = new Timer(Tick, this, 5, 10000);
        }
 public ApplicationDataLoader(
     IFacilityService facilityService,
     IWorldService worldService,
     IZoneService zoneService,
     IDbSeeder dbSeeder,
     ILogger <ApplicationDataLoader> logger)
 {
     _facilityService = facilityService;
     _worldService    = worldService;
     _zoneService     = zoneService;
     _dbSeeder        = dbSeeder;
     _logger          = logger;
 }
Ejemplo n.º 15
0
        private IPhysicsBody SharedCreateBarrierPhysicsBody(ILogicObject worldEvent)
        {
            IWorldService world = IsClient
                                      ? Client.World
                                      : Server.World;
            var publicState = GetPublicState(worldEvent);
            var physicsBody = world.CreateStandalonePhysicsBody(publicState.AreaCirclePosition.ToVector2D()
                                                                + (0.5, 0.5));

            physicsBody.AddShapeCircle(this.AreaBarrierRadius);
            world.AddStandalonePhysicsBody(physicsBody, world.GetPhysicsSpace());
            return(physicsBody);
        }
Ejemplo n.º 16
0
        public DatabaseMaintenanceService(
            IFacilityTypeService facilityTypeService,
            IFacilityService facilityService,
            IItemService itemService,
            IItemCategoryService itemCategoryService,
            IProfileService profileService,
            ILoadoutService loadoutService,
            IZoneService zoneService,
            IWorldService worldService,
            IFactionService factionService,
            IVehicleService vehicleService,
            ISqlScriptRunner adhocScriptRunner,
            IWebHostEnvironment env
            )
        {
            _facilityService     = facilityService;
            _facilityTypeService = facilityTypeService;
            _itemService         = itemService;
            _itemCategoryService = itemCategoryService;
            _profileService      = profileService;
            _loadoutService      = loadoutService;
            _zoneService         = zoneService;
            _worldService        = worldService;
            _factionService      = factionService;
            _vehicleService      = vehicleService;
            _adhocScriptRunner   = adhocScriptRunner;
            _env = env;

            _mapRegions     = new CensusStoreDataComparisonRow("Map Regions", _facilityService);
            _facilityTypes  = new CensusStoreDataComparisonRow("Facility Types", _facilityTypeService);
            _items          = new CensusStoreDataComparisonRow("Items", _itemService);
            _itemCategories = new CensusStoreDataComparisonRow("Item Categories", _itemCategoryService);
            _profiles       = new CensusStoreDataComparisonRow("Profiles", _profileService);
            _loadouts       = new CensusStoreDataComparisonRow("Loadouts", _loadoutService);
            _zones          = new CensusStoreDataComparisonRow("Zones", _zoneService);
            _worlds         = new CensusStoreDataComparisonRow("Worlds", _worldService);
            _factions       = new CensusStoreDataComparisonRow("Factions", _factionService);
            _vehicles       = new CensusStoreDataComparisonRow("Vehicles", _vehicleService);

            Comparisons.Add(_mapRegions);
            Comparisons.Add(_facilityTypes);
            Comparisons.Add(_items);
            Comparisons.Add(_itemCategories);
            Comparisons.Add(_profiles);
            Comparisons.Add(_loadouts);
            Comparisons.Add(_zones);
            Comparisons.Add(_worlds);
            Comparisons.Add(_factions);
            Comparisons.Add(_vehicles);
        }
Ejemplo n.º 17
0
 public MasterService(
     IWorldService worldService,
     ICharacterService characterService,
     ILanguageService languageService,
     IParserService parserService,
     IPrintService printService
     )
 {
     this.worldService     = worldService;
     this.characterService = characterService;
     this.languageService  = languageService;
     this.parserService    = parserService;
     this.printService     = printService;
 }
Ejemplo n.º 18
0
 public GameController(IWorldService worldService, IWalletService walletService, ICurrencyRepository currencyRepository, IDebugDayChangeRepository debugDayChangeRepository
                       , IPopupService popupService, ICitizenRepository citizenRepository, IWarService warService, IEntityRepository entityRepository,
                       IBattleService battleService, IBattleRepository battleRepository) : base(popupService)
 {
     this.worldService             = worldService;
     this.walletService            = walletService;
     this.currencyRepository       = currencyRepository;
     this.debugDayChangeRepository = debugDayChangeRepository;
     this.citizenRepository        = citizenRepository;
     this.warService       = warService;
     this.entityRepository = entityRepository;
     this.battleRepository = battleRepository;
     this.battleService    = battleService;
 }
Ejemplo n.º 19
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DefaultGame" /> class.
        /// </summary>
        /// <param name="loggingService">The logging service.</param>
        /// <param name="worldService">The world service.</param>
        public DefaultGame(ILoggingService loggingService, IWorldService worldService)
        {
            ExceptionFactory
            .ThrowIf <ArgumentNullException>(loggingService == null, "Logging service can not be null.", this)
            .Or(worldService == null, "World service can not be null.");

            this.loggingService = loggingService;
            this.worldService   = worldService;

            this.Information = new GameInformation();
            this.Autosave    = new Autosave <DefaultGame>(this, this.SaveWorlds)
            {
                AutoSaveFrequency = 1
            };
        }
Ejemplo n.º 20
0
 public DbSeeder(
     IWorldService worldService,
     IFactionService factionService,
     IItemService itemService,
     IZoneService zoneService,
     ITitleService titleService,
     IProfileService profileService
     )
 {
     _worldService   = worldService;
     _factionService = factionService;
     _itemService    = itemService;
     _zoneService    = zoneService;
     _titleService   = titleService;
     _profileService = profileService;
 }
Ejemplo n.º 21
0
        SharedEnumerateExplosionBombermanDirectionTilesWithTargets(
            Vector2D positionEpicenter,
            int damageDistanceFullDamage,
            int damageDistanceMax,
            IWorldService world,
            int xOffset,
            int yOffset)
        {
            var fromPosition = positionEpicenter.ToVector2Ushort();

            for (var offsetIndex = 1; offsetIndex <= damageDistanceMax; offsetIndex++)
            {
                var tile = world.GetTile(fromPosition.X + offsetIndex * xOffset,
                                         fromPosition.Y + offsetIndex * yOffset,
                                         logOutOfBounds: false);

                if (!tile.IsValidTile ||
                    tile.IsCliff)
                {
                    yield break;
                }

                var tileStaticObjects            = tile.StaticObjects;
                IStaticWorldObject damagedObject = null;
                foreach (var staticWorldObject in tileStaticObjects)
                {
                    if (staticWorldObject.ProtoGameObject is IProtoObjectWall ||
                        staticWorldObject.ProtoGameObject is IProtoObjectDoor)
                    {
                        // damage only walls and doors
                        damagedObject = staticWorldObject;
                        break;
                    }
                }

                if (damagedObject is null &&
                    offsetIndex > damageDistanceFullDamage)
                {
                    // no wall or door there
                    // stop damage propagation
                    yield break;
                }

                yield return(damagedObject, offsetIndex);
            }
        }
 public ApplicationDataLoader(
     IItemCategoryService itemCategoryService,
     IScrimRulesetManager rulesetManager,
     IScrimMatchScorer matchScorer,
     IFacilityService facilityService,
     IWorldService worldService,
     IZoneService zoneService,
     ILogger <ApplicationDataLoader> logger)
 {
     _itemCategoryService = itemCategoryService;
     _rulesetManager      = rulesetManager;
     _matchScorer         = matchScorer;
     _facilityService     = facilityService;
     _worldService        = worldService;
     _zoneService         = zoneService;
     _logger = logger;
 }
Ejemplo n.º 23
0
        public async void RearCommand(Player player, IEntityManager entityManager, IWorldService worldService,
                                      IVehicleInfoService vehicleInfoService)
        {
            var labels = new List <EntityId>();

            foreach (var vehicle in entityManager.GetComponents <Vehicle>())
            {
                var model = vehicle.Model;

                var size   = vehicleInfoService.GetModelInfo(model, VehicleModelInfoType.Size);
                var bumper = vehicleInfoService.GetModelInfo(model, VehicleModelInfoType.RearBumperZ);
                var offset = new Vector3(0, -size.Y / 2, bumper.Z);

                var rotation = vehicle.RotationQuaternion;

                var mRotation =
                    rotation.LengthSquared >
                    10000 // Unoccupied vehicle updates corrupt the internal vehicle world matrix
                        ? Matrix.CreateRotationZ(MathHelper.ToRadians(vehicle.Angle))
                        : Matrix.CreateFromQuaternion(rotation);

                var matrix = Matrix.CreateTranslation(offset) *
                             mRotation *
                             Matrix.CreateTranslation(vehicle.Position);

                var point = matrix.Translation;

                var label = worldService.CreateTextLabel("[x]", Color.Blue, point, 100, 0, false);
                labels.Add(label.Entity);
            }

            player.SendClientMessage("Points added");

            await Task.Delay(10000);

            foreach (var l in labels)
            {
                entityManager.Destroy(l);
            }

            player.SendClientMessage("Points removed");
        }
Ejemplo n.º 24
0
 public WorldsController(IWorldService worldService, IMapper mapper)
 {
     _worldService = worldService ?? throw new ArgumentNullException(nameof(worldService));
     _mapper       = mapper ?? throw new ArgumentNullException(nameof(mapper));
 }
Ejemplo n.º 25
0
 public SoundVisualizer(Game game)
     : base(game)
 {
     this._world = (IWorldService)this.Game.Services.GetService(typeof(IWorldService));
     this._player = (IPlayer)this.Game.Services.GetService(typeof(IPlayer));
 }
Ejemplo n.º 26
0
 public void OnGameModeInit(IWorldService worldService)
 {
     worldService.CreateVehicle(VehicleModelType.Alpha, new Vector3(40, 40, 10), 0, 0, 0);
 }
Ejemplo n.º 27
0
 public WorldConfigModule(IWorldService worldService)
 {
     _worldService = worldService;
 }
Ejemplo n.º 28
0
 public R7(IWorldService worldNamer)
 {
     this.worldNamer = worldNamer;
 }
Ejemplo n.º 29
0
        public void OnGameModeInit(IWorldService worldService, IEntityManager entityManager, INativeObjectProxyFactory proxyFactory, ITimerService timerService)
        {
            // Only test FastNative performance if FastNative is not activated
            if (proxyFactory is FastNativeBasedNativeObjectProxyFactory)
            {
                return;
            }

            //timerService.Start(_ => BenchmarkRunTimer(), TimeSpan.FromSeconds(2));
            timerService.Start(_ => BenchmarkRunTimerProxy(), TimeSpan.FromSeconds(2));

            _nativeGetVehicleParamsEx = Interop.FastNativeFind("GetVehicleParamsEx");
            _testVehicleId            = worldService.CreateVehicle(VehicleModelType.BMX, Vector3.One, 0, 0, 0).Entity.Handle;

            var fastFactory = new FastNativeBasedNativeObjectProxyFactory(_client);
            var handleProxy = NativeObjectProxyFactory.CreateInstance <TestingFastNative>();
            var fastProxy   = (TestingFastNative)fastFactory.CreateInstance(typeof(TestingFastNative));

            _fastProxy = fastProxy;

            // Call IsPlayerConnected
            timerService.Start(_ =>
            {
                Console.WriteLine("RequiresInvoke: " + ((ISynchronizationProvider)_client).InvokeRequired);
                Console.WriteLine("IsPlayerConnected fast: " + fastProxy.IsPlayerConnected(0));
                Console.WriteLine("IsPlayerConnected handle: " + handleProxy.IsPlayerConnected(0));

                Task.Run(() =>
                {
                    Console.WriteLine("TASK.RequiresInvoke: " + ((ISynchronizationProvider)_client).InvokeRequired);
                    Console.WriteLine("TASK.IsPlayerConnected fast: " + fastProxy.IsPlayerConnected(0));
                    Console.WriteLine("TASK.IsPlayerConnected handle: " + handleProxy.IsPlayerConnected(0));
                });
            }, TimeSpan.FromSeconds(1));


            // Call CreateVehicle native
            var testPosition  = new Vector3(65.13f, 123.123f, 555.555f);
            var fastVehicleId = fastProxy.CreateVehicle((int)VehicleModelType.Landstalker, testPosition.X,
                                                        testPosition.Y, testPosition.Z, 15, -1, -1, -1, 0);

            // Create Vehicle entity to verify vehicle position was set properly through the native
            var entity = SampEntities.GetVehicleId(fastVehicleId);

            entityManager.Create(entity);

            entityManager.AddComponent <NativeVehicle>(entity);
            var fastVehicleComp = entityManager.AddComponent <Vehicle>(entity);

            Console.WriteLine($"Created vehicle {fastVehicleId} position {fastVehicleComp.Position}; matches? {(fastVehicleComp.Position == testPosition)}");

            // Call GetVehiclePos
            var ret    = fastProxy.GetVehiclePos(fastVehicleId, out var x, out var y, out var z);
            var getPos = new Vector3(x, y, z);

            Console.WriteLine($"get pos ({ret}): {getPos} matches? {(testPosition == getPos)}");

            // Test immediate call to SetGameModeText
            // var nativeSetGameModeText = Interop.FastNativeFind("SetGameModeText");
            // SetGameModeTextCall(nativeSetGameModeText, "TestValue");

            // Test via proxy
            fastProxy.SetGameModeText("TestValueViaProxy");
        }
Ejemplo n.º 30
0
 public SoundVisualizer(Game game)
     : base(game)
 {
     this._world  = (IWorldService)this.Game.Services.GetService(typeof(IWorldService));
     this._player = (IPlayer)this.Game.Services.GetService(typeof(IPlayer));
 }
Ejemplo n.º 31
0
 public HelloWorldService(IHelloService helloService, IWorldService worldService)
 {
     _helloService = helloService;
     _worldService = worldService;
 }
 public WorldsController(IWorldService worldService)
 {
     _worldService = worldService;
 }