⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 liftthing.java

📁 是男人就下100层的游戏的移植到手机上的
💻 JAVA
字号:
//package src;

import java.util.Random;


public class LiftThing {
//	energy;enemy;
	int Lift;
	int time;
	int Lift_X,Lift_Y;
	int speed;
	public boolean alive;
    Random r = new Random();
	
	public LiftThing() {
		super();
		
	}
	public void Add(int x,int y,int rand){
		Lift_X = x-20+GetRandom(rand);
		Lift_Y = y;
	}
	
	public void Move(){
		Lift_Y-=speed;
	}
	public int GetRandom(int x) {
		int random = r.nextInt() % x;
		if (random < 0)
			random *= -1;
		return random;
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -