Esempio n. 1
0
        void _initStop_Click(object sender, RoutedEventArgs e)
        {
            this.stopAnimation();
            var reporter = new DebugReporter();

            reporter.AddReport(VisualAgentMandatoryScenario.Debuger.ToString());
            VisualAgentMandatoryScenario.Debuger.Clear();
            reporter.Owner = this._host;
            reporter.ShowDialog();
        }
Esempio n. 2
0
    //  report the progress of Tiles
    public void ReportTileDevProgress()
    {
        DebugReporter myScript = (DebugReporter)target;

        GameObject[] inGameTileList;
        bool         inGameOnly = myScript.inGameOnly;

        if (inGameOnly)
        {
            inGameTileList = GameObject.FindGameObjectsWithTag("Tile");
        }
        else
        {
            if (fullTileList == null)
            {
                //var list = AssetDatabase.LoadAssetAtPath("Assets/Prefabs/Tiles", typeof(GameObject));

                /*
                 * Tile[] tileList = AssetDatabase.LoadAssetAtPath("Assets/Prefabs/Tiles", Tile) as Tile[];
                 *  //GameObject.FindObjectsOfTypeIncludingAssets(typeof(Tile)) as Tile[];
                 * //fullTileList = new GameObject[tileList.Length];
                 * int idx = 0;
                 * foreach (Tile tile in tileList)
                 * {
                 *  fullTileList[idx] = tile.gameObject;
                 *  idx++;
                 * }
                 */
            }
            //C:\Users\ming\Documents\UnityProjects\FotP\Assets\Prefabs\Tiles\Rank3
            //var list = AssetDatabase.LoadAllAssetsAtPath("Assets/Prefabs/Tiles/Rank3/");
            string   tilePath = "FotPPrefabs/Tiles";
            Object[] list     = Resources.LoadAll(tilePath, typeof(Tile));
            Debug.Log("Loaded " + list.Length.ToString() + " Tiles\n");
            inGameTileList = fullTileList;

            fullTileList = new GameObject[list.Length];
            int idx = 0;
            foreach (Tile tile in list)
            {
                //Debug.Log("prefab found: " + tile.name + "\n");
                fullTileList[idx] = tile.gameObject;
                idx++;
            }
            inGameTileList = fullTileList;
        }
        foreach (GameObject go in inGameTileList)
        {
            Tile   tile        = go.GetComponent <Tile>();
            string debugStatus = tile.GetDebugStatusString();
            Debug.Log(debugStatus + " " + go.name + "\n");
        }
    }
Esempio n. 3
0
        private void CreateReporter()
        {
            if (Config.ReporterType == ReporterType.None ||
                Config.ReporterType == ReporterType.InvalidMin ||
                Config.ReporterType == ReporterType.InvalidMax)
            {
                Reporter = new SilenceReporter(Config.ReportLevel);
            }
            else if (Config.ReporterType == ReporterType.Debug)
            {
                Reporter = new DebugReporter(Config.ReportLevel);
            }
            else if (Config.ReporterType == ReporterType.Console)
            {
                Reporter = new ConsoleReporter(Config.ReportLevel);
            }
            else if (Config.ReporterType == ReporterType.Slack)
            {
                if (String.IsNullOrEmpty(Config.SlackConfigs.WebhookUrl))
                {
                    throw new LoggerStartException(StartResultType.InvalidSlackWebhookUrl);
                }

                Reporter = new SlackReporter(Config.ReportLevel,
                                             Config.SlackConfigs.WebhookUrl,
                                             BuildSlackUserName(),
                                             Config.SlackConfigs.DebugChannel,
                                             Config.SlackConfigs.InfoChannel,
                                             Config.SlackConfigs.WarnChannel,
                                             Config.SlackConfigs.ErrorChannel,
                                             Config.SlackConfigs.FatalChannel,
                                             Config.SlackConfigs.IconEmoji,
                                             Config.SlackConfigs.UTCAddHour,
                                             Config.SlackConfigs.TryOrderingReport == 1);
            }
            else
            {
                throw new LoggerStartException(StartResultType.InvalidReporterType);
            }
        }