コード例 #1
0
        public static void Prefix(uGUI_HardcoreGameOver __instance)
        {
            DeathRun.setCause("Victory");
            DeathRun.saveData.runData.updateVitals(true);
            DeathRun.statsData.SaveStats();

            TimeSpan timeSpan = TimeSpan.FromSeconds((double)DeathRun.saveData.playerSave.allLives);
            string   text     = "Victory! In " + DeathRunUtils.sayTime(timeSpan) + " (" + (DeathRun.saveData.playerSave.numDeaths + 1) + " ";

            if (DeathRun.saveData.playerSave.numDeaths == 0)
            {
                text += "life";
            }
            else
            {
                text += "lives";
            }

            text += ")";

            DeathRunUtils.CenterMessage(text, 10);
            CattleLogger.Message(text);

            string text2 = "Score: " + DeathRun.saveData.runData.Score;

            DeathRunUtils.CenterMessage(text, 10, 1);
            CattleLogger.Message(text);

            //ErrorMessage.AddMessage(text);
        }
コード例 #2
0
 public static void Postfix(uGUI_HardcoreGameOver __instance)
 {
     // Use the time-of-death message we will have just queued as our "Game Over" message.
     __instance.text.text = DeathRunUtils.centerMessages[0].getText() + " Game Over.";
 }