Form1.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using VR.Properties;
using System.Collections;
namespace VR
{
public partial class Form1 : Form
{
Player player = new Player();
Random rdm = new Random();
Hashtable enemy_hash = new Hashtable();
int enemy_count = 0;
bool flag = false;
int index = 0;
private Image[] images = new Image[]
{
Resources.vr,Resources.vr2,Resources.vr3,Resources.vr4
};
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
panel1.BackgroundImage = images[0];
timer1.Tick+=new EventHandler(timer1_Tick);
timer1.Interval = 1000;
timer1.Start();
progressBar1.Maximum = 1000;
progressBar1.Value = 1000;
}
private void timer1_Tick(object sender,EventArgs e)
{
this.index = rdm.Next(5);
Put_Enemy(this.index);
//检查敌人数量,来费血
this.enemy_count = this.panel1.Controls.Count;
int value =progressBar1.Value;
int value2 = value - this.enemy_count * 2;
if (value2 < 0)
{
timer1.Stop();
this.panel1.Controls.Clear();
panel1.BackgroundImage = Resources.game_over_768x1366;
return;
}
progressBar1.Value -= this.enemy_count * 2;
}
private void Put_Enemy(int index)
{
Enemy temp = new Enemy();
if (index == 1)
{
后面还有 58 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
