goods.java

来自「手机RPG游戏」· Java 代码 · 共 47 行

JAVA
47
字号
package obj;

import javax.microedition.lcdui.game.*;
import javax.microedition.lcdui.*;
import main.*;
public class Goods {

public String name;//名字
public int price;//价格
public int n;//数量

public Image img;//图片。

public int imgx;//坐标
public int imgy;

public int imgw;//宽高
public int imgh;
public int number;// 编号
  public Goods() {

    name="";
    price=0;
    n=0;//数量

     imgx=0;
     imgy=0;
     imgw=11;//宽高
     imgh=11;
     img=null;
  }
public void set(Goods good){
    this.name=good.name;
    this.price=good.price;//价格
    this. n=good.n;//数量
    this. img=good.img;//图片。
    this. imgx=good.imgx;//坐标
    this. imgy=good.imgy;
    this. imgw=good.imgw;//宽高
    this. imgh=good.imgh;
    this.number=good.number;
}




}

⌨️ 快捷键说明

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