Exemple #1
0
    private void DrawHUD()
    {
        var level      = "Level " + Player.instance.level.ToString();
        var hp         = "HP: " + Player.instance.hp.ToString() + "/" + Player.instance.maxHp.ToString();
        var actions    = "Actions: " + Player.instance.actions.ToString();
        var energy     = "Energy: " + Player.instance.energy.ToString();
        var deck       = "Cards in Deck: " + Player.instance.deck.Count.ToString();
        var discard    = "Cards in Discard: " + Player.instance.discard.Count.ToString();
        var floor      = "Floor: " + (Map.instance.currentFloorNumber + 1).ToString();
        var experience = "Experience: " + Player.instance.experience.ToString() + "/" + Player.instance.experienceToLevel.ToString();

        VirtualConsole.Write(floor, 0, VirtualConsole.instance.height - 2, 9, 1, 1, 1, 1, 0.25f, 0.25f, 0.25f);
        VirtualConsole.Write(level, 0, VirtualConsole.instance.height - 3, 10, 1, 1, 1, 1, 0.25f, 0.25f, 0.25f);
        VirtualConsole.DrawBar(hp, Player.instance.hp, Player.instance.maxHp, 0, VirtualConsole.instance.height - 4, 23, 1, 1, 1, 1, 0, 0, 0.5f, 0, 0);
        VirtualConsole.DrawBar(experience, Player.instance.experience, Player.instance.experienceToLevel, 0, VirtualConsole.instance.height - 5, 23, 1, 1, 1, 0, 0, 1, 0, 0, 0.5f);
        VirtualConsole.DrawBar(actions, Player.instance.actions, 4, 0, VirtualConsole.instance.height - 6, 23, 0, 0, 0, 0, 1, 0, 0, 0.5f, 0);
        VirtualConsole.Write(energy, 0, VirtualConsole.instance.height - 7, 10, 1, 1, 1, 1, 0.25f, 0.25f, 0.25f);
        VirtualConsole.Write(deck, 0, VirtualConsole.instance.height - 8, 18, 1, 1, 1, 1, 0.25f, 0.25f, 0.25f);
        VirtualConsole.Write(discard, 0, VirtualConsole.instance.height - 9, 21, 1, 1, 1, 1, 0.25f, 0.25f, 0.25f);
    }