private void Init() { bt = (Bitmap)Image.FromFile(path); hero = new ConsolePicture(bt, 0, 0); hero.Anim_pic = false; material = hero; }
// private ConsolePicture c = null; public Collider(ref ConsolePicture c) { width = c.width; height = c.height; Init(ref c); //Debug(width.ToString()); }
private void Init() { bt = (Bitmap)Image.FromFile(path); hero = new ConsolePicture(bt, 0, 0); material = hero; ConsoleGraphics.HexPicture(bt); //hero.Anim_pic = true; }
private void Init() { bt = (Bitmap)Image.FromFile(path); hero = new ConsolePicture(bt, 0, 30); //_C = new Collider(ref hero); material = hero; //hero.Anim_pic = true; }
private void Init() { bt = (Bitmap)Image.FromFile(path); h = bt.Height; w = bt.Width / Frames; hero = new ConsolePicture(bt, Frames, 15); hero.Anim_pic = true; material = hero; //hero.Anim_pic = true; }
private void Init() { bt = (Bitmap)Image.FromFile(path); // h = bt.Height; // w = bt.Width/Frames; hero = new ConsolePicture(bt, 0, 0); //_C = new Collider(ref hero); //ConsoleBehaviour _cache = this; // rigidBody = new RigidBody(ref _cache); hero.Anim_pic = false; material = hero; //hero.Anim_pic = true; }
public static void Draw(ConsolePicture picture, bool HasBounds) { Console.BackgroundColor = ConsoleGraphics.Skybox; ConsoleColor cc = ConsoleColor.Black; int a_s = 0; int a_e = 0; if (picture.Anim_pic) { a_s = picture.offsetX * picture.CurrentFrame; a_e = a_s; if (a_s >= picture.offsetX * picture.Frames) { a_s = 0; a_e = 0; picture.CurrentFrame = 0; } } else { a_s = picture.width; a_e = 0; } for (int y = 0; y < picture.height; y++) { for (int x = a_e; x < a_s + picture.offsetX; x++) { cc = picture.colors[x, y]; Console.ForegroundColor = cc; Console.BackgroundColor = cc; if (!HasBounds) { Console.Write("0"); } else { Console.Write("1"); } } SetDrawPosition(drawPos.x, drawPos.y + 1); } if (picture.Anim_pic) { picture.CurrentFrame++; } }
protected void Init(ref ConsolePicture c) { for (int i = 0; i < width; i++) { c.colors[i, height - 1] = ConsoleColor.Green; c.colors[i, 0] = ConsoleColor.Black; } for (int i = 0; i < height; i++) { c.colors[width - 1, i] = ConsoleColor.Black; c.colors[0, i] = ConsoleColor.Black; } }
public static void Render() { Render3D = (Bitmap)Image.FromFile(path); h = Render3D.Height; w = Render3D.Width; material = new ConsolePicture(Render3D, 0, 15); int a = 0; for (int i = 0; i < w - 1; i++) { a = i; int sh = 15; for (int k = 0; k < h - 1; k++) { if (sh <= 0) { sh = 1; } if (material.colors[i, k] == ConsoleColor.Green) { //ConsoleGraphics.Draw(material,true); wall = new Shape(sh, 2); ConsoleGraphics.SetDrawPosition(i, sh); ConsoleGraphics.Draw(wall.BakeConsolePicture(), true); break; } else { wall = new Shape(sh, 2, ConsoleColor.White); ConsoleGraphics.SetDrawPosition(i, sh); ConsoleGraphics.Draw(wall.BakeConsolePicture(), true); } sh--; } } }
public ConsolePicture BakeConsolePicture() { ConsolePicture c = new ConsolePicture(this, 0, 0); return(c); }