本文整理汇总了Java中br.com.etyllica.layer.ImageLayer类的典型用法代码示例。如果您正苦于以下问题:Java ImageLayer类的具体用法?Java ImageLayer怎么用?Java ImageLayer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ImageLayer类属于br.com.etyllica.layer包,在下文中一共展示了ImageLayer类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Car
import br.com.etyllica.layer.ImageLayer; //导入依赖的package包/类
public Car() {
super(1700,320);
this.w = 100;
this.h = 20;
layer = new ImageLayer(x,y,"carro.png");
this.actionSucess = PlayerAction.SUPER_JUMP;
this.actionFail = PlayerAction.FALL;
this.difficult = 460;
int offsetX = x-100;
this.heartSequence.add(new Heart(offsetX-640));
this.heartSequence.add(new Heart(offsetX-530));
this.heartSequence.add(new Heart(offsetX-420));
this.heartSequence.add(new Heart(offsetX-270));
this.heartSequence.add(new Heart(offsetX-160));
this.heartSequence.add(new Heart(offsetX-20));
}
示例2: load
import br.com.etyllica.layer.ImageLayer; //导入依赖的package包/类
@Override
public void load() {
background = new ImageLayer("control/controller_cut.jpg");
leftJoystick = new JoystickRadius(36, 110);
rightJoystick = new JoystickRadius(282, 110);
client = new ControllerClient("127.0.0.1", this);
client.start(UPDATE_DELAY);
updateAtFixedRate(UPDATE_DELAY, this);
loading = 100;
}
示例3: load
import br.com.etyllica.layer.ImageLayer; //导入依赖的package包/类
@Override
public void load() {
loadingInfo = "Loading Background...";
background = new ImageLayer("splash.png");
backButton = new RoundButton(40,500,80,80);
backButton.setLabel(new TextLabel("Back"));
backButton.addAction(GUIEvent.MOUSE_LEFT_BUTTON_DOWN, new Action(this, "back"));
add(backButton);
loading = 100;
}
示例4: Background
import br.com.etyllica.layer.ImageLayer; //导入依赖的package包/类
public Background(){
super();
sun = new ImageLayer("sun.png");
clouds = new Parallax("clouds.png");
clouds.setSpeed(-1);
predios = new Parallax("buildings.png");
predios.setSpeed(-2);
grama = new Parallax(230,"grass.png");
grama.setSpeed(-3);
street = new Parallax(190,"street.png");
street.setSpeed(-8);
}
示例5: Parallax
import br.com.etyllica.layer.ImageLayer; //导入依赖的package包/类
public Parallax(int y, String path) {
super();
camada1 = new ImageLayer(0,y,path);
camada2 = new ImageLayer(800,y,path);
}
示例6: Heart
import br.com.etyllica.layer.ImageLayer; //导入依赖的package包/类
public Heart(int x){
super();
layer = new ImageLayer(x,70);
mark = new ImageLayer(x-13,54,marcaNeutro.getPath());
int numbArea = randomArea();
this.area = convertArea(numbArea);
this.secondArea = randomSecondArea(numbArea);
if(HeartArea.UPPER_LEFT==area){
combination = 1;
}
else if(HeartArea.UPPER_RIGHT==area){
combination = 2;
}
else if(HeartArea.LOWER_LEFT==area){
combination = 4;
}
else if(HeartArea.LOWER_RIGHT==area){
combination = 8;
}
if(HeartArea.UPPER_LEFT==secondArea){
combination += 1;
}
else if(HeartArea.UPPER_RIGHT==secondArea){
combination += 2;
}
else if(HeartArea.LOWER_LEFT==secondArea){
combination += 4;
}
else if(HeartArea.LOWER_RIGHT==secondArea){
combination += 8;
}
switch (combination) {
case 1:
layer.cloneLayer(heartq);
break;
case 2:
layer.cloneLayer(heartp);
break;
case 4:
layer.cloneLayer(hearta);
break;
case 8:
layer.cloneLayer(heartl);
break;
case 3: //1+2
layer.cloneLayer(heartqp);
break;
case 5: //1+4
layer.cloneLayer(heartqa);
break;
case 9: //1+8
layer.cloneLayer(heartql);
break;
case 6: //2+4
layer.cloneLayer(heartpa);
break;
case 10: //2+8
layer.cloneLayer(heartpl);
break;
case 12: //4+8
layer.cloneLayer(heartal);
break;
default:
break;
}
}
示例7: getLayer
import br.com.etyllica.layer.ImageLayer; //导入依赖的package包/类
public ImageLayer getLayer(){
return layer;
}
示例8: load
import br.com.etyllica.layer.ImageLayer; //导入依赖的package包/类
@Override
public void load() {
background = new ImageLayer("splash.png");
loadingInfo = "Loading Background...";
loading = 20;
for(int i=0;i<100;i++) {
try {
loading = i;
Thread.sleep(200);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
int offsetY = 300;
playButton = new RoundCornerButton(200,offsetY,400,60);
playButton.setLabel(new TextLabel("Play Game"));
playButton.addAction(GUIEvent.MOUSE_LEFT_BUTTON_DOWN, new Action(this, "play"));
add(playButton);
instructionsButton = new RoundCornerButton(200,offsetY+80,400,60);
instructionsButton.setLabel(new TextLabel("Instructions"));
instructionsButton.addAction(GUIEvent.MOUSE_LEFT_BUTTON_DOWN, new Action(this, "instructions"));
add(instructionsButton);
creditsButton = new RoundCornerButton(200,offsetY+160,400,60);
creditsButton.setLabel(new TextLabel("Credits"));
creditsButton.addAction(GUIEvent.MOUSE_LEFT_BUTTON_DOWN, new Action(this, "credits"));
add(creditsButton);
loading = 100;
}
示例9: load
import br.com.etyllica.layer.ImageLayer; //导入依赖的package包/类
@Override
public void load() {
splash = new ImageLayer("splash.png");
pbLayer = new ImageLayer(299, OFFSET_Y, "pb.png");
height = pbLayer.getH();
}
示例10: load
import br.com.etyllica.layer.ImageLayer; //导入依赖的package包/类
@Override
public void load() {
background = new ImageLayer("background/sor3.png");
wolverine = new BufferedLayer(160,180,"sprites/wolverine.png");
wolverine.setW(64);
wolverine.setH(64);
wolverine.flipHorizontal();
hank = new Beast(40, 100, this);
heroes.add(hank);
gambit = new Gambit(500, 100, this);
heroes.add(gambit);
easyController = new EasyController(hank);
firstPlayerController = new FirstPlayerController(gambit);
strongMan = new StrongMan(300, 100, this);
enemies.add(strongMan);
strongMan.setTarget(hank);
characters.add(strongMan);
characters.add(hank);
characters.add(gambit);
updateAtFixedRate(30, this);
loading = 100;
}
示例11: Hole
import br.com.etyllica.layer.ImageLayer; //导入依赖的package包/类
public Hole() {
super(1400,370);
this.w = 100;
this.h = 20;
layer = new ImageLayer(x,y,"buraco.png");
this.actionSucess = PlayerAction.JUMP;
this.actionFail = PlayerAction.FALL;
this.difficult = 200;
int offsetX = x-100;
/*this.heartSequence.add(new Heart(offsetX-400, HeartArea.LOWER_LEFT));
this.heartSequence.add(new Heart(offsetX-320, HeartArea.UPPER_LEFT));
this.heartSequence.add(new Heart(offsetX-160, HeartArea.UPPER_RIGHT));
this.heartSequence.add(new Heart(offsetX-10, HeartArea.LOWER_RIGHT));*/
this.heartSequence.add(new Heart(offsetX-400));
this.heartSequence.add(new Heart(offsetX-320));
this.heartSequence.add(new Heart(offsetX-160));
this.heartSequence.add(new Heart(offsetX-30));
}