Exemplo n.º 1
0
        /// ====================================================================================
        /// Extend this class into a per-game custom commands script.
        /// Fill it with the functions you want to be able to call from the console.
        /// RULES
        /// 1. THESE FUNCTIONS MUST BE PUBLIC
        /// 2. FOR EASE OF TYPING IN-GAME THESE FUNCTIONS SHOULD BE ALL LOWERCASE
        /// 3. IF YOU WANT TO PASS ARGUMENTS:
        ///     3A. CREATE A PRIVATE FUNCTION WITH NO ARGUMENTS
        ///     3B. CREATE A PUBLIC FUNCTION OF THE SAME NAME WITH NO BODY, GIVE IT YOUR ARGUMENTS
        ///     3C. USE console.inputArgument IN THE PRIVATE FUNCTION TO UTILIZE THE INFORMATION
        ///     3D. SEE argumentfunction BELOW AS AN EXAMPLE
        /// ====================================================================================
        ///
        public void lua()
        {
            string code = "";

            foreach (string s in console.args)
            {
                Debug.Log(s);
                code += s + " ";
            }
            UConsole.NewEvent(World.current.LuaString(code));
        }
Exemplo n.º 2
0
 public void mynewfunction()
 {
     UConsole.NewEvent("New Function was called.");
 }
Exemplo n.º 3
0
 private void argumentfunction()
 {
     UConsole.NewEvent("Your argument was: " + console.inputArgument);
 }
Exemplo n.º 4
0
 public void testfunction()
 {
     UConsole.NewEvent("If you see this in the event log, testfunction was successfully called!");
 }