예제 #1
0
        private Command GetCommand(Sides side, String s)
        {
            for (int i = 0; i < CommandList.CommonCommands.Length; i++)
            {
                if (CommandList.CommonCommands[i].GetCommandName() == s)
                {
                    return(CommandList.CommonCommands[i]);
                }
            }

            if (side.Equals(Sides.CLIENT))
            {
                for (int i = 0; i < CommandList.ClientCommands.Length; i++)
                {
                    if (CommandList.ClientCommands[i].GetCommandName() == s)
                    {
                        return(CommandList.ClientCommands[i]);
                    }
                }
            }

            if (side.Equals(Sides.SERVER))
            {
                for (int i = 0; i < CommandList.ServerCommands.Length; i++)
                {
                    if (CommandList.ServerCommands[i].GetCommandName() == s)
                    {
                        return(CommandList.ServerCommands[i]);
                    }
                }
            }

            return(null);
        }