Пример #1
0
    }   //end of LateUpdate method

    /**
     * Closes the AI's logger.
     */
    public void closeLog()
    {
        //check if a log was created
        if (this.log == null)   //a log was not created
        {
            return;
        }   //end if

        //close the log
        this.log.close();
        this.log = null;
    }   //end of closeLog method
Пример #2
0
    }   //end of analyze method

    /**
     * Analyzes a log file to see if it contains a certain action.
     *
     * @param fileName  The name of a log file.
     * @param action    The action to check for.
     */
    public static void analyze(string fileName, int action)
    {
        //read from the log file
        string text = AILogger.read(fileName);  //the contents of the log file

        //check if the log contains the action
        if (text.Contains("" + action)) //the log contains the action
        {
            Debug.Log(fileName + " performs " + action);
        }
        else    //the log does not contain the action
        {
            Debug.LogError(fileName + " does NOT perform " + action);
        }   //end if
    }   //end of analyze method