package com.example.admin.balacar;
import android.graphics.Bitmap;
/**
* 作者:小民
* 功能:车子的配置信息
* 时间:2017/10/26
*/
public class CartConfig {
/**
* 当前车的号码
*/
private int number;
/**
* 当前X坐标
*/
private float curX;
/**
* 终点X坐标
*/
private float endX;
/**
* 当前Y坐标
*/
private float curY;
/**
* 终点Y坐标
*/
private float endY;
/**
* 速度
*/
private float mSpeed;
/**
* 绑定的Bitmap对象
*/
private Bitmap mBitmap;
/**
* 指示器
*/
private Bitmap mIndicatorBmp;
/**
* 宽度
*/
private int width;
/**
* 高度
*/
private int height;
/**
* 已计算玩终点
*/
private boolean isEnd;
private boolean isEndY;
/**
* 当前喷火的等级
*/
private int fire;
public CartConfig(int number, float curX,float curY, Bitmap bitmap, Bitmap indicatorBmp) {
this.number = number;
this.curX = curX;
this.curY = curY;
mBitmap = bitmap;
width = mBitmap.getWidth();
height=mBitmap.getHeight();
mIndicatorBmp = indicatorBmp;
mSpeed = -2;
}
public int getNumber() {
return number;
}
public void setNumber(int number) {
this.number = number;
}
public Bitmap getBitmap() {
return mBitmap;
}
public void setBitmap(Bitmap bitmap) {
mBitmap = bitmap;
}
public float getCurX() {
return curX;
}
public void setCurX(float curX) {
this.curX = curX;
}
public float getCurY() {
return curY;
}
public void setCurY(float curY) {
this.curY = curY;
}
public float getEndX() {
return endX;
}
public void setEndX(float endX) {
this.endX = endX;
}
public float getEndY() {
return endY;
}
public void setEndY(float endY) {
this.endY = endY;
}
public float getSpeed() {
return mSpeed;
}
public void setSpeed(float speed) {
mSpeed = speed;
}
public int getWidth() {
return width;
}
public void setWidth(int width) {
this.width = width;
}
public int getHeight() {
return height;
}
public void setHeight(int height) {
this.height = height;
}
public boolean isEnd() {
return isEnd;
}
public void setEnd(boolean end) {
isEnd = end;
}
public boolean isEndY() {
return isEndY;
}
public void setEndY(boolean end) {
isEndY = end;
}
public int getFire() {
return fire;
}
public void setFire(int fire) {
this.fire = fire;
}
public Bitmap getIndicatorBmp() {
return mIndicatorBmp;
}
public void setIndicatorBmp(Bitmap indicatorBmp) {
mIndicatorBmp = indicatorBmp;
}
/**
* 切换到下一个喷火等级,最多 三级
*/
public int nextFire() {
fire += 5;
fire = fire > 30 ? 1 : fire;
return fire;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
【资源说明】 1、该资源包括项目的全部源码,下载可以直接使用! 2、本项目适合作为计算机、数学、电子信息等专业的课程设计、期末大作业和毕设项目,作为参考资料学习借鉴。 3、本资源作为“参考资料”如果需要实现其他功能,需要能看懂代码,并且热爱钻研,自行调试。 普通赛车源码+项目说明.zip
资源推荐
资源详情
资源评论
收起资源包目录
普通赛车源码+项目说明.zip (54个子文件)
code_20105
gradle.properties 726B
gradle
wrapper
gradle-wrapper.jar 53KB
gradle-wrapper.properties 230B
app
src
androidTest
java
com
example
admin
balacar
ExampleInstrumentedTest.kt 652B
test
java
com
example
admin
balacar
ExampleUnitTest.kt 350B
main
java
com
example
admin
balacar
SurfaceCartUtil.kt 16KB
BitmapUtil.kt 1KB
ICartFire.java 244B
CartConfig.java 3KB
CarSurfaceActivity.kt 838B
ISurfaceCartState.kt 175B
CarView.kt 3KB
SurfaceRunwayUtil.kt 3KB
CartRandomUtil.java 3KB
res
mipmap-xxhdpi
ic_launcher_round.png 10KB
ic_launcher.png 6KB
mipmap-hdpi
ic_launcher_round.png 5KB
ic_launcher.png 3KB
drawable-v24
ic_launcher_foreground.xml 2KB
mipmap-anydpi-v26
ic_launcher.xml 270B
ic_launcher_round.xml 270B
mipmap-mdpi
ic_launcher_round.png 3KB
ic_launcher.png 2KB
mipmap-xxxhdpi
ic_launcher_round.png 15KB
ic_launcher.png 9KB
mipmap-xhdpi
ic_launcher_round.png 7KB
ic_launcher.png 4KB
values
colors.xml 208B
strings.xml 70B
styles.xml 381B
layout
activity_car_surface.xml 441B
drawable
middle_runway.png 657KB
ic_launcher_background.xml 5KB
c3.png 41KB
ic_fire_01.png 18KB
c1.png 40KB
c4.png 41KB
c2.png 39KB
ic_fire_02.png 18KB
ic_fire_03.png 17KB
AndroidManifest.xml 729B
proguard-rules.pro 751B
build.gradle 1KB
.gitignore 7B
gradlew.bat 2KB
build.gradle 644B
.idea
codeStyles
Project.xml 2KB
runConfigurations.xml 564B
caches
build_file_checksums.ser 537B
misc.xml 2KB
gradle.xml 626B
settings.gradle 15B
gradlew 5KB
.gitignore 137B
共 54 条
- 1
资源评论
土豆片片
- 粉丝: 1567
- 资源: 5643
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功