示例#1
0
        public override void init()
        {
            // Static message to client
            EntityUtility.CreateMessage(Domain, "Players in server", 0, 0, 16);

            // Creates a list of all clients in server
            List <string> users = ClientProtocol.GetAllUsers();

            for (int i = 0; i < users.Count(); i++)
            {
                EntityUtility.CreateMessage(Domain, users[i], 0, 0, 18);
            }

            // Background
            Entity backGround = new Entity(Domain);

            backGround.AddComponent(new Transform());
            backGround.AddComponent(new Sprite(Assets.Textures.Background, 1280, 720));

            // Menu
            Entity Menu = new Entity(Domain);

            Menu.AddComponent(new Transform());
            Menu.AddComponent(new Sprite(Assets.Textures.Menu, 600, 600));

            // InputBox
            InputBox = EntityUtility.CreateInput(Domain, "Enter Name", -70, 100, 18);
        }
        public override void init()
        {
            // Input box
            InputBox = EntityUtility.CreateInput(domain, "", 360, 200, 14);

            // Chat layout
            ChatBox = new Entity(domain);
            ChatBox.AddComponent(new Transform());
            ChatBox.AddComponent(new Sprite(Assets.Textures.Chat, 200, 200));
        }