示例#1
0
 public Chess() {
     Name = "Chess";
     ShortName = "Chess";
     ImgGame = "Image/Chess.jpg";
     MaxGamersSession = 2;
     CountGamers = ServerEmulator.GetRandomCountGemers();
     //CountGamersF = GetCountPlayersFormat(CountGamers);
 }
 public Chess()
 {
     Id               = 0;
     Name             = "Chess";
     ShortName        = "Chess";
     ImgGame          = "Images/Chess.jpg";
     MaxGamersSession = 2;
     CountGamers      = ServerEmulator.GetRandomCountGemers();
 }
示例#3
0
    static void Main(string[] args)
    {
        try{
            Console.WriteLine("Iniciando servidor SSDP e ouvindo no multcast 239.255.255.250:1900! VERSAO 2.0");

            // Create HTTP server listenning on "http://*:44642/dtv/" and a SSDP server
            using (server = new ServerEmulator(null, OnClientConnected, null)){
                // Sleep waiting command
                Action writeOutOptions = () => {
                    Console.WriteLine("GINGA SERVER - Signal sending service");
                    Console.WriteLine("Commands");
                    Console.WriteLine("--------------------------------");
                    Console.WriteLine("S to send Signal");
                    Console.WriteLine("L to list all listeners");
                    Console.WriteLine("X to exit");
                    Console.WriteLine();
                };

                writeOutOptions();
                var key = new ConsoleKeyInfo();

                while (true)
                {
                    Console.WriteLine();
                    Console.Write("Enter command: ");
                    key = Console.ReadKey();
                    Console.WriteLine();
                    Console.WriteLine();

                    string command = key.KeyChar.ToString().ToUpperInvariant();

                    switch (command)
                    {
                    case "S":
                        server.SendAction();
                        break;

                    case "L":
                        server.ListClients();
                        break;

                    case "X":
                        Environment.Exit(0);
                        break;

                    default:
                        Console.WriteLine("Unknown command. Press ? for a list of valid commands.");
                        break;
                    }
                }
            }
        }catch (Exception e) {
            Console.WriteLine("Main halted:\n\n" + e.ToString());
            Console.ReadKey();
            Environment.Exit(0);
        }
    }
示例#4
0
文件: WOW.cs 项目: devmrx/GameServer
 public WOW()
 {
     Name             = "World of Warships";
     ShortName        = "World of Warships";
     ImgGame          = "Image/World of Warships.jpg";
     MaxGamersSession = 30;
     CountGamers      = ServerEmulator.GetRandomCountGemers();
     //CountGamersF = GetCountPlayersFormat(CountGamers);
 }
示例#5
0
 public CSGO()
 {
     Name             = "Counter-Strike: Global Offensive";
     ShortName        = "Counter-Strike: Gl...";
     ImgGame          = "Image/CounterStrikeGO.jpg";
     MaxGamersSession = 10;
     CountGamers      = ServerEmulator.GetRandomCountGemers();
     //CountGamersF = GetCountPlayersFormat(CountGamers);
 }
示例#6
0
 public Dota2()
 {
     Name             = "Dota 2";
     ShortName        = "Dota 2";
     ImgGame          = "Image/Dota2.jpg";
     MaxGamersSession = 10;
     CountGamers      = ServerEmulator.GetRandomCountGemers();
     //CountGamersF = GetCountPlayersFormat(CountGamers);
 }
示例#7
0
 public Overwatch()
 {
     Name             = "Overwatch";
     ShortName        = "Overwatch";
     ImgGame          = "Image/Overwatch.jpg";
     MaxGamersSession = 30;
     CountGamers      = ServerEmulator.GetRandomCountGemers();
     //CountGamersF = GetCountPlayersFormat(CountGamers);
 }
示例#8
0
 public PUBG()
 {
     Name             = "PlayerUnknown’s Battlegrounds";
     ShortName        = "Playerunknown's...";
     ImgGame          = "Image/PUBG.jpg";
     MaxGamersSession = 100;
     CountGamers      = ServerEmulator.GetRandomCountGemers();
     //CountGamersF = GetCountPlayersFormat(CountGamers);
 }
示例#9
0
    public void Start()
    {
        DontDestroyOnLoad(this);

        I = this;

        GameBalance     = new GameBalance();
        SceneController = new SceneController();
        ServerEmulator  = new ServerEmulator();
        Net.Auth();

        if (EmulateServer)
        {
            ServerEmulator.Login();
        }
    }