private void Form1_Load(object sender, EventArgs e) { // load skin file string[] datapaths = new[] { Path.Combine(Path.Combine(Path.Combine("..", ".."), ".."), "data"), "data" }; getfile = new GetFileStream(datapaths); richTextBox1.Text = new StreamReader(getfile.GetFile("player.txt")).ReadToEnd(); // init UI RichTextBoxContextMenu(richTextBox1); RichTextBoxContextMenu(richTextBox2); UpdateLabels(); // init 3D rendering the3d = new ManicDigger.TextureLoader() { d_Config3d = config3d }; glControl1.Paint += new PaintEventHandler(glControl1_Paint); glControl1.MouseWheel += new System.Windows.Forms.MouseEventHandler(glControl1_MouseWheel); loaded = true; GL.ClearColor(Color.SkyBlue); overheadcameraK.SetDistance(4); overheadcameraK.SetT((float)Math.PI); SetupViewport(); Application.Idle += new EventHandler(Application_Idle); sw.Start(); }
private void Form1_Load(object sender, EventArgs e) { string[] datapaths = new[] { Path.Combine(Path.Combine(Path.Combine("..", ".."), ".."), "data"), "data" }; getfile = new GetFileStream(datapaths); RichTextBoxContextMenu(richTextBox1); RichTextBoxContextMenu(richTextBox2); UpdateLabels(); the3d = new ManicDigger.The3d() { d_Config3d = config3d }; glControl1.Paint += new PaintEventHandler(glControl1_Paint); glControl1.MouseWheel += new MouseEventHandler(glControl1_MouseWheel); loaded = true; GL.ClearColor(Color.SkyBlue); overheadcameraK.Distance = 3; SetupViewport(); Application.Idle += new EventHandler(Application_Idle); sw.Start(); }
public GameDataMonsters(IGetFileStream getfile) { int n = 5; MonsterCode = new string[n][]; MonsterName = new string[n]; MonsterSkin = new string[n]; MonsterCode[0] = MyStream.ReadAllLines(getfile.GetFile("imp.txt")); MonsterName[0] = "Imp"; MonsterSkin[0] = "imp.png"; MonsterCode[1] = MyStream.ReadAllLines(getfile.GetFile("imp.txt")); MonsterName[1] = "Fire Imp"; MonsterSkin[1] = "impfire.png"; MonsterCode[2] = MyStream.ReadAllLines(getfile.GetFile("dragon.txt")); MonsterName[2] = "Dragon"; MonsterSkin[2] = "dragon.png"; MonsterCode[3] = MyStream.ReadAllLines(getfile.GetFile("zombie.txt")); MonsterName[3] = "Zombie"; MonsterSkin[3] = "zombie.png"; MonsterCode[4] = MyStream.ReadAllLines(getfile.GetFile("cyclops.txt")); MonsterName[4] = "Cyclops"; MonsterSkin[4] = "cyclops.png"; }
private void Form1_Load(object sender, EventArgs e) { string[] datapaths = new[] { Path.Combine(Path.Combine(Path.Combine("..", ".."), ".."), "data"), "data" }; getfile = new GetFileStream(datapaths); richTextBox1.Text = new StreamReader(getfile.GetFile("player.txt")).ReadToEnd(); RichTextBoxContextMenu(richTextBox1); RichTextBoxContextMenu(richTextBox2); UpdateLabels(); the3d = new ManicDigger.TextureLoader() { d_Config3d = config3d }; glControl1.Paint += new PaintEventHandler(glControl1_Paint); glControl1.MouseWheel += new System.Windows.Forms.MouseEventHandler(glControl1_MouseWheel); loaded = true; GL.ClearColor(Color.SkyBlue); overheadcameraK.SetDistance(3); overheadcameraK.SetT((float)Math.PI); SetupViewport(); Application.Idle += new EventHandler(Application_Idle); sw.Start(); }