Ejemplo n.º 1
0
    public ServerGameWorld(GameWorld world, NetworkServer networkServer, Dictionary <int, ServerGameLoop.ClientInfo> clients, ChatSystemServer m_ChatSystem, BundledResourceManager resourceSystem)
    {
        m_NetworkServer   = networkServer;
        m_Clients         = clients;
        this.m_ChatSystem = m_ChatSystem;

        m_GameWorld = world;

        m_CharacterModule        = new CharacterModuleServer(m_GameWorld, resourceSystem);
        m_ProjectileModule       = new ProjectileModuleServer(m_GameWorld, resourceSystem);
        m_HitCollisionModule     = new HitCollisionModule(m_GameWorld, 128, 1);
        m_PlayerModule           = new PlayerModuleServer(m_GameWorld, resourceSystem);
        m_SpectatorCamModule     = new SpectatorCamModuleServer(m_GameWorld, resourceSystem);
        m_ReplicatedEntityModule = new ReplicatedEntityModuleServer(m_GameWorld, resourceSystem, m_NetworkServer);
        m_ReplicatedEntityModule.ReserveSceneEntities(networkServer);
        m_ItemModule = new ItemModule(m_GameWorld);

        m_GameModeSystem = m_GameWorld.GetECSWorld().CreateManager <GameModeSystemServer>(m_GameWorld, m_ChatSystem, resourceSystem);

        m_DestructablePropSystem = m_GameWorld.GetECSWorld().CreateManager <UpdateDestructableProps>(m_GameWorld);

        m_DamageAreaSystem = m_GameWorld.GetECSWorld().CreateManager <DamageAreaSystemServer>(m_GameWorld);

        m_TeleporterSystem = m_GameWorld.GetECSWorld().CreateManager <TeleporterSystemServer>(m_GameWorld);

        m_HandleGrenadeRequests   = m_GameWorld.GetECSWorld().CreateManager <HandleGrenadeRequest>(m_GameWorld, resourceSystem);
        m_StartGrenadeMovement    = m_GameWorld.GetECSWorld().CreateManager <StartGrenadeMovement>(m_GameWorld);
        m_FinalizeGrenadeMovement = m_GameWorld.GetECSWorld().CreateManager <FinalizeGrenadeMovement>(m_GameWorld);

        m_platformSystem = m_GameWorld.GetECSWorld().CreateManager <MoverUpdate>(m_GameWorld);

        m_MoveableSystem = new MovableSystemServer(m_GameWorld, resourceSystem);
        m_CameraSystem   = new ServerCameraSystem(m_GameWorld);
    }
Ejemplo n.º 2
0
    public ServerGameWorld(GameWorld world, BundledResourceManager resourceSystem, Dictionary <int, ServerGameLoop.ClientInfo> clients, NetworkServer networkServer)
    {
        _gameWorld     = world;
        _networkServer = networkServer;
        m_Clients      = clients;

        m_PlayerModule           = new PlayerModuleServer(_gameWorld, resourceSystem);
        m_CharacterModule        = new CharacterModuleServer(_gameWorld, resourceSystem);
        m_ReplicatedEntityModule = new ReplicatedEntityModuleServer(_gameWorld, resourceSystem, networkServer);
        m_ReplicatedEntityModule.ReserveSceneEntities(networkServer);

        movableSystemServer = new MovableSystemServer(_gameWorld, resourceSystem);

        m_GameModeSystem = _gameWorld.GetECSWorld().CreateSystem <GameModeSystemServer>(_gameWorld);
    }