Ejemplo n.º 1
0
        /// <summary>
        /// Parses the player's prompt based on variables into text
        /// </summary>
        /// <returns>The parsed prompt</returns>
        public string GetParsedPrompt()
        {
            string parsed = Prompt;

            parsed = parsed.Replace(Constants.Prompt.HP_CURRENT, CurrentHitPoints.ToString());
            parsed = parsed.Replace(Constants.Prompt.HP_MAX, ModifiedPools.HitPoints.ToString());

            parsed = parsed.Replace(Constants.Prompt.STAMINA_CURRENT, CurrentStamina.ToString());
            parsed = parsed.Replace(Constants.Prompt.STAMINA_MAX, ModifiedPools.Stamina.ToString());

            parsed = parsed.Replace(Constants.Prompt.ENERGY_CURRENT, CurrentEnergy.ToString());
            parsed = parsed.Replace(Constants.Prompt.ENERGY_MAX, ModifiedPools.Energy.ToString());

            return(parsed);
        }
Ejemplo n.º 2
0
        public void PrintEnergy()
        {
            StringBuilder printText = new StringBuilder();

            int[] testPosition
                = FindObjects.GameLogic.GetComponent <ConvertCoordinates>()
                  .Convert(transform.position);

            printText.Remove(0, printText.Length);
            printText.Append("[");
            printText.Append(testPosition[0].ToString());
            printText.Append(",");
            printText.Append(testPosition[1].ToString());
            printText.Append("] ");
            printText.Append("Energy: ");
            printText.Append(CurrentEnergy.ToString());

            FindObjects.GameLogic.GetComponent <UIMessage>().StoreText(
                printText.ToString());
        }