Ejemplo n.º 1
0
        protected override void Redraw()
        {
            base.Redraw();

            var person = _player.Get <Creature>();
            int i      = 1;

            Canvas.PrintString(1, i++, _player.Get <Identifier>().Name);
            i++;
            PrintAttribute(1, i++, _player.Get <BodyComponent>().Health);
            PrintAttribute(1, i++, person.Stats["stat_stamina"]);
            PrintAttribute(1, i++, person.Stats["stat_composure"]);
            i++;
            PrintAttribute(1, i++, person.Stats["stat_energy"]);
            PrintAttribute(1, i++, person.Stats["stat_food"]);
            PrintAttribute(1, i++, person.Stats["stat_water"]);
            PrintAttribute(1, i++, person.Stats["stat_bladder"]);
            PrintAttribute(1, i++, person.Stats["stat_cleanliness"]);
            i++;
            i++;
            Canvas.PrintString(1, i++, String.Format("{0:0.00}", person.EncumbrancePenalty));
            Canvas.PrintString(1, i++, person.Posture.ToString());
            i++;
            i++;
            Canvas.PrintString(1, i++, _calendar.DateTime.ToShortDateString());
            Canvas.PrintString(1, i++, _calendar.DateTime.ToLongTimeString());
            i++;
            i++;
            i++;
            Canvas.PrintString(1, i++, String.Format("FPS: {0}", TCODSystem.getFps()));
        }
Ejemplo n.º 2
0
 public void adjustFPS()
 {
     if (TCODSystem.getFps() < TARGET_FPS)
     {
         CONTROL_FPS++;
         TCODSystem.setFps(CONTROL_FPS);
     }
     else if (TCODSystem.getFps() > TARGET_FPS)
     {
         CONTROL_FPS--;
         TCODSystem.setFps(CONTROL_FPS);
     }
 }
Ejemplo n.º 3
0
        public void printDebug()
        {
            GameTerminal debugTerminal = terminalManager.findTerminal("Debug");

            if (debugTerminal != null)
            {
                if (parent.debug)
                {
                    debugTerminal.clear((char)0, new RColor(255, 255, 255, 255), new RColor(0, 0, 0, 30));
                    debugTerminal.write("Playtime: " + string.Format("{0:0.00}", TCODSystem.getElapsedSeconds()) + " FPS: " + TCODSystem.getFps().ToString(), 1, 0, new RColor(255, 255, 255, 255), new RColor(0, 0, 0, 30));
                }
            }
        }