コード例 #1
0
 //Sets the player from character create then removes the create screen
 public void SetPlayer(PlayableConstruct player)
 {
     this.player     = player;
     player.Position = new Point(10, 10);
     Children.Remove(charCreate);
     Children.Add(player);
     CreateGameConsoles();
 }
コード例 #2
0
        public WorldConsole(PlayableConstruct player, GameConsole game) : base(110, 32, SadConsole.Global.FontDefault.Master.GetFont(Font.FontSizes.Two), new Rectangle(0, 0, 55, 16))
        {
            Position    = new Point(0, 0);
            this.player = player;
            this.game   = game;
            dungeon     = new Dungeon();
            Cell[] level = dungeon.dungeon[curLevel].GetLevel();
            SetSurface(level, dungeon.dungeon[curLevel].Width, dungeon.dungeon[curLevel].Height);
            dungeon.dungeon[curLevel].Add(player);

            //Inventory testing
            dungeon.dungeon[curLevel].Add(healingPotion);
            //Inventory testing
        }
コード例 #3
0
        public CharacterConsole(GameConsole gameConsole, PlayableConstruct player) : base(30, 40)
        {
            int border = 0;

            this.gameConsole = gameConsole;
            this.player      = player;
            Position         = new Point(100, 0);
            Fill(Color.PeachPuff, Color.Black, (int)' ', null);
            Print(0, 0, "Character Info".Align(HorizontalAlignment.Center, 30));
            while (border < 40)
            {
                Print(0, border, "|", Color.Black, Color.DarkCyan);
                border++;
            }
        }