其中思路很简单,单线程的一个乱七八糟的游戏
预计会更新背包,背包这个估计会用一个vector来存
图形的话,我得催催我的美工大人,她会帮我弄吧,哇哈哈
界面:
1 namespace auttompk 2 { 3 partial class Form1 4 { 5 /// <summary> 6 /// 必需的设计器变量。 7 /// </summary> 8 private System.ComponentModel.IContainer components = null; 9 10 /// <summary> 11 /// 清理所有正在使用的资源。 12 /// </summary> 13 /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> 14 protected override void Dispose(bool disposing) 15 { 16 if (disposing && (components != null)) 17 { 18 components.Dispose(); 19 } 20 base.Dispose(disposing); 21 } 22 23 #region Windows 窗体设计器生成的代码 24 25 /// <summary> 26 /// 设计器支持所需的方法 - 不要 27 /// 使用代码编辑器修改此方法的内容。 28 /// </summary> 29 private void InitializeComponent() 30 { 31 this.button1 = new System.Windows.Forms.Button(); 32 this.button2 = new System.Windows.Forms.Button(); 33 this.label1 = new System.Windows.Forms.Label(); 34 this.label2 = new System.Windows.Forms.Label(); 35 this.label3 = new System.Windows.Forms.Label(); 36 this.label6 = new System.Windows.Forms.Label(); 37 this.label4 = new System.Windows.Forms.Label(); 38 this.explabel = new System.Windows.Forms.Label(); 39 this.attacklabel = new System.Windows.Forms.Label(); 40 this.hplabel = new System.Windows.Forms.Label(); 41 this.levellabel = new System.Windows.Forms.Label(); 42 this.fightbox = new System.Windows.Forms.TextBox(); 43 this.splitter1 = new System.Windows.Forms.Splitter(); 44 this.SuspendLayout(); 45 // 46 // button1 47 // 48 this.button1.Location = new System.Drawing.Point(575, 254); 49 this.button1.Name = "button1"; 50 this.button1.Size = new System.Drawing.Size(189, 62); 51 this.button1.TabIndex = 0; 52 this.button1.Text = "开始"; 53 this.button1.UseVisualStyleBackColor = true; 54 this.button1.Click += new System.EventHandler(this.button1_Click); 55 // 56 // button2 57 // 58 this.button2.Location = new System.Drawing.Point(575, 322); 59 this.button2.Name = "button2"; 60 this.button2.Size = new System.Drawing.Size(189, 64); 61 this.button2.TabIndex = 1; 62 this.button2.Text = "停止"; 63 this.button2.UseVisualStyleBackColor = true; 64 this.button2.Click += new System.EventHandler(this.button2_Click); 65 // 66 // label1 67 // 68 this.label1.AutoSize = true; 69 this.label1.Location = new System.Drawing.Point(573, 71); 70 this.label1.Name = "label1"; 71 this.label1.Size = new System.Drawing.Size(41, 12); 72 this.label1.TabIndex = 2; 73 this.label1.Text = "生命值"; 74 // 75 // label2 76 // 77 this.label2.AutoSize = true; 78 this.label2.Location = new System.Drawing.Point(575, 107); 79 this.label2.Name = "label2"; 80 this.label2.Size = new System.Drawing.Size(0, 12); 81 this.label2.TabIndex = 3; 82 // 83 // label3 84 // 85 this.label3.AutoSize = true; 86 this.label3.Location = new System.Drawing.Point(574, 106); 87 this.label3.Name = "label3"; 88 this.label3.Size = new System.Drawing.Size(41, 12); 89 this.label3.TabIndex = 4; 90 this.label3.Text = "攻击力"; 91 // 92 // label6 93 // 94 this.label6.AutoSize = true; 95 this.label6.Location = new System.Drawing.Point(575, 40); 96 this.label6.Name = "label6"; 97 this.label6.Size = new System.Drawing.Size(29, 12); 98 this.label6.TabIndex = 9; 99 this.label6.Text = "等级"; 100 // 101 // label4 102 // 103 this.label4.AutoSize = true; 104 this.label4.Location = new System.Drawing.Point(575, 141); 105 this.label4.Name = "label4"; 106 this.label4.Size = new System.Drawing.Size(41, 12); 107 this.label4.TabIndex = 12; 108 this.label4.Text = "经验值"; 109 // 110 // explabel 111 // 112 this.explabel.AutoSize = true; 113 this.explabel.ImageAlign = System.Drawing.ContentAlignment.BottomCenter; 114 this.explabel.Location = new System.Drawing.Point(645, 140); 115 this.explabel.Name = "explabel"; 116 this.explabel.Size = new System.Drawing.Size(41, 12); 117 this.explabel.TabIndex = 13; 118 this.explabel.Text = "label5"; 119 // 120 // attacklabel 121 // 122 this.attacklabel.AutoSize = true; 123 this.attacklabel.Location = new System.Drawing.Point(647, 106); 124 this.attacklabel.Name = "attacklabel"; 125 this.attacklabel.Size = new System.Drawing.Size(41, 12); 126 this.attacklabel.TabIndex = 14; 127 this.attacklabel.Text = "label7"; 128 // 129 // hplabel 130 // 131 this.hplabel.AutoSize = true; 132 this.hplabel.Location = new System.Drawing.Point(645, 71); 133 this.hplabel.Name = "hplabel"; 134 this.hplabel.Size = new System.Drawing.Size(41, 12); 135 this.hplabel.TabIndex = 15; 136 this.hplabel.Text = "label8"; 137 // 138 // levellabel 139 // 140 this.levellabel.AutoSize = true; 141 this.levellabel.Location = new System.Drawing.Point(647, 40); 142 this.levellabel.Name = "levellabel"; 143 this.levellabel.Size = new System.Drawing.Size(41, 12); 144 this.levellabel.TabIndex = 16; 145 this.levellabel.Text = "label9"; 146 // 147 // fightbox 148 // 149 this.fightbox.Location = new System.Drawing.Point(30, 30); 150 this.fightbox.Multiline = true; 151 this.fightbox.Name = "fightbox"; 152 this.fightbox.Size = new System.Drawing.Size(492, 375); 153 this.fightbox.TabIndex = 17; 154 // 155 // splitter1 156 // 157 this.splitter1.Location = new System.Drawing.Point(0, 0); 158 this.splitter1.Name = "splitter1"; 159 this.splitter1.Size = new System.Drawing.Size(3, 438); 160 this.splitter1.TabIndex = 18; 161 this.splitter1.TabStop = false; 162 // 163 // Form1 164 // 165 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 166 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 167 this.ClientSize = new System.Drawing.Size(803, 438); 168 this.Controls.Add(this.splitter1); 169 this.Controls.Add(this.fightbox); 170 this.Controls.Add(this.levellabel); 171 this.Controls.Add(this.hplabel); 172 this.Controls.Add(this.attacklabel); 173 this.Controls.Add(this.explabel); 174 this.Controls.Add(this.label4); 175 this.Controls.Add(this.label6); 176 this.Controls.Add(this.label3); 177 this.Controls.Add(this.label2); 178 this.Controls.Add(this.label1); 179 this.Controls.Add(this.button2); 180 this.Controls.Add(this.button1); 181 this.Name = "Form1"; 182 this.Text = "挂机传奇"; 183 this.ResumeLayout(false); 184 this.PerformLayout(); 185 186 } 187 188 #endregion 189 190 private System.Windows.Forms.Button button1; 191 private System.Windows.Forms.Button button2; 192 private System.Windows.Forms.Label label1; 193 private System.Windows.Forms.Label label2; 194 private System.Windows.Forms.Label label3; 195 private System.Windows.Forms.Label label6; 196 private System.Windows.Forms.Label label4; 197 private System.Windows.Forms.Label explabel; 198 private System.Windows.Forms.Label attacklabel; 199 private System.Windows.Forms.Label hplabel; 200 private System.Windows.Forms.Label levellabel; 201 private System.Windows.Forms.TextBox fightbox; 202 private System.Windows.Forms.Splitter splitter1; 203 } 204 }