private void Populate(CombatResult result) { _result = result; titleText.text = result.ToString(); var combatManager = FindObjectOfType <CombatManager>(); var allCompanions = combatManager.Companions; foreach (var companion in allCompanions) { var stats = Instantiate(companionPrefab, companionContainer.transform); stats.GetComponent <PostCombatCompanionStats>().Populate(companion); } }
public static void OnBobsBuddySimulationCompleted(CombatResult result, TestOutput output, int turn) { if (!Config.Instance.GoogleAnalytics) { return; } var point = new InfluxPointBuilder("hdt_bb_combat_result_v2") .Tag("result", result.ToString()) .Tag("turn", turn) .Tag("exit_condition", output.myExitCondition.ToString()) .Tag("thread_count", BobsBuddyInvoker.ThreadCount) .Field("iterations", output.simulationCount) .Field("result_win", result == CombatResult.Win ? 1 : 0) .Field("result_tie", result == CombatResult.Tie ? 1 : 0) .Field("result_loss", result == CombatResult.Loss ? 1 : 0) .Field("win_rate", output.winRate * 100) .Field("tie_rate", output.tieRate * 100) .Field("loss_rate", output.lossRate * 100); _queue.Add(point.Build()); }