Ejemplo n.º 1
0
        public void    SendChatMessage(UnityEngine.UI.InputField inputField)
        {
            if (!NetworkStatus.IsClient())
            {
                // this is not client (nor host), so we will send message as server
                ChatManager.SendChatMessageToAllPlayersAsServer(inputField.text);
            }
            else
            {
                // there is an active local player
                ChatManager.SendChatMessageToAllPlayersAsLocalPlayer(inputField.text);
            }

            // clear input field
            inputField.text = "";
        }
Ejemplo n.º 2
0
        public static List <string> GetColumnNames()
        {
            if (NetworkStatus.IsClient())
            {
                return(new List <string>()
                {
                    "name", "kills", "deaths", "ping"
                });
            }
            else if (NetworkStatus.IsServer())
            {
                return(new List <string>()
                {
                    "name", "kills", "deaths", "ping", "health", "net id",
                    "obj id", "status", "ip"
                });
            }

            return(null);
        }
Ejemplo n.º 3
0
        public static List <float> GetColumnWidthPercentages()
        {
            List <float> widthPercentages = null;

            if (NetworkStatus.IsClient())
            {
                widthPercentages = new List <float>()
                {
                    0.4f, 0.15f, 0.15f, 0.3f
                }
            }
            ;
            else if (NetworkStatus.IsServer())
            {
                widthPercentages = new List <float>()
                {
                    0.25f, 0.05f, 0.05f, 0.05f, 0.05f, 0.05f, 0.05f, 0.225f, 0.225f
                }
            }
            ;

            return(widthPercentages);
        }