langkah yang pertama
membuat project (File > new project > pilih Java ME > Mobile Application > Masukan Nama
dan seterusnya kalau ada pilihan midp pilih aja yang 2.0 konon katanya itu angka kramat si hehehe?
langkah kedua koding,
file yang akan di buat diantaranya adalah Midlet (terserah mau kasih nama apa, disini saya kasih nama Midlet)
file ini sangat penting, pokoknya penting lah, kalo ingin tau lebih lanjut cari aja sendiri di mbah google
ini contoh printScreenya :
code yang sudah saya susun lengkap seperti ini :
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.util.Timer;
import java.util.TimerTask;
import javax.microedition.lcdui.Display;
import javax.microedition.midlet.*;
/**
* @author Administrator
*/
public class Midlet extends MIDlet {
// ini adalah nama objek yang bibutuhkan
public Display display; //display ini default dari javanya kita tinggal panggila aja
private SplashSponsor splash;// ini berfungsi untuk memanggil class splash guna menampilkan splash
public Menu menu;// ini guna memanggil class menu
private Timer timer;// guna seting waktu
private TimerTask timerTask;
public GameDesign gd;// ini berguna untuk memanggil class Game Design
public Level1 level1;// memanggil game play untuk tingkat 1
public Level2 level2;// untuk memanggil class game play tingkat 2
public About about;// memanggil class abut
public Petunjuk petunjuk;// memanggil class petunjuk
public void startApp() {
//pendeklarasian
display = Display.getDisplay(this); // seting display
splash = new SplashSponsor(this);//10
menu = new Menu(this);//20
level1 = new Level1(this);
level2 = new Level2(this);
display.setCurrent(splash);//3
about = new About(this);
petunjuk = new Petunjuk(this);
try {
Thread.sleep(1000);//11
display.setCurrent(menu);//10
} catch (InterruptedException ex) {
ex.printStackTrace();
}
}
public void pauseApp() {
notifyPaused();
}
public void destroyApp(boolean unconditional) {
notifyDestroyed();//35
}
}
trus file selanjutnya guna menampilkan splash membuat class splash disini saya kasih nama SplashSponsor.java
ini script SplashSponsor.java lengkapnya :
import java.io.IOException;
import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Administrator
*/
public class SplashSponsor extends Canvas implements Runnable {//6 extends
public Midlet midlet ; //ini digunakan untuk memanggil class midlet ini penting juga
private Image img;// objek ini nanti digunakan untuk memanggil gambar
public SplashSponsor (Midlet midlet){// konstruktor
this.midlet = midlet;
try {
img = Image.createImage("/Gambar/Jons.jpg");//memanggil file image di folder anda
} catch (IOException ex) {
ex.printStackTrace();
}
}
public void run() {
}
protected void paint(Graphics g) {
g.setColor(255, 0, 0);// ini untuk menyeting warna, sebenarnya ya ga penting-penting gitu sich
g.drawImage(img, 0, 0, 0);// lah ini yang berfungsi yang akan memunculkan image di layar MOBILE sebagai splash
}
}
jika banyak kode yang terdeteksi error biarin aja dulu, karena kode yang satu dengan kode yang lain itu masih berhubungn, dan file belum tertulis semua, jika semua telah selesai tertulis maka tanda error akan hilang sendirinya.
ok
langkah selanjutnya adalah membuat file menu disini saya buat dengan nama Menu.java, perhatikan kode dibawah ini karena saya menggunakan array dalam pemanggilan image
ini gambarnya, wah kalo ada yang binggung, aku juga bingngung musti gimana ya
source code lengkapanya gina :
import java.io.IOException;
import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Administrator
*/
public class Menu extends Canvas implements Runnable, CommandListener {//
public Midlet midlet;
private Command exitCmd = new Command("exit", Command.EXIT, 0);// code inti beguna untuk membuat menu aja
private Command backCmd = new Command("Back", Command.BACK, 1);
private Image bgMenu;//16
private Image image_menu_off[] = new Image[4];//36
private Image image_menu_on[] = new Image[4];//36
private int currentPost;//37
public Level1 level1;
public Menu(Midlet midlet) {//14
this.midlet = midlet;//15
addCommand(backCmd);//32
addCommand(exitCmd);//32
setCommandListener(this);//32
try {
//15
bgMenu = Image.createImage("/Gambar/menu.png"); //
//disini saya menggunakan array guna memanggil gambar, jumlah gambarnya ada 8
//1 imagesOff_0.png
//2 imagesOff_1.png
//3 imagesOff_2.png
//4 imagesOff_3.png
//1 imagesOn_0.png
//2 imagesOn_1.png
//3 imagesOn_2.png
//4 imagesOn_3.png
for (int i = 0; i < 4; i++) {//
image_menu_off[i] = Image.createImage("/Gambar/imagesOff_" + i + ".png");// image_menu_on[i] = Image.createImage("/Gambar/imagesOn_" + i + ".png");//
}
} catch (IOException ex) {
ex.printStackTrace();
}
new Thread(this).start();//penting aja kelalen ya mas jons 46
}
public void run() {
while (true) {//40
repaint();//41
try {
Thread.sleep(200); //41
} catch (InterruptedException ex) {
ex.printStackTrace();
}
}
}
protected void paint(Graphics g) {
g.setColor(255, 0, 0);//17
g.drawImage(bgMenu, 0, 0, 0);//17
for (int i = 0; i < 4; i++) {//39
if (currentPost == i) {//39
g.drawImage(image_menu_off[i], 50, i * 50 + 50, 0);
} else {//39
g.drawImage(image_menu_on[i], 50, i * 50 + 50, 0);
}//39
}
}
public void commandAction(Command c, Displayable d) {//30
if (c == exitCmd) {//33
midlet.destroyApp(true);//34
}
}
public void keyReleased(int keyCode) {//42
if ((keyCode == 35) || keyCode == -1 && currentPost != 0) {//42
currentPost--;//42
} else if ((keyCode == 56) || keyCode == -2 && currentPost != 3) {//42
currentPost++;//43
}
if ((keyCode == 53) || keyCode == -5 && currentPost == 1) {//44
midlet.display.setCurrent(midlet.petunjuk);
}
if ((keyCode == 53) || keyCode == -5 && currentPost == 2) {//44
midlet.display.setCurrent(midlet.about);
}
if ((keyCode == 53) || keyCode == -5 && currentPost == 3) {//44
midlet.destroyApp(true);
}
if ((keyCode == 53) || keyCode == -5 && currentPost == 0) {//45
midlet.display.setCurrent(midlet.level1);
}
}
}
jika sudah selesai nanti jadinya begitu,
nah sekarang kita tinggal buat GamePlaynya, disini saya memberi nama Level1.java ini sangking banyaknya kode aku juga bingung njelasinnya gimana ya, ya jika kalian kurang jalas tinggal dateng aja ketempatku juga bisa :
ini code lengkapny begini
import java.io.IOException;
import java.util.Timer;
import java.util.TimerTask;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Font;
import javax.microedition.lcdui.Graphics;
//import javax.microedition.lcdui.Image;
import javax.microedition.lcdui.Image;
import javax.microedition.lcdui.game.GameCanvas;
import javax.microedition.lcdui.game.LayerManager;
import javax.microedition.lcdui.game.Sprite;
import javax.microedition.lcdui.game.TiledLayer;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Administrator
*/
public class Level1 extends GameCanvas implements Runnable, CommandListener { //47
public Command cmdExit = new Command("Exit", Command.EXIT, 0);
public Command cmdBack = new Command("Back", Command.BACK, 1);
private Command myNewGameCommand = new Command("New Game", Command.SCREEN, 3);
private long pauseTime;
public Midlet midlet;//48
public GameDesign gd;
public LayerManager lm;
int nyawa = 50;
int score = 0;
private int viewPortX = 0;
private int viewPortY = 0;
private static final int MIN_BUFFER = 20;
private int setTampilanX;
private int setTampilanY;
boolean meledak;
boolean naik;
boolean isPlay;
boolean stop;
private Image musuh, itungan, itungan2, gameOver, menang;
private TiledLayer rumput, batu, batu1, batu2, tanyaKunci, tanya, tanya1, tanya2, tanya3, tanya4;
private TiledLayer soalKunci, soal, soal1, soal2, soal3, soal4, soal5, hp, racun, racun1, racun2, racun3, racun4, racun5;
private TiledLayer papan, papan2, papan3, tlBase, kayu, kayu2, kayu3, kayu4, rumputLaut, rumputLaut1, rumputLaut2, rumputLaut3, rumputLaut4, rumputLaut5;
private Sprite spriteIkan, spriteMusuh, spriteUbur, spriteKuda, spriteKuda2;
private SpriteAnimationTask spriteIkanAnim, spriteMusuhAnim, uburAnim, kudaAnim;
private Sprite spriteMbuel, spriteKura, spriteKepiting;
private SpriteAnimationTask spriteKuda2Anim, spriteKuraAnim, spriteKepitingAnim;
private SpriteRandomMovement spriteKuda2RandomMovement, priteKuraRandomMovement, priteKepitingRandomMovement;
private SpriteRandomMovement uburMove, kudaMove;
private TiledLayer pintuBatu, pintuBatu1, pintuBatu2, pintuBatu3, pintuBatu4, jamur;
private boolean interrupted, solkun;
private byte lastDirection = -1;
private Timer timer = new Timer();
private Musik musik = new Musik();
private Counter c;
private Thread t;
public static final int SPEED = 6;
int posMusX = -5, posMusY = 30, incM = 2;
int posKuX = 70, posKuY = 60, incK = 2;
public Level1(Midlet midlet) {
super(true);
this.midlet = midlet;
try {
musik.playWavMidi("/sound/ol.mid");
} catch (Exception ex) {
ex.printStackTrace();
}
try {
init();
} catch (IOException ex) {
ex.printStackTrace();
}
new Thread(this).start();
c = new Counter();
c.setActive(true);
c.setInc(-1);
timer.scheduleAtFixedRate(c, 1000, 1000);
c.setCount(180);
addCommand(cmdExit);
addCommand(cmdBack);
addCommand(myNewGameCommand);
setCommandListener(this);
}
public void run() {
Graphics g = getGraphics();
while (true) {
lm.paint(g, 0, 0);
if (!isPlay) {
soalKunci.setVisible(false);
soal.setVisible(false);
soal1.setVisible(false);
soal2.setVisible(false);
soal3.setVisible(false);
soal4.setVisible(false);
tanya4.setVisible(false);
jamur.setVisible(false);
}
g.setColor(255, 255, 255);
g.setFont(Font.getFont(Font.FACE_MONOSPACE, Font.STYLE_BOLD, Font.SIZE_SMALL));
g.drawImage(itungan, 0, 0, 0);
g.drawString("Score :" + score, 10, 10, 0);
g.drawImage(itungan2, 0, 50, 0);
g.drawImage(itungan2, 175, 240, 0);
g.drawString("Time " + c.getCount(), 188, 260, 0);
g.drawString("Nyawa :" + nyawa, 10, 70, 0);
spriteMusuh.paint(g);
spriteMusuh.nextFrame();
kendalian();
gerakMusuh();
gerakKuda();
//gerakKuda2();
try {
Thread.sleep(20);
} catch (InterruptedException ex) {
ex.printStackTrace();
}
//kurangi nyawa
if (spriteMusuh.collidesWith(spriteIkan, true)) {
nyawa -= 5;
} else if (spriteIkan.collidesWith(spriteMusuh, true)) {
nyawa -= 5;
}
//kurang score
if (spriteIkan.collidesWith(racun, true)) {
score -= 5;
}
if (spriteIkan.collidesWith(racun2, true)) {
score -= 5;
}
if (spriteIkan.collidesWith(racun4, true)) {
score -= 5;
}
//lain
if (solkun) {
soalKunci.setVisible(true);
tanya4.setVisible(true);
jamur.setVisible(true);
}
if (spriteIkan.collidesWith(this.tanya, true)) {
soal.setVisible(true);
pintuBatu.setVisible(false);
}
if (spriteIkan.collidesWith(this.tanya1, true)) {
soal1.setVisible(true);
pintuBatu1.setVisible(false);
}
if (spriteIkan.collidesWith(this.tanya2, true)) {
soal2.setVisible(true);
pintuBatu2.setVisible(false);
}
if (spriteIkan.collidesWith(this.tanya3, true)) {
soal3.setVisible(true);
pintuBatu3.setVisible(false);
}
if (spriteIkan.collidesWith(this.tanya4, true)) {
soal4.setVisible(true);
pintuBatu4.setVisible(false);
}
if (spriteIkan.collidesWith(rumputLaut1, true)) {
rumputLaut1.setVisible(false);
//score ++
}
//tambah score
if (spriteIkan.collidesWith(hp, true)) {
hp.setVisible(false);
score += 20;
tanya.setVisible(false);
}
if (spriteIkan.collidesWith(spriteKuda2, true)) {
spriteKuda2.setVisible(false);
score += 20;
tanya1.setVisible(false);
}
if (spriteIkan.collidesWith(spriteKura, true)) {
spriteKura.setVisible(false);
score += 20;
tanya2.setVisible(false);
}
if (spriteIkan.collidesWith(spriteUbur, true)) {
spriteUbur.setVisible(false);
score += 20;
tanya3.setVisible(false);
}
if (spriteIkan.collidesWith(spriteKepiting, true)) {
spriteKepiting.setVisible(false);
score += 20;
tanya4.setVisible(false);
}
//tabrak pintu akan mati
if (spriteIkan.collidesWith(pintuBatu, true)) {
nyawa -= 10;
pintuBatu.setVisible(false);
}
if (spriteIkan.collidesWith(pintuBatu1, true)) {
nyawa -= 10;
pintuBatu1.setVisible(false);
}
if (spriteIkan.collidesWith(pintuBatu2, true)) {
nyawa -= 10;
pintuBatu2.setVisible(false);
}
if (spriteIkan.collidesWith(pintuBatu3, true)) {
nyawa -= 10;
pintuBatu3.setVisible(false);
}
if (spriteIkan.collidesWith(pintuBatu4, true)) {
nyawa -= 10;
pintuBatu4.setVisible(false);
}
//finish
if (nyawa <= 0) {
stop = true;
c.setActive(false);
//writeHighScore();
musik.stopMusik(); //Menghentikan suara
//endGame.action(0);
g.drawImage(gameOver, 0, 0, 0);
}
if (score >= 50) {
musik.stopMusik();
try {
stop = true;
c.setActive(false);
g.drawImage(menang, 0, 0, 0);
setFullScreenMode(true);
//endGame.action(0)
Thread.sleep(5000);
midlet.display.setCurrent(midlet.level2);
// midlet.display.setCurrent(midlet.level2);
} catch (Exception ex) {
ex.printStackTrace();
}
//endGame.action(0);
}
if (c.getCount() <= 0) {
stop = true;
musik.stopMusik();
g.drawImage(gameOver, 0, 0, 0);
}
flushGraphics();
}
}
public void action(int action) {
stop = false;
if (action == 0) {
setFullScreenMode(true);
new Thread(this).start();
}
try {
init();
} catch (IOException ex) {
ex.printStackTrace();
}
}
public void init() throws IOException {
this.timer = new Timer();
gd = new GameDesign();
lm = new LayerManager();
this.rumput = gd.getRumput();
musuh = Image.createImage("/Gambar/musuh1.png");
itungan = Image.createImage("/Gambar/tto.png");
itungan2 = Image.createImage("/Gambar/tto-2.png");
gameOver = Image.createImage("/Gambar/GameOvercoy.png");
menang = Image.createImage("/Gambar/Menang.png");
spriteMusuh = new Sprite(musuh, 192 / 4, 48);
this.papan2 = this.gd.getPapan9();
this.tlBase = this.gd.getTlBase();
this.racun = this.gd.getRacun();
this.racun2 = this.gd.getRacun2();
this.racun4 = this.gd.getRacun4();
//objek untuk pintu batu
this.pintuBatu = this.gd.getPintuBatu();
this.pintuBatu1 = this.gd.getPintuBatu1();
this.pintuBatu2 = this.gd.getPintuBatu2();
this.pintuBatu3 = this.gd.getPintuBatu3();
this.pintuBatu4 = this.gd.getPintuBatu4();
//objek untuk soal
this.kayu = this.gd.getKayu();
this.kayu2 = this.gd.getKayu2();
this.kayu3 = this.gd.getKayu3();
this.kayu4 = this.gd.getKayu4();
this.jamur = this.gd.getJamur1();
//batu
this.batu = this.gd.getBatu();
this.batu1 = this.gd.getBatu1();
this.batu2 = this.gd.getBatu2();
//soal
this.soalKunci = this.gd.getSoalKunci();
this.soal = this.gd.getSoal();
this.soal1 = this.gd.getSoal1();
this.soal2 = this.gd.getSoal2();
this.soal3 = this.gd.getSoal3();
this.soal4 = this.gd.getSoal4();
this.hp = this.gd.getHp();
this.tanyaKunci = this.gd.getPertanyaanKunci();
this.tanya = this.gd.getPertanyaan();
this.tanya1 = this.gd.getPertanyaan1();
this.tanya2 = this.gd.getPertanyaan2();
this.tanya3 = this.gd.getPertanyaan3();
this.tanya4 = this.gd.getPertanyaan4();
this.spriteKuda = this.gd.getKuda();
this.rumputLaut1 = this.gd.getRumputLaut1();
this.rumputLaut2 = this.gd.getRumputLaut2();
this.rumputLaut3 = this.gd.getRumputLaut3();
this.rumputLaut4 = this.gd.getRumputLaut4();
this.spriteMbuel = this.gd.getMbuel();
this.spriteIkan = gd.getIkan();
this.spriteIkanAnim = new SpriteAnimationTask(this.spriteIkan, false);
this.timer.scheduleAtFixedRate(this.spriteIkanAnim, 0, gd.ikanBelakangDelay);
this.spriteIkanAnim.setMoving(true);
this.spriteUbur = gd.getUbur();
this.uburAnim = new SpriteAnimationTask(this.spriteUbur, false);
this.timer.scheduleAtFixedRate(this.uburAnim, 0, gd.uburKananDelay);
this.uburAnim.setMoving(true);
//kura
this.spriteKura = gd.getKura();
this.spriteKuraAnim = new SpriteAnimationTask(this.spriteKura, false);
this.timer.scheduleAtFixedRate(this.spriteKuraAnim, 0, gd.kuraseq001Delay);
this.spriteKuraAnim.setMoving(true);
//kepiting
this.spriteKepiting = gd.getKepting();
this.spriteKepitingAnim = new SpriteAnimationTask(this.spriteKepiting, false);
this.timer.scheduleAtFixedRate(this.spriteKepitingAnim, 0, gd.keptingseq001Delay);
this.spriteKepitingAnim.setMoving(true);
this.uburMove = new SpriteRandomMovement(this, spriteUbur);
this.uburMove.setSequences(
gd.uburKanan, Sprite.TRANS_NONE,
gd.uburKiri, Sprite.TRANS_NONE,
gd.uburDepan, Sprite.TRANS_NONE,
gd.uburBelakang, Sprite.TRANS_NONE);
(new Thread(uburMove)).start();
this.spriteKuda2 = gd.getKuda2();
//define the reference in the midle of sprites frame so that transformations work well
this.spriteKuda2.defineReferencePixel(8, 8);
this.spriteKuda2Anim = new SpriteAnimationTask(this.spriteKuda2, true);
this.spriteKuda2Anim.setMoving(true);
this.timer.scheduleAtFixedRate(this.spriteKuda2Anim, 0, gd.kuda2seq001Delay);
this.spriteKuda2RandomMovement = new SpriteRandomMovement(this, spriteKuda2);
gd.updateLayerManagerForArea(lm);
}
public boolean spriteCollides(Sprite sprite) {
return sprite.collidesWith(
sprite == this.spriteIkan ? this.spriteUbur : this.spriteIkan, true) || sprite.collidesWith(this.papan, true) || sprite.collidesWith(this.papan2, true) || sprite.collidesWith(this.papan3, true) || sprite.getX() < 0 || sprite.getY() < 0 || sprite.getX() > (this.tlBase.getWidth() - sprite.getWidth()) || sprite.getY() > (this.tlBase.getHeight() - sprite.getHeight());
}
private void gerakKuda() {
posKuX += incK;// manjalankan burng terbang - ke kiri
if (posKuX > 400) {//mengendalikan laju burung agar berulang kembali lagi
incK--;
}
if (posKuX < 2) {
incK++;
}
spriteKuda.setPosition(posKuX, posKuY);
}
private void gerakMusuh() {
posMusX += incM;
if (posMusX > 400) {
incM--;
}
if (posMusX < -2) {
incM++;
}
spriteMusuh.setPosition(posMusX, posMusY);
}
private void kendalian() {
int keyState = getKeyStates();
//System.out.println(keyState);
if (keyState == LEFT_PRESSED) {
setView(-SPEED, 0, LEFT_PRESSED);
spriteIkan.move(-SPEED, 0);
if (lastDirection != LEFT) {
this.lastDirection = LEFT;
this.spriteIkan.setFrameSequence(gd.ikanKiri);
}
if (this.spriteIkan.getX() <= 0) {
this.spriteIkan.move(+SPEED, 0);
}
if (this.spriteIkan.collidesWith(batu, true)) {
this.spriteIkan.move(+SPEED, 0);
}
if (this.spriteIkan.collidesWith(batu1, true)) {
this.spriteIkan.move(+SPEED, 0);
}
if (this.spriteIkan.collidesWith(pintuBatu4, true)) {
this.spriteIkan.move(+SPEED, 0);
}
spriteIkanAnim.setMoving(true);
} else if (keyState == RIGHT_PRESSED) {
setView(SPEED, 0, RIGHT_PRESSED);
spriteIkan.move(SPEED, 0);
if (lastDirection != RIGHT) {
this.lastDirection = RIGHT;
this.spriteIkan.setFrameSequence(gd.ikanKanan);
}
if (this.spriteIkan.getX() >= 800) {
this.spriteIkan.move(-SPEED, 0);
}
if (this.spriteIkan.collidesWith(batu, true)) {
this.spriteIkan.move(-SPEED, 0);
}
if (this.spriteIkan.collidesWith(batu1, true)) {
this.spriteIkan.move(-SPEED, 0);
}
if (this.spriteIkan.collidesWith(pintuBatu, true)) {
this.spriteIkan.move(-SPEED, 0);
}
if (this.spriteIkan.collidesWith(pintuBatu3, true)) {
this.spriteIkan.move(-SPEED, 0);
}
spriteIkanAnim.setMoving(true);
} else if (keyState == UP_PRESSED) { //jalan kebelakang
setView(0, -SPEED, UP_PRESSED);
spriteIkan.move(0, -SPEED);
if (lastDirection != UP) {
this.lastDirection = UP;
this.spriteIkan.setFrameSequence(gd.ikanBelakang);
}
if (this.spriteIkan.getY() <= 0) {
this.spriteIkan.move(0, +SPEED);
}
if (this.spriteIkan.collidesWith(batu, true)) {
this.spriteIkan.move(0, +SPEED);
}
if (this.spriteIkan.collidesWith(batu1, true)) {
this.spriteIkan.move(0, +SPEED);
}
if (this.spriteIkan.collidesWith(pintuBatu2, true)) {
this.spriteIkan.move(0, +SPEED);
}
spriteIkanAnim.setMoving(true);
} else if (keyState == DOWN_PRESSED) {
setView(0, SPEED, DOWN_PRESSED);
spriteIkan.move(0, SPEED);
if (lastDirection != DOWN) {
this.lastDirection = DOWN;
this.spriteIkan.setFrameSequence(gd.ikanDepan);
}
if (this.spriteIkan.getY() >= 260) {
this.spriteIkan.move(0, -SPEED);
}
if (this.spriteIkan.collidesWith(batu, true)) {
this.spriteIkan.move(0, -SPEED);
}
if (this.spriteIkan.collidesWith(pintuBatu1, true)) {
this.spriteIkan.move(0, -SPEED);
}
spriteIkanAnim.setMoving(true);
} else if (keyState == FIRE_PRESSED) { // tekan tombol tengah
} else {
// this.spritePelajarAnimator.setMoving(false);
spriteIkanAnim.setMoving(false);
}
if (keyState == FIRE_PRESSED && spriteIkan.collidesWith(tanyaKunci, true)) {
solkun = true;
}
}
public void setView(int x, int y, int pos) {
int curX = setTampilanX + ((getWidth() / 2) - (spriteIkan.getWidth() / 2));
int curY = setTampilanY + ((getHeight() / 2) - (spriteIkan.getHeight() / 2));
if (setTampilanX > 0 && pos == LEFT_PRESSED && spriteIkan.getX() < curX) {
setTampilanX += x;
} else if (pos == RIGHT_PRESSED && setTampilanX <= (rumput.getWidth() - getWidth()) && spriteIkan.getX() > curX) {
setTampilanX += x;
}
if (setTampilanY > 0 && pos == UP_PRESSED && spriteIkan.getY() < curY) {
setTampilanY += y;
} else if (pos == DOWN_PRESSED && setTampilanY <= (rumput.getHeight() - getHeight()) && spriteIkan.getY() > curY) {
setTampilanY += y;
}
this.lm.setViewWindow(setTampilanX, setTampilanY, this.getWidth(), this.getHeight());
}
public void commandAction(Command c, Displayable d) {
if (c == cmdExit) {
midlet.destroyApp(true);
musik.stopMusik();
}
if (c == cmdBack) {
midlet.display.setCurrent(midlet.menu);
musik.stopMusik();
}
if (c == myNewGameCommand) {
try {
midlet.startApp();
musik.playWavMidi("/sound/ol1.mid");
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
public void pausAPP() {
midlet.pauseApp();
}
private class SpriteAnimationTask extends TimerTask {
private boolean moving = false;
private boolean forward = true;
private Sprite sprite;
public SpriteAnimationTask(Sprite sprite, boolean forward) {
this.sprite = sprite;
this.forward = forward;
}
public void run() {
if (!this.moving) {
return;
}
if (this.forward) {
this.sprite.nextFrame();
} else {
this.sprite.prevFrame();
}
}
public void forward() {
this.forward = true;
this.moving = true;
}
public void backward() {
this.forward = false;
this.moving = true;
}
public void setMoving(boolean isMoving) {
this.moving = isMoving;
}
}
}
dalam penyusunan code game play ini kita juga perlu menyusun game Desing, untuk menjelaskan game desig ini perlu pembahasan lain lagi, lihat gambar game designi ini
disini saya beri nama GameDesign.java dan source codenya ini :
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.lcdui.game.*;
/**
* @author ICT CENTER PBG
*/
public class GameDesign {
//
private Image tilles_bandung;
private Image _07_Swamp01;
private Image gurita;
private Image ikan1;
private Image kepiting;
private Image iwak;
private Image topview_tiles;
private TiledLayer pohon;
private Image _86_Bulletin01;
private Sprite mbuel;
public int mbuelDepanDelay = 520;
public int[] mbuelDepan = {0, 1, 2, 3, 4, 5, 3, 11, 15, 3, 6, 3, 2};
private Image bes;
private Sprite ikan;
public int ikanBelakangDelay = 200;
public int[] ikanBelakang = {12, 13, 14, 15};
public int ikanKananDelay = 200;
public int[] ikanKanan = {8, 9, 10, 11};
public int ikanKiriDelay = 200;
public int[] ikanKiri = {4, 5, 6, 7};
public int ikanDepanDelay = 200;
public int[] ikanDepan = {0, 1, 2, 3};
private TiledLayer pintuBatu3;
private TiledLayer pintuBatu2;
private Sprite ubur;
public int uburBelakangDelay = 200;
public int[] uburBelakang = {12, 13, 14, 15};
public int uburKananDelay = 200;
public int[] uburKanan = {4, 5, 6, 7};
public int uburKiriDelay = 200;
public int[] uburKiri = {8, 9, 10, 11};
public int uburDepanDelay = 200;
public int[] uburDepan = {0, 1, 2, 3};
private TiledLayer pintuBatu4;
private Image ubur_ubur;
private TiledLayer hp8;
private TiledLayer hp7;
private TiledLayer hp1;
private TiledLayer hp4;
private TiledLayer hp;
private Sprite kuda;
public int kudaDepanDelay = 200;
public int[] kudaDepan = {10, 11, 12, 13, 14};
private Image hadiah;
private Image zorf;
private Image tanya;
private TiledLayer point;
private Image kotak;
private TiledLayer pintuBatu;
private TiledLayer soal2;
private Image kepiting_1001;
private TiledLayer papan8;
private Image kepiting_2;
private Sprite kepting;
public int keptingseq001Delay = 200;
public int[] keptingseq001 = {10, 0, 5, 13, 14};
private Image kepiting_1;
private Image kataKunci;
private TiledLayer soalKunci;
private TiledLayer pertanyaanKunci;
private TiledLayer jamur1;
private Image jamur;
private TiledLayer jamur2;
private TiledLayer batu1;
private Image Mutiara;
private TiledLayer rumput;
private Image iwak001;
private TiledLayer batu2;
private Image bintangJ;
private TiledLayer soal;
private Image _07_Swamp01001;
private TiledLayer racun;
private TiledLayer rumputLaut1;
private TiledLayer kayu4;
private TiledLayer racun2;
private TiledLayer kayu;
private TiledLayer kayu3;
private TiledLayer rumputLaut2;
private TiledLayer batu;
private TiledLayer kayu2;
private TiledLayer soal4;
private Image kuda_Laut;
private TiledLayer pintuBatu1;
private TiledLayer soal3;
private Image kura_kura_1;
private Image kura_kura;
private Image cumi;
private Sprite kura;
public int kuraseq001Delay = 200;
public int[] kuraseq001 = {0, 1, 6, 3, 0};
private TiledLayer papan9;
private TiledLayer tlBase;
private TiledLayer rumputLaut4;
private TiledLayer rumputLaut3;
private TiledLayer rumputlaut3;
private TiledLayer batang2;
private TiledLayer batang;
private TiledLayer racun4;
private Image marmut;
private TiledLayer soal1;
private Image bintang_lauttt;
private Image gurita_1;
private TiledLayer pertanyaan4;
private Sprite kuda2;
public int kuda2seq001Delay = 200;
public int[] kuda2seq001 = {16, 18, 19, 19, 19};
private TiledLayer batubatu;
private Image zorf001;
private TiledLayer pertanyaan;
private TiledLayer pertanyaan1;
private TiledLayer pertanyaan2;
private TiledLayer pertanyaan3;
//
//
//
public Image getTilles_bandung() throws java.io.IOException {
if (tilles_bandung == null) {
// write pre-init user code here
tilles_bandung = Image.createImage("/Images/tilles bandung.png");
}
// write post-init user code here
return this.tilles_bandung;
}
public Image get_07_Swamp01() throws java.io.IOException {
if (_07_Swamp01 == null) {
// write pre-init user code here
_07_Swamp01 = Image.createImage("/Images/007-Swamp01.png");
}
// write post-init user code here
return this._07_Swamp01;
}
public Image get_86_Bulletin01() throws java.io.IOException {
if (_86_Bulletin01 == null) {
// write pre-init user code here
_86_Bulletin01 = Image.createImage("/Images/186-Bulletin01.png");
}
// write post-init user code here
return this._86_Bulletin01;
}
public TiledLayer getPapan9() throws java.io.IOException {
if (papan9 == null) {
// write pre-init user code here
papan9 = new TiledLayer(1, 1, get_86_Bulletin01(), 32, 48);
int[][] tiles = {
{ 13 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
papan9.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return papan9;
}
public TiledLayer getRumput() throws java.io.IOException {
if (rumput == null) {
// write pre-init user code here
rumput = new TiledLayer(55, 21, getTilles_bandung(), 16, 16);
int[][] tiles = {
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 254, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 }
};
// write mid-init user code here
for (int row = 0; row < 21; row++) {
for (int col = 0; col < 55; col++) {
rumput.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return rumput;
}
public void updateLayerManagerForArea(LayerManager lm) throws java.io.IOException {
// write pre-update user code here
getSoalKunci().setPosition(14, 394);
getSoalKunci().setVisible(true);
lm.append(getSoalKunci());
getPertanyaanKunci().setPosition(88, 212);
getPertanyaanKunci().setVisible(true);
lm.append(getPertanyaanKunci());
getSoal2().setPosition(130, 494);
getSoal2().setVisible(true);
lm.append(getSoal2());
getSoal1().setPosition(228, 401);
getSoal1().setVisible(true);
lm.append(getSoal1());
getSoal3().setPosition(444, 402);
getSoal3().setVisible(true);
lm.append(getSoal3());
getSoal4().setPosition(558, 421);
getSoal4().setVisible(true);
lm.append(getSoal4());
getSoal().setPosition(665, 391);
getSoal().setVisible(true);
lm.append(getSoal());
getPertanyaan().setPosition(486, 14);
getPertanyaan().setVisible(true);
lm.append(getPertanyaan());
getBatang().setPosition(472, 12);
getBatang().setVisible(true);
lm.append(getBatang());
getJamur1().setPosition(759, 211);
getJamur1().setVisible(true);
lm.append(getJamur1());
getKayu2().setPosition(634, 22);
getKayu2().setVisible(true);
lm.append(getKayu2());
getPertanyaan2().setPosition(628, 9);
getPertanyaan2().setVisible(true);
lm.append(getPertanyaan2());
getPintuBatu4().setPosition(734, 14);
getPintuBatu4().setVisible(true);
lm.append(getPintuBatu4());
getPintuBatu3().setPosition(478, 246);
getPintuBatu3().setVisible(true);
lm.append(getPintuBatu3());
getPintuBatu2().setPosition(481, 101);
getPintuBatu2().setVisible(true);
lm.append(getPintuBatu2());
getPintuBatu().setPosition(252, 249);
getPintuBatu().setVisible(true);
lm.append(getPintuBatu());
getPintuBatu1().setPosition(379, 212);
getPintuBatu1().setVisible(true);
lm.append(getPintuBatu1());
getRacun2().setPosition(172, 13);
getRacun2().setVisible(true);
lm.append(getRacun2());
getRacun().setPosition(818, 263);
getRacun().setVisible(true);
lm.append(getRacun());
getRumputLaut2().setPosition(159, 116);
getRumputLaut2().setVisible(true);
lm.append(getRumputLaut2());
getKepting().setPosition(489, 14);
getKepting().setVisible(true);
lm.append(getKepting());
getKura().setPosition(545, 228);
getKura().setVisible(true);
lm.append(getKura());
getKuda2().setPosition(629, 15);
getKuda2().setVisible(true);
lm.append(getKuda2());
getPertanyaan4().setPosition(762, 218);
getPertanyaan4().setVisible(true);
lm.append(getPertanyaan4());
getPertanyaan3().setPosition(444, 241);
getPertanyaan3().setVisible(true);
lm.append(getPertanyaan3());
getPertanyaan1().setPosition(296, 178);
getPertanyaan1().setVisible(true);
lm.append(getPertanyaan1());
getBatu1().setPosition(448, 8);
getBatu1().setVisible(true);
lm.append(getBatu1());
getHp().setPosition(275, 203);
getHp().setVisible(true);
lm.append(getHp());
getKuda().setPosition(134, 80);
getKuda().setVisible(true);
lm.append(getKuda());
getRacun4().setPosition(657, 271);
getRacun4().setVisible(true);
lm.append(getRacun4());
getRumputLaut4().setPosition(516, 0);
getRumputLaut4().setVisible(true);
lm.append(getRumputLaut4());
getRumputLaut3().setPosition(776, 62);
getRumputLaut3().setVisible(true);
lm.append(getRumputLaut3());
getKayu3().setPosition(276, 178);
getKayu3().setVisible(true);
lm.append(getKayu3());
getBatang2().setPosition(71, 205);
getBatang2().setVisible(true);
lm.append(getBatang2());
getRumputLaut1().setPosition(443, 179);
getRumputLaut1().setVisible(true);
lm.append(getRumputLaut1());
getPohon().setPosition(770, 156);
getPohon().setVisible(true);
lm.append(getPohon());
getKayu4().setPosition(419, 237);
getKayu4().setVisible(true);
lm.append(getKayu4());
getKayu().setPosition(0, 302);
getKayu().setVisible(true);
lm.append(getKayu());
getBatu().setPosition(246, 124);
getBatu().setVisible(true);
lm.append(getBatu());
getTlBase().setPosition(61, 318);
getTlBase().setVisible(true);
lm.append(getTlBase());
getUbur().setPosition(369, 282);
getUbur().setVisible(true);
lm.append(getUbur());
getPapan9().setPosition(218, 208);
getPapan9().setVisible(true);
lm.append(getPapan9());
getIkan().setPosition(-1, 256);
getIkan().setVisible(true);
lm.append(getIkan());
getRumput().setPosition(-4, 0);
getRumput().setVisible(true);
lm.append(getRumput());
// write post-update user code here
}
public Image getMarmut() throws java.io.IOException {
if (marmut == null) {
// write pre-init user code here
marmut = Image.createImage("/Images/marmut.png");
}
// write post-init user code here
return this.marmut;
}
public Image getIwak() throws java.io.IOException {
if (iwak == null) {
// write pre-init user code here
iwak = Image.createImage("/Images/iwak.png");
}
// write post-init user code here
return this.iwak;
}
public Image getUbur_ubur() throws java.io.IOException {
if (ubur_ubur == null) {
// write pre-init user code here
ubur_ubur = Image.createImage("/Images/ubur-ubur.png");
}
// write post-init user code here
return this.ubur_ubur;
}
public Sprite getUbur() throws java.io.IOException {
if (ubur == null) {
// write pre-init user code here
ubur = new Sprite(getUbur_ubur(), 48, 48);
ubur.setFrameSequence(uburDepan);
// write post-init user code here
}
return ubur;
}
public Sprite getIkan() throws java.io.IOException {
if (ikan == null) {
// write pre-init user code here
ikan = new Sprite(getIwak(), 64, 48);
ikan.setFrameSequence(ikanDepan);
// write post-init user code here
}
return ikan;
}
public TiledLayer getTlBase() throws java.io.IOException {
if (tlBase == null) {
// write pre-init user code here
tlBase = new TiledLayer(39, 1, getTilles_bandung(), 16, 16);
int[][] tiles = {
{ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 43 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 39; col++) {
tlBase.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return tlBase;
}
public Image get_07_Swamp01001() throws java.io.IOException {
if (_07_Swamp01001 == null) {
// write pre-init user code here
_07_Swamp01001 = Image.createImage("/Gambar/007-Swamp01.png");
}
// write post-init user code here
return this._07_Swamp01001;
}
public TiledLayer getKayu4() throws java.io.IOException {
if (kayu4 == null) {
// write pre-init user code here
kayu4 = new TiledLayer(2, 1, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 33, 34 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 2; col++) {
kayu4.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return kayu4;
}
public TiledLayer getRumputLaut1() throws java.io.IOException {
if (rumputLaut1 == null) {
// write pre-init user code here
rumputLaut1 = new TiledLayer(1, 1, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 13 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
rumputLaut1.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return rumputLaut1;
}
public TiledLayer getRumputLaut2() throws java.io.IOException {
if (rumputLaut2 == null) {
// write pre-init user code here
rumputLaut2 = new TiledLayer(3, 3, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 14, 0, 0 },
{ 20, 20, 20 },
{ 0, 20, 0 }
};
// write mid-init user code here
for (int row = 0; row < 3; row++) {
for (int col = 0; col < 3; col++) {
rumputLaut2.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return rumputLaut2;
}
public TiledLayer getKayu3() throws java.io.IOException {
if (kayu3 == null) {
// write pre-init user code here
kayu3 = new TiledLayer(2, 1, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 28, 29 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 2; col++) {
kayu3.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return kayu3;
}
public TiledLayer getKayu2() throws java.io.IOException {
if (kayu2 == null) {
// write pre-init user code here
kayu2 = new TiledLayer(1, 1, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 38 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
kayu2.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return kayu2;
}
public TiledLayer getBatu() throws java.io.IOException {
if (batu == null) {
// write pre-init user code here
batu = new TiledLayer(13, 6, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 11, 11, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 11, 0, 0, 11, 0, 0, 0, 11, 11, 11, 11, 11, 11 },
{ 11, 0, 0, 11, 0, 0, 11, 11, 0, 0, 0, 0, 11 },
{ 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 11 },
{ 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 11 }
};
// write mid-init user code here
for (int row = 0; row < 6; row++) {
for (int col = 0; col < 13; col++) {
batu.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return batu;
}
public TiledLayer getKayu() throws java.io.IOException {
if (kayu == null) {
// write pre-init user code here
kayu = new TiledLayer(2, 1, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 39, 40 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 2; col++) {
kayu.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return kayu;
}
public TiledLayer getPohon() throws java.io.IOException {
if (pohon == null) {
// write pre-init user code here
pohon = new TiledLayer(4, 4, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 45, 42, 47, 0 },
{ 41, 54, 55, 56 },
{ 57, 62, 63, 64 },
{ 69, 70, 71, 72 }
};
// write mid-init user code here
for (int row = 0; row < 4; row++) {
for (int col = 0; col < 4; col++) {
pohon.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return pohon;
}
public Image getTopview_tiles() throws java.io.IOException {
if (topview_tiles == null) {
// write pre-init user code here
topview_tiles = Image.createImage("/topview_tiles.png");
}
// write post-init user code here
return this.topview_tiles;
}
public TiledLayer getBatang() throws java.io.IOException {
if (batang == null) {
// write pre-init user code here
batang = new TiledLayer(2, 1, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 108, 109 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 2; col++) {
batang.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return batang;
}
public TiledLayer getBatang2() throws java.io.IOException {
if (batang2 == null) {
// write pre-init user code here
batang2 = new TiledLayer(2, 1, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 110, 111 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 2; col++) {
batang2.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return batang2;
}
public TiledLayer getRacun4() throws java.io.IOException {
if (racun4 == null) {
// write pre-init user code here
racun4 = new TiledLayer(1, 1, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 12 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
racun4.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return racun4;
}
public TiledLayer getRumputLaut3() throws java.io.IOException {
if (rumputLaut3 == null) {
// write pre-init user code here
rumputLaut3 = new TiledLayer(3, 2, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 23, 23, 0 },
{ 23, 23, 23 }
};
// write mid-init user code here
for (int row = 0; row < 2; row++) {
for (int col = 0; col < 3; col++) {
rumputLaut3.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return rumputLaut3;
}
public TiledLayer getRumputLaut4() throws java.io.IOException {
if (rumputLaut4 == null) {
// write pre-init user code here
rumputLaut4 = new TiledLayer(2, 1, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 15, 16 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 2; col++) {
rumputLaut4.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return rumputLaut4;
}
public TiledLayer getRumputlaut3() throws java.io.IOException {
if (rumputlaut3 == null) {
// write pre-init user code here
rumputlaut3 = new TiledLayer(2, 2, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 15, 22 },
{ 21, 21 }
};
// write mid-init user code here
for (int row = 0; row < 2; row++) {
for (int col = 0; col < 2; col++) {
rumputlaut3.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return rumputlaut3;
}
public Image getZorf() throws java.io.IOException {
if (zorf == null) {
// write pre-init user code here
zorf = Image.createImage("/Images/zorf.png");
}
// write post-init user code here
return this.zorf;
}
public Sprite getKuda() throws java.io.IOException {
if (kuda == null) {
// write pre-init user code here
kuda = new Sprite(getZorf(), 80, 80);
kuda.setFrameSequence(kudaDepan);
// write post-init user code here
}
return kuda;
}
public Image getKotak() throws java.io.IOException {
if (kotak == null) {
// write pre-init user code here
kotak = Image.createImage("/Gambar/kotak.png");
}
// write post-init user code here
return this.kotak;
}
public Image getHadiah() throws java.io.IOException {
if (hadiah == null) {
// write pre-init user code here
hadiah = Image.createImage("/Gambar/hadiah.png");
}
// write post-init user code here
return this.hadiah;
}
public TiledLayer getHp() throws java.io.IOException {
if (hp == null) {
// write pre-init user code here
hp = new TiledLayer(3, 2, getHadiah(), 24, 24);
int[][] tiles = {
{ 0, 1, 0 },
{ 1, 1, 1 }
};
// write mid-init user code here
for (int row = 0; row < 2; row++) {
for (int col = 0; col < 3; col++) {
hp.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return hp;
}
public TiledLayer getHp1() throws java.io.IOException {
if (hp1 == null) {
// write pre-init user code here
hp1 = new TiledLayer(1, 1, getHadiah(), 24, 24);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
hp1.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return hp1;
}
public TiledLayer getHp4() throws java.io.IOException {
if (hp4 == null) {
// write pre-init user code here
hp4 = new TiledLayer(1, 1, getHadiah(), 24, 24);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
hp4.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return hp4;
}
public TiledLayer getHp7() throws java.io.IOException {
if (hp7 == null) {
// write pre-init user code here
hp7 = new TiledLayer(1, 1, getHadiah(), 24, 24);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
hp7.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return hp7;
}
public TiledLayer getHp8() throws java.io.IOException {
if (hp8 == null) {
// write pre-init user code here
hp8 = new TiledLayer(1, 1, getHadiah(), 24, 24);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
hp8.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return hp8;
}
public Image getBes() throws java.io.IOException {
if (bes == null) {
// write pre-init user code here
bes = Image.createImage("/Gambar/bes.png");
}
// write post-init user code here
return this.bes;
}
public Sprite getMbuel() throws java.io.IOException {
if (mbuel == null) {
// write pre-init user code here
mbuel = new Sprite(getBes(), 64, 64);
mbuel.setFrameSequence(mbuelDepan);
// write post-init user code here
}
return mbuel;
}
public Image getTanya() throws java.io.IOException {
if (tanya == null) {
// write pre-init user code here
tanya = Image.createImage("/Gambar/tanya.png");
}
// write post-init user code here
return this.tanya;
}
public TiledLayer getPertanyaan() throws java.io.IOException {
if (pertanyaan == null) {
// write pre-init user code here
pertanyaan = new TiledLayer(1, 1, getTanya(), 24, 24);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
pertanyaan.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return pertanyaan;
}
public TiledLayer getPertanyaan1() throws java.io.IOException {
if (pertanyaan1 == null) {
// write pre-init user code here
pertanyaan1 = new TiledLayer(1, 1, getTanya(), 24, 24);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
pertanyaan1.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return pertanyaan1;
}
public TiledLayer getPertanyaan2() throws java.io.IOException {
if (pertanyaan2 == null) {
// write pre-init user code here
pertanyaan2 = new TiledLayer(1, 1, getTanya(), 24, 24);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
pertanyaan2.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return pertanyaan2;
}
public TiledLayer getPertanyaan3() throws java.io.IOException {
if (pertanyaan3 == null) {
// write pre-init user code here
pertanyaan3 = new TiledLayer(1, 1, getTanya(), 24, 24);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
pertanyaan3.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return pertanyaan3;
}
public TiledLayer getPertanyaan4() throws java.io.IOException {
if (pertanyaan4 == null) {
// write pre-init user code here
pertanyaan4 = new TiledLayer(1, 1, getTanya(), 24, 24);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
pertanyaan4.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return pertanyaan4;
}
public TiledLayer getBatu1() throws java.io.IOException {
if (batu1 == null) {
// write pre-init user code here
batu1 = new TiledLayer(10, 4, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 11, 0, 0, 0, 11, 0, 0, 0, 0, 0 },
{ 11, 0, 0, 0, 11, 0, 0, 0, 0, 0 },
{ 11, 0, 0, 0, 11, 0, 0, 0, 0, 11 },
{ 11, 0, 0, 11, 11, 11, 11, 11, 11, 11 }
};
// write mid-init user code here
for (int row = 0; row < 4; row++) {
for (int col = 0; col < 10; col++) {
batu1.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return batu1;
}
public TiledLayer getBatu2() throws java.io.IOException {
if (batu2 == null) {
// write pre-init user code here
batu2 = new TiledLayer(1, 6, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 11 },
{ 11 },
{ 11 },
{ 11 },
{ 11 },
{ 11 }
};
// write mid-init user code here
for (int row = 0; row < 6; row++) {
for (int col = 0; col < 1; col++) {
batu2.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return batu2;
}
public Image getKura_kura() throws java.io.IOException {
if (kura_kura == null) {
// write pre-init user code here
kura_kura = Image.createImage("/Gambar/kura-kura.png");
}
// write post-init user code here
return this.kura_kura;
}
public Sprite getKura() throws java.io.IOException {
if (kura == null) {
// write pre-init user code here
kura = new Sprite(getKura_kura(), 80, 80);
kura.setFrameSequence(kuraseq001);
// write post-init user code here
}
return kura;
}
public TiledLayer getPapan8() throws java.io.IOException {
if (papan8 == null) {
// write pre-init user code here
papan8 = new TiledLayer(1, 1, get_86_Bulletin01(), 32, 48);
int[][] tiles = {
{ 16 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
papan8.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return papan8;
}
public TiledLayer getPoint() throws java.io.IOException {
if (point == null) {
// write pre-init user code here
point = new TiledLayer(1, 1, getKotak(), 24, 24);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
point.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return point;
}
public Image getCumi() throws java.io.IOException {
if (cumi == null) {
// write pre-init user code here
cumi = Image.createImage("/Gambar/cumi.png");
}
// write post-init user code here
return this.cumi;
}
public Image getGurita() throws java.io.IOException {
if (gurita == null) {
// write pre-init user code here
gurita = Image.createImage("/Gambar/gurita.png");
}
// write post-init user code here
return this.gurita;
}
public Image getIkan1() throws java.io.IOException {
if (ikan1 == null) {
// write pre-init user code here
ikan1 = Image.createImage("/Gambar/ikan1.png");
}
// write post-init user code here
return this.ikan1;
}
public Image getKepiting() throws java.io.IOException {
if (kepiting == null) {
// write pre-init user code here
kepiting = Image.createImage("/Gambar/kepiting.png");
}
// write post-init user code here
return this.kepiting;
}
public Image getBintang_lauttt() throws java.io.IOException {
if (bintang_lauttt == null) {
// write pre-init user code here
bintang_lauttt = Image.createImage("/Gambar/bintang lauttt.png");
}
// write post-init user code here
return this.bintang_lauttt;
}
public Image getIwak001() throws java.io.IOException {
if (iwak001 == null) {
// write pre-init user code here
iwak001 = Image.createImage("/Gambar/iwak.png");
}
// write post-init user code here
return this.iwak001;
}
public Image getBintangJ() throws java.io.IOException {
if (bintangJ == null) {
// write pre-init user code here
bintangJ = Image.createImage("/Gambar/bintangJ.png");
}
// write post-init user code here
return this.bintangJ;
}
public Image getKepiting_1() throws java.io.IOException {
if (kepiting_1 == null) {
// write pre-init user code here
kepiting_1 = Image.createImage("/Images/imagesOn_3.png");
}
// write post-init user code here
return this.kepiting_1;
}
public Image getZorf001() throws java.io.IOException {
if (zorf001 == null) {
// write pre-init user code here
zorf001 = Image.createImage("/Gambar/zorf.png");
}
// write post-init user code here
return this.zorf001;
}
public Sprite getKuda2() throws java.io.IOException {
if (kuda2 == null) {
// write pre-init user code here
kuda2 = new Sprite(getZorf001(), 80, 80);
kuda2.setFrameSequence(kuda2seq001);
// write post-init user code here
}
return kuda2;
}
public Image getKepiting_2() throws java.io.IOException {
if (kepiting_2 == null) {
// write pre-init user code here
kepiting_2 = Image.createImage("/Gambar/kepiting_2.png");
}
// write post-init user code here
return this.kepiting_2;
}
public Sprite getKepting() throws java.io.IOException {
if (kepting == null) {
// write pre-init user code here
kepting = new Sprite(getKepiting_2(), 80, 80);
kepting.setFrameSequence(keptingseq001);
// write post-init user code here
}
return kepting;
}
public TiledLayer getRacun() throws java.io.IOException {
if (racun == null) {
// write pre-init user code here
racun = new TiledLayer(1, 1, getBes(), 64, 64);
int[][] tiles = {
{ 4 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
racun.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return racun;
}
public TiledLayer getRacun2() throws java.io.IOException {
if (racun2 == null) {
// write pre-init user code here
racun2 = new TiledLayer(1, 1, getKotak(), 24, 24);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
racun2.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return racun2;
}
public Image getJamur() throws java.io.IOException {
if (jamur == null) {
// write pre-init user code here
jamur = Image.createImage("/Gambar/jamur.png");
}
// write post-init user code here
return this.jamur;
}
public TiledLayer getJamur1() throws java.io.IOException {
if (jamur1 == null) {
// write pre-init user code here
jamur1 = new TiledLayer(1, 1, getJamur(), 32, 48);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
jamur1.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return jamur1;
}
public TiledLayer getJamur2() throws java.io.IOException {
if (jamur2 == null) {
// write pre-init user code here
jamur2 = new TiledLayer(1, 1, getJamur(), 32, 48);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
jamur2.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return jamur2;
}
public TiledLayer getPintuBatu1() throws java.io.IOException {
if (pintuBatu1 == null) {
// write pre-init user code here
pintuBatu1 = new TiledLayer(2, 1, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 39, 40 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 2; col++) {
pintuBatu1.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return pintuBatu1;
}
public TiledLayer getPintuBatu() throws java.io.IOException {
if (pintuBatu == null) {
// write pre-init user code here
pintuBatu = new TiledLayer(1, 2, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 24 },
{ 32 }
};
// write mid-init user code here
for (int row = 0; row < 2; row++) {
for (int col = 0; col < 1; col++) {
pintuBatu.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return pintuBatu;
}
public TiledLayer getPintuBatu2() throws java.io.IOException {
if (pintuBatu2 == null) {
// write pre-init user code here
pintuBatu2 = new TiledLayer(2, 1, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 39, 40 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 2; col++) {
pintuBatu2.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return pintuBatu2;
}
public TiledLayer getPintuBatu3() throws java.io.IOException {
if (pintuBatu3 == null) {
// write pre-init user code here
pintuBatu3 = new TiledLayer(1, 2, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 24 },
{ 32 }
};
// write mid-init user code here
for (int row = 0; row < 2; row++) {
for (int col = 0; col < 1; col++) {
pintuBatu3.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return pintuBatu3;
}
public TiledLayer getPintuBatu4() throws java.io.IOException {
if (pintuBatu4 == null) {
// write pre-init user code here
pintuBatu4 = new TiledLayer(1, 2, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 24 },
{ 32 }
};
// write mid-init user code here
for (int row = 0; row < 2; row++) {
for (int col = 0; col < 1; col++) {
pintuBatu4.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return pintuBatu4;
}
public Image getMutiara() throws java.io.IOException {
if (Mutiara == null) {
// write pre-init user code here
Mutiara = Image.createImage("/Gambar/Mutiara.png");
}
// write post-init user code here
return this.Mutiara;
}
public TiledLayer getSoal() throws java.io.IOException {
if (soal == null) {
// write pre-init user code here
soal = new TiledLayer(1, 1, getMutiara(), 193, 96);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
soal.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return soal;
}
public Image getKuda_Laut() throws java.io.IOException {
if (kuda_Laut == null) {
// write pre-init user code here
kuda_Laut = Image.createImage("/Gambar/kuda Laut.png");
}
// write post-init user code here
return this.kuda_Laut;
}
public TiledLayer getSoal4() throws java.io.IOException {
if (soal4 == null) {
// write pre-init user code here
soal4 = new TiledLayer(1, 1, getKuda_Laut(), 193, 96);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
soal4.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return soal4;
}
public Image getKura_kura_1() throws java.io.IOException {
if (kura_kura_1 == null) {
// write pre-init user code here
kura_kura_1 = Image.createImage("/Gambar/kura-kura_1.png");
}
// write post-init user code here
return this.kura_kura_1;
}
public TiledLayer getSoal3() throws java.io.IOException {
if (soal3 == null) {
// write pre-init user code here
soal3 = new TiledLayer(1, 1, getKura_kura_1(), 193, 96);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
soal3.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return soal3;
}
public Image getGurita_1() throws java.io.IOException {
if (gurita_1 == null) {
// write pre-init user code here
gurita_1 = Image.createImage("/Gambar/gurita_1.png");
}
// write post-init user code here
return this.gurita_1;
}
public TiledLayer getSoal1() throws java.io.IOException {
if (soal1 == null) {
// write pre-init user code here
soal1 = new TiledLayer(1, 1, getGurita_1(), 193, 96);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
soal1.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return soal1;
}
public Image getKepiting_1001() throws java.io.IOException {
if (kepiting_1001 == null) {
// write pre-init user code here
kepiting_1001 = Image.createImage("/Gambar/kepiting_1.png");
}
// write post-init user code here
return this.kepiting_1001;
}
public TiledLayer getSoal2() throws java.io.IOException {
if (soal2 == null) {
// write pre-init user code here
soal2 = new TiledLayer(1, 1, getKepiting_1001(), 193, 96);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
soal2.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return soal2;
}
public TiledLayer getPertanyaanKunci() throws java.io.IOException {
if (pertanyaanKunci == null) {
// write pre-init user code here
pertanyaanKunci = new TiledLayer(1, 1, getTanya(), 24, 24);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
pertanyaanKunci.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return pertanyaanKunci;
}
public Image getKataKunci() throws java.io.IOException {
if (kataKunci == null) {
// write pre-init user code here
kataKunci = Image.createImage("/Gambar/kataKunci.png");
}
// write post-init user code here
return this.kataKunci;
}
public TiledLayer getSoalKunci() throws java.io.IOException {
if (soalKunci == null) {
// write pre-init user code here
soalKunci = new TiledLayer(1, 1, getKataKunci(), 193, 96);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
soalKunci.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return soalKunci;
}
public void updateLayerManagerForArea2(LayerManager lm) throws java.io.IOException {
// write pre-update user code here
getBatubatu().setPosition(8, 20);
getBatubatu().setVisible(true);
lm.append(getBatubatu());
getHp1().setPosition(0, 0);
getHp1().setVisible(true);
lm.append(getHp1());
getSoalKunci().setPosition(146, 59);
getSoalKunci().setVisible(true);
lm.append(getSoalKunci());
getPertanyaanKunci().setPosition(229, 49);
getPertanyaanKunci().setVisible(true);
lm.append(getPertanyaanKunci());
getSoal2().setPosition(526, 20);
getSoal2().setVisible(true);
lm.append(getSoal2());
getSoal1().setPosition(7, 177);
getSoal1().setVisible(true);
lm.append(getSoal1());
getSoal3().setPosition(119, 219);
getSoal3().setVisible(true);
lm.append(getSoal3());
getSoal4().setPosition(461, 209);
getSoal4().setVisible(true);
lm.append(getSoal4());
getSoal().setPosition(352, 15);
getSoal().setVisible(true);
lm.append(getSoal());
getPertanyaan().setPosition(434, 3);
getPertanyaan().setVisible(true);
lm.append(getPertanyaan());
getJamur1().setPosition(539, 188);
getJamur1().setVisible(true);
lm.append(getJamur1());
getPertanyaan2().setPosition(612, 1);
getPertanyaan2().setVisible(true);
lm.append(getPertanyaan2());
getPintuBatu4().setPosition(669, 2);
getPintuBatu4().setVisible(true);
lm.append(getPintuBatu4());
getPintuBatu3().setPosition(237, 251);
getPintuBatu3().setVisible(true);
lm.append(getPintuBatu3());
getPintuBatu2().setPosition(420, 100);
getPintuBatu2().setVisible(true);
lm.append(getPintuBatu2());
getPintuBatu().setPosition(106, 114);
getPintuBatu().setVisible(true);
lm.append(getPintuBatu());
getPintuBatu1().setPosition(132, 190);
getPintuBatu1().setVisible(true);
lm.append(getPintuBatu1());
getRumputLaut2().setPosition(6, -32);
getRumputLaut2().setVisible(true);
lm.append(getRumputLaut2());
getKepting().setPosition(422, 17);
getKepting().setVisible(true);
lm.append(getKepting());
getKura().setPosition(321, 221);
getKura().setVisible(true);
lm.append(getKura());
getKuda2().setPosition(537, 27);
getKuda2().setVisible(true);
lm.append(getKuda2());
getPertanyaan4().setPosition(544, 199);
getPertanyaan4().setVisible(true);
lm.append(getPertanyaan4());
getPertanyaan3().setPosition(200, 217);
getPertanyaan3().setVisible(true);
lm.append(getPertanyaan3());
getPertanyaan1().setPosition(76, 210);
getPertanyaan1().setVisible(true);
lm.append(getPertanyaan1());
getBatu1().setPosition(384, 1);
getBatu1().setVisible(true);
lm.append(getBatu1());
getHp().setPosition(31, 159);
getHp().setVisible(true);
lm.append(getHp());
getKuda().setPosition(134, 80);
getKuda().setVisible(true);
lm.append(getKuda());
getRacun4().setPosition(657, 271);
getRacun4().setVisible(true);
lm.append(getRacun4());
getRumputLaut4().setPosition(516, 0);
getRumputLaut4().setVisible(true);
lm.append(getRumputLaut4());
getRumputLaut3().setPosition(776, 62);
getRumputLaut3().setVisible(true);
lm.append(getRumputLaut3());
getKayu3().setPosition(30, 149);
getKayu3().setVisible(true);
lm.append(getKayu3());
getBatang2().setPosition(176, 226);
getBatang2().setVisible(true);
lm.append(getBatang2());
getRumputLaut1().setPosition(443, 179);
getRumputLaut1().setVisible(true);
lm.append(getRumputLaut1());
getPohon().setPosition(690, 205);
getPohon().setVisible(true);
lm.append(getPohon());
getKayu().setPosition(0, 302);
getKayu().setVisible(true);
lm.append(getKayu());
getTlBase().setPosition(65, 313);
getTlBase().setVisible(true);
lm.append(getTlBase());
getUbur().setPosition(168, 250);
getUbur().setVisible(true);
lm.append(getUbur());
getIkan().setPosition(120, 16);
getIkan().setVisible(true);
lm.append(getIkan());
getRumput().setPosition(-4, 0);
getRumput().setVisible(true);
lm.append(getRumput());
// write post-update user code here
}
public TiledLayer getBatubatu() throws java.io.IOException {
if (batubatu == null) {
// write pre-init user code here
batubatu = new TiledLayer(13, 9, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 11, 11, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 11, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 11, 0, 0, 11, 0, 0, 11, 11, 11, 11, 11, 11, 11 },
{ 11, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 0, 11 },
{ 11, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 11 },
{ 11, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 11 }
};
// write mid-init user code here
for (int row = 0; row < 9; row++) {
for (int col = 0; col < 13; col++) {
batubatu.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return batubatu;
}
}
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.lcdui.game.*;
/**
* @author ICT CENTER PBG
*/
public class GameDesign {
//
private Image tilles_bandung;
private Image _07_Swamp01;
private Image gurita;
private Image ikan1;
private Image kepiting;
private Image iwak;
private Image topview_tiles;
private TiledLayer pohon;
private Image _86_Bulletin01;
private Sprite mbuel;
public int mbuelDepanDelay = 520;
public int[] mbuelDepan = {0, 1, 2, 3, 4, 5, 3, 11, 15, 3, 6, 3, 2};
private Image bes;
private Sprite ikan;
public int ikanBelakangDelay = 200;
public int[] ikanBelakang = {12, 13, 14, 15};
public int ikanKananDelay = 200;
public int[] ikanKanan = {8, 9, 10, 11};
public int ikanKiriDelay = 200;
public int[] ikanKiri = {4, 5, 6, 7};
public int ikanDepanDelay = 200;
public int[] ikanDepan = {0, 1, 2, 3};
private TiledLayer pintuBatu3;
private TiledLayer pintuBatu2;
private Sprite ubur;
public int uburBelakangDelay = 200;
public int[] uburBelakang = {12, 13, 14, 15};
public int uburKananDelay = 200;
public int[] uburKanan = {4, 5, 6, 7};
public int uburKiriDelay = 200;
public int[] uburKiri = {8, 9, 10, 11};
public int uburDepanDelay = 200;
public int[] uburDepan = {0, 1, 2, 3};
private TiledLayer pintuBatu4;
private Image ubur_ubur;
private TiledLayer hp8;
private TiledLayer hp7;
private TiledLayer hp1;
private TiledLayer hp4;
private TiledLayer hp;
private Sprite kuda;
public int kudaDepanDelay = 200;
public int[] kudaDepan = {10, 11, 12, 13, 14};
private Image hadiah;
private Image zorf;
private Image tanya;
private TiledLayer point;
private Image kotak;
private TiledLayer pintuBatu;
private TiledLayer soal2;
private Image kepiting_1001;
private TiledLayer papan8;
private Image kepiting_2;
private Sprite kepting;
public int keptingseq001Delay = 200;
public int[] keptingseq001 = {10, 0, 5, 13, 14};
private Image kepiting_1;
private Image kataKunci;
private TiledLayer soalKunci;
private TiledLayer pertanyaanKunci;
private TiledLayer jamur1;
private Image jamur;
private TiledLayer jamur2;
private TiledLayer batu1;
private Image Mutiara;
private TiledLayer rumput;
private Image iwak001;
private TiledLayer batu2;
private Image bintangJ;
private TiledLayer soal;
private Image _07_Swamp01001;
private TiledLayer racun;
private TiledLayer rumputLaut1;
private TiledLayer kayu4;
private TiledLayer racun2;
private TiledLayer kayu;
private TiledLayer kayu3;
private TiledLayer rumputLaut2;
private TiledLayer batu;
private TiledLayer kayu2;
private TiledLayer soal4;
private Image kuda_Laut;
private TiledLayer pintuBatu1;
private TiledLayer soal3;
private Image kura_kura_1;
private Image kura_kura;
private Image cumi;
private Sprite kura;
public int kuraseq001Delay = 200;
public int[] kuraseq001 = {0, 1, 6, 3, 0};
private TiledLayer papan9;
private TiledLayer tlBase;
private TiledLayer rumputLaut4;
private TiledLayer rumputLaut3;
private TiledLayer rumputlaut3;
private TiledLayer batang2;
private TiledLayer batang;
private TiledLayer racun4;
private Image marmut;
private TiledLayer soal1;
private Image bintang_lauttt;
private Image gurita_1;
private TiledLayer pertanyaan4;
private Sprite kuda2;
public int kuda2seq001Delay = 200;
public int[] kuda2seq001 = {16, 18, 19, 19, 19};
private TiledLayer batubatu;
private Image zorf001;
private TiledLayer pertanyaan;
private TiledLayer pertanyaan1;
private TiledLayer pertanyaan2;
private TiledLayer pertanyaan3;
//
//
//
public Image getTilles_bandung() throws java.io.IOException {
if (tilles_bandung == null) {
// write pre-init user code here
tilles_bandung = Image.createImage("/Images/tilles bandung.png");
}
// write post-init user code here
return this.tilles_bandung;
}
public Image get_07_Swamp01() throws java.io.IOException {
if (_07_Swamp01 == null) {
// write pre-init user code here
_07_Swamp01 = Image.createImage("/Images/007-Swamp01.png");
}
// write post-init user code here
return this._07_Swamp01;
}
public Image get_86_Bulletin01() throws java.io.IOException {
if (_86_Bulletin01 == null) {
// write pre-init user code here
_86_Bulletin01 = Image.createImage("/Images/186-Bulletin01.png");
}
// write post-init user code here
return this._86_Bulletin01;
}
public TiledLayer getPapan9() throws java.io.IOException {
if (papan9 == null) {
// write pre-init user code here
papan9 = new TiledLayer(1, 1, get_86_Bulletin01(), 32, 48);
int[][] tiles = {
{ 13 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
papan9.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return papan9;
}
public TiledLayer getRumput() throws java.io.IOException {
if (rumput == null) {
// write pre-init user code here
rumput = new TiledLayer(55, 21, getTilles_bandung(), 16, 16);
int[][] tiles = {
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 254, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 },
{ 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252 }
};
// write mid-init user code here
for (int row = 0; row < 21; row++) {
for (int col = 0; col < 55; col++) {
rumput.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return rumput;
}
public void updateLayerManagerForArea(LayerManager lm) throws java.io.IOException {
// write pre-update user code here
getSoalKunci().setPosition(14, 394);
getSoalKunci().setVisible(true);
lm.append(getSoalKunci());
getPertanyaanKunci().setPosition(88, 212);
getPertanyaanKunci().setVisible(true);
lm.append(getPertanyaanKunci());
getSoal2().setPosition(130, 494);
getSoal2().setVisible(true);
lm.append(getSoal2());
getSoal1().setPosition(228, 401);
getSoal1().setVisible(true);
lm.append(getSoal1());
getSoal3().setPosition(444, 402);
getSoal3().setVisible(true);
lm.append(getSoal3());
getSoal4().setPosition(558, 421);
getSoal4().setVisible(true);
lm.append(getSoal4());
getSoal().setPosition(665, 391);
getSoal().setVisible(true);
lm.append(getSoal());
getPertanyaan().setPosition(486, 14);
getPertanyaan().setVisible(true);
lm.append(getPertanyaan());
getBatang().setPosition(472, 12);
getBatang().setVisible(true);
lm.append(getBatang());
getJamur1().setPosition(759, 211);
getJamur1().setVisible(true);
lm.append(getJamur1());
getKayu2().setPosition(634, 22);
getKayu2().setVisible(true);
lm.append(getKayu2());
getPertanyaan2().setPosition(628, 9);
getPertanyaan2().setVisible(true);
lm.append(getPertanyaan2());
getPintuBatu4().setPosition(734, 14);
getPintuBatu4().setVisible(true);
lm.append(getPintuBatu4());
getPintuBatu3().setPosition(478, 246);
getPintuBatu3().setVisible(true);
lm.append(getPintuBatu3());
getPintuBatu2().setPosition(481, 101);
getPintuBatu2().setVisible(true);
lm.append(getPintuBatu2());
getPintuBatu().setPosition(252, 249);
getPintuBatu().setVisible(true);
lm.append(getPintuBatu());
getPintuBatu1().setPosition(379, 212);
getPintuBatu1().setVisible(true);
lm.append(getPintuBatu1());
getRacun2().setPosition(172, 13);
getRacun2().setVisible(true);
lm.append(getRacun2());
getRacun().setPosition(818, 263);
getRacun().setVisible(true);
lm.append(getRacun());
getRumputLaut2().setPosition(159, 116);
getRumputLaut2().setVisible(true);
lm.append(getRumputLaut2());
getKepting().setPosition(489, 14);
getKepting().setVisible(true);
lm.append(getKepting());
getKura().setPosition(545, 228);
getKura().setVisible(true);
lm.append(getKura());
getKuda2().setPosition(629, 15);
getKuda2().setVisible(true);
lm.append(getKuda2());
getPertanyaan4().setPosition(762, 218);
getPertanyaan4().setVisible(true);
lm.append(getPertanyaan4());
getPertanyaan3().setPosition(444, 241);
getPertanyaan3().setVisible(true);
lm.append(getPertanyaan3());
getPertanyaan1().setPosition(296, 178);
getPertanyaan1().setVisible(true);
lm.append(getPertanyaan1());
getBatu1().setPosition(448, 8);
getBatu1().setVisible(true);
lm.append(getBatu1());
getHp().setPosition(275, 203);
getHp().setVisible(true);
lm.append(getHp());
getKuda().setPosition(134, 80);
getKuda().setVisible(true);
lm.append(getKuda());
getRacun4().setPosition(657, 271);
getRacun4().setVisible(true);
lm.append(getRacun4());
getRumputLaut4().setPosition(516, 0);
getRumputLaut4().setVisible(true);
lm.append(getRumputLaut4());
getRumputLaut3().setPosition(776, 62);
getRumputLaut3().setVisible(true);
lm.append(getRumputLaut3());
getKayu3().setPosition(276, 178);
getKayu3().setVisible(true);
lm.append(getKayu3());
getBatang2().setPosition(71, 205);
getBatang2().setVisible(true);
lm.append(getBatang2());
getRumputLaut1().setPosition(443, 179);
getRumputLaut1().setVisible(true);
lm.append(getRumputLaut1());
getPohon().setPosition(770, 156);
getPohon().setVisible(true);
lm.append(getPohon());
getKayu4().setPosition(419, 237);
getKayu4().setVisible(true);
lm.append(getKayu4());
getKayu().setPosition(0, 302);
getKayu().setVisible(true);
lm.append(getKayu());
getBatu().setPosition(246, 124);
getBatu().setVisible(true);
lm.append(getBatu());
getTlBase().setPosition(61, 318);
getTlBase().setVisible(true);
lm.append(getTlBase());
getUbur().setPosition(369, 282);
getUbur().setVisible(true);
lm.append(getUbur());
getPapan9().setPosition(218, 208);
getPapan9().setVisible(true);
lm.append(getPapan9());
getIkan().setPosition(-1, 256);
getIkan().setVisible(true);
lm.append(getIkan());
getRumput().setPosition(-4, 0);
getRumput().setVisible(true);
lm.append(getRumput());
// write post-update user code here
}
public Image getMarmut() throws java.io.IOException {
if (marmut == null) {
// write pre-init user code here
marmut = Image.createImage("/Images/marmut.png");
}
// write post-init user code here
return this.marmut;
}
public Image getIwak() throws java.io.IOException {
if (iwak == null) {
// write pre-init user code here
iwak = Image.createImage("/Images/iwak.png");
}
// write post-init user code here
return this.iwak;
}
public Image getUbur_ubur() throws java.io.IOException {
if (ubur_ubur == null) {
// write pre-init user code here
ubur_ubur = Image.createImage("/Images/ubur-ubur.png");
}
// write post-init user code here
return this.ubur_ubur;
}
public Sprite getUbur() throws java.io.IOException {
if (ubur == null) {
// write pre-init user code here
ubur = new Sprite(getUbur_ubur(), 48, 48);
ubur.setFrameSequence(uburDepan);
// write post-init user code here
}
return ubur;
}
public Sprite getIkan() throws java.io.IOException {
if (ikan == null) {
// write pre-init user code here
ikan = new Sprite(getIwak(), 64, 48);
ikan.setFrameSequence(ikanDepan);
// write post-init user code here
}
return ikan;
}
public TiledLayer getTlBase() throws java.io.IOException {
if (tlBase == null) {
// write pre-init user code here
tlBase = new TiledLayer(39, 1, getTilles_bandung(), 16, 16);
int[][] tiles = {
{ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 43 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 39; col++) {
tlBase.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return tlBase;
}
public Image get_07_Swamp01001() throws java.io.IOException {
if (_07_Swamp01001 == null) {
// write pre-init user code here
_07_Swamp01001 = Image.createImage("/Gambar/007-Swamp01.png");
}
// write post-init user code here
return this._07_Swamp01001;
}
public TiledLayer getKayu4() throws java.io.IOException {
if (kayu4 == null) {
// write pre-init user code here
kayu4 = new TiledLayer(2, 1, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 33, 34 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 2; col++) {
kayu4.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return kayu4;
}
public TiledLayer getRumputLaut1() throws java.io.IOException {
if (rumputLaut1 == null) {
// write pre-init user code here
rumputLaut1 = new TiledLayer(1, 1, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 13 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
rumputLaut1.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return rumputLaut1;
}
public TiledLayer getRumputLaut2() throws java.io.IOException {
if (rumputLaut2 == null) {
// write pre-init user code here
rumputLaut2 = new TiledLayer(3, 3, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 14, 0, 0 },
{ 20, 20, 20 },
{ 0, 20, 0 }
};
// write mid-init user code here
for (int row = 0; row < 3; row++) {
for (int col = 0; col < 3; col++) {
rumputLaut2.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return rumputLaut2;
}
public TiledLayer getKayu3() throws java.io.IOException {
if (kayu3 == null) {
// write pre-init user code here
kayu3 = new TiledLayer(2, 1, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 28, 29 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 2; col++) {
kayu3.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return kayu3;
}
public TiledLayer getKayu2() throws java.io.IOException {
if (kayu2 == null) {
// write pre-init user code here
kayu2 = new TiledLayer(1, 1, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 38 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
kayu2.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return kayu2;
}
public TiledLayer getBatu() throws java.io.IOException {
if (batu == null) {
// write pre-init user code here
batu = new TiledLayer(13, 6, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 11, 11, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 11, 0, 0, 11, 0, 0, 0, 11, 11, 11, 11, 11, 11 },
{ 11, 0, 0, 11, 0, 0, 11, 11, 0, 0, 0, 0, 11 },
{ 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 11 },
{ 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 11 }
};
// write mid-init user code here
for (int row = 0; row < 6; row++) {
for (int col = 0; col < 13; col++) {
batu.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return batu;
}
public TiledLayer getKayu() throws java.io.IOException {
if (kayu == null) {
// write pre-init user code here
kayu = new TiledLayer(2, 1, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 39, 40 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 2; col++) {
kayu.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return kayu;
}
public TiledLayer getPohon() throws java.io.IOException {
if (pohon == null) {
// write pre-init user code here
pohon = new TiledLayer(4, 4, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 45, 42, 47, 0 },
{ 41, 54, 55, 56 },
{ 57, 62, 63, 64 },
{ 69, 70, 71, 72 }
};
// write mid-init user code here
for (int row = 0; row < 4; row++) {
for (int col = 0; col < 4; col++) {
pohon.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return pohon;
}
public Image getTopview_tiles() throws java.io.IOException {
if (topview_tiles == null) {
// write pre-init user code here
topview_tiles = Image.createImage("/topview_tiles.png");
}
// write post-init user code here
return this.topview_tiles;
}
public TiledLayer getBatang() throws java.io.IOException {
if (batang == null) {
// write pre-init user code here
batang = new TiledLayer(2, 1, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 108, 109 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 2; col++) {
batang.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return batang;
}
public TiledLayer getBatang2() throws java.io.IOException {
if (batang2 == null) {
// write pre-init user code here
batang2 = new TiledLayer(2, 1, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 110, 111 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 2; col++) {
batang2.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return batang2;
}
public TiledLayer getRacun4() throws java.io.IOException {
if (racun4 == null) {
// write pre-init user code here
racun4 = new TiledLayer(1, 1, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 12 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
racun4.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return racun4;
}
public TiledLayer getRumputLaut3() throws java.io.IOException {
if (rumputLaut3 == null) {
// write pre-init user code here
rumputLaut3 = new TiledLayer(3, 2, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 23, 23, 0 },
{ 23, 23, 23 }
};
// write mid-init user code here
for (int row = 0; row < 2; row++) {
for (int col = 0; col < 3; col++) {
rumputLaut3.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return rumputLaut3;
}
public TiledLayer getRumputLaut4() throws java.io.IOException {
if (rumputLaut4 == null) {
// write pre-init user code here
rumputLaut4 = new TiledLayer(2, 1, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 15, 16 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 2; col++) {
rumputLaut4.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return rumputLaut4;
}
public TiledLayer getRumputlaut3() throws java.io.IOException {
if (rumputlaut3 == null) {
// write pre-init user code here
rumputlaut3 = new TiledLayer(2, 2, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 15, 22 },
{ 21, 21 }
};
// write mid-init user code here
for (int row = 0; row < 2; row++) {
for (int col = 0; col < 2; col++) {
rumputlaut3.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return rumputlaut3;
}
public Image getZorf() throws java.io.IOException {
if (zorf == null) {
// write pre-init user code here
zorf = Image.createImage("/Images/zorf.png");
}
// write post-init user code here
return this.zorf;
}
public Sprite getKuda() throws java.io.IOException {
if (kuda == null) {
// write pre-init user code here
kuda = new Sprite(getZorf(), 80, 80);
kuda.setFrameSequence(kudaDepan);
// write post-init user code here
}
return kuda;
}
public Image getKotak() throws java.io.IOException {
if (kotak == null) {
// write pre-init user code here
kotak = Image.createImage("/Gambar/kotak.png");
}
// write post-init user code here
return this.kotak;
}
public Image getHadiah() throws java.io.IOException {
if (hadiah == null) {
// write pre-init user code here
hadiah = Image.createImage("/Gambar/hadiah.png");
}
// write post-init user code here
return this.hadiah;
}
public TiledLayer getHp() throws java.io.IOException {
if (hp == null) {
// write pre-init user code here
hp = new TiledLayer(3, 2, getHadiah(), 24, 24);
int[][] tiles = {
{ 0, 1, 0 },
{ 1, 1, 1 }
};
// write mid-init user code here
for (int row = 0; row < 2; row++) {
for (int col = 0; col < 3; col++) {
hp.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return hp;
}
public TiledLayer getHp1() throws java.io.IOException {
if (hp1 == null) {
// write pre-init user code here
hp1 = new TiledLayer(1, 1, getHadiah(), 24, 24);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
hp1.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return hp1;
}
public TiledLayer getHp4() throws java.io.IOException {
if (hp4 == null) {
// write pre-init user code here
hp4 = new TiledLayer(1, 1, getHadiah(), 24, 24);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
hp4.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return hp4;
}
public TiledLayer getHp7() throws java.io.IOException {
if (hp7 == null) {
// write pre-init user code here
hp7 = new TiledLayer(1, 1, getHadiah(), 24, 24);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
hp7.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return hp7;
}
public TiledLayer getHp8() throws java.io.IOException {
if (hp8 == null) {
// write pre-init user code here
hp8 = new TiledLayer(1, 1, getHadiah(), 24, 24);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
hp8.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return hp8;
}
public Image getBes() throws java.io.IOException {
if (bes == null) {
// write pre-init user code here
bes = Image.createImage("/Gambar/bes.png");
}
// write post-init user code here
return this.bes;
}
public Sprite getMbuel() throws java.io.IOException {
if (mbuel == null) {
// write pre-init user code here
mbuel = new Sprite(getBes(), 64, 64);
mbuel.setFrameSequence(mbuelDepan);
// write post-init user code here
}
return mbuel;
}
public Image getTanya() throws java.io.IOException {
if (tanya == null) {
// write pre-init user code here
tanya = Image.createImage("/Gambar/tanya.png");
}
// write post-init user code here
return this.tanya;
}
public TiledLayer getPertanyaan() throws java.io.IOException {
if (pertanyaan == null) {
// write pre-init user code here
pertanyaan = new TiledLayer(1, 1, getTanya(), 24, 24);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
pertanyaan.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return pertanyaan;
}
public TiledLayer getPertanyaan1() throws java.io.IOException {
if (pertanyaan1 == null) {
// write pre-init user code here
pertanyaan1 = new TiledLayer(1, 1, getTanya(), 24, 24);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
pertanyaan1.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return pertanyaan1;
}
public TiledLayer getPertanyaan2() throws java.io.IOException {
if (pertanyaan2 == null) {
// write pre-init user code here
pertanyaan2 = new TiledLayer(1, 1, getTanya(), 24, 24);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
pertanyaan2.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return pertanyaan2;
}
public TiledLayer getPertanyaan3() throws java.io.IOException {
if (pertanyaan3 == null) {
// write pre-init user code here
pertanyaan3 = new TiledLayer(1, 1, getTanya(), 24, 24);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
pertanyaan3.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return pertanyaan3;
}
public TiledLayer getPertanyaan4() throws java.io.IOException {
if (pertanyaan4 == null) {
// write pre-init user code here
pertanyaan4 = new TiledLayer(1, 1, getTanya(), 24, 24);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
pertanyaan4.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return pertanyaan4;
}
public TiledLayer getBatu1() throws java.io.IOException {
if (batu1 == null) {
// write pre-init user code here
batu1 = new TiledLayer(10, 4, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 11, 0, 0, 0, 11, 0, 0, 0, 0, 0 },
{ 11, 0, 0, 0, 11, 0, 0, 0, 0, 0 },
{ 11, 0, 0, 0, 11, 0, 0, 0, 0, 11 },
{ 11, 0, 0, 11, 11, 11, 11, 11, 11, 11 }
};
// write mid-init user code here
for (int row = 0; row < 4; row++) {
for (int col = 0; col < 10; col++) {
batu1.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return batu1;
}
public TiledLayer getBatu2() throws java.io.IOException {
if (batu2 == null) {
// write pre-init user code here
batu2 = new TiledLayer(1, 6, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 11 },
{ 11 },
{ 11 },
{ 11 },
{ 11 },
{ 11 }
};
// write mid-init user code here
for (int row = 0; row < 6; row++) {
for (int col = 0; col < 1; col++) {
batu2.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return batu2;
}
public Image getKura_kura() throws java.io.IOException {
if (kura_kura == null) {
// write pre-init user code here
kura_kura = Image.createImage("/Gambar/kura-kura.png");
}
// write post-init user code here
return this.kura_kura;
}
public Sprite getKura() throws java.io.IOException {
if (kura == null) {
// write pre-init user code here
kura = new Sprite(getKura_kura(), 80, 80);
kura.setFrameSequence(kuraseq001);
// write post-init user code here
}
return kura;
}
public TiledLayer getPapan8() throws java.io.IOException {
if (papan8 == null) {
// write pre-init user code here
papan8 = new TiledLayer(1, 1, get_86_Bulletin01(), 32, 48);
int[][] tiles = {
{ 16 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
papan8.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return papan8;
}
public TiledLayer getPoint() throws java.io.IOException {
if (point == null) {
// write pre-init user code here
point = new TiledLayer(1, 1, getKotak(), 24, 24);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
point.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return point;
}
public Image getCumi() throws java.io.IOException {
if (cumi == null) {
// write pre-init user code here
cumi = Image.createImage("/Gambar/cumi.png");
}
// write post-init user code here
return this.cumi;
}
public Image getGurita() throws java.io.IOException {
if (gurita == null) {
// write pre-init user code here
gurita = Image.createImage("/Gambar/gurita.png");
}
// write post-init user code here
return this.gurita;
}
public Image getIkan1() throws java.io.IOException {
if (ikan1 == null) {
// write pre-init user code here
ikan1 = Image.createImage("/Gambar/ikan1.png");
}
// write post-init user code here
return this.ikan1;
}
public Image getKepiting() throws java.io.IOException {
if (kepiting == null) {
// write pre-init user code here
kepiting = Image.createImage("/Gambar/kepiting.png");
}
// write post-init user code here
return this.kepiting;
}
public Image getBintang_lauttt() throws java.io.IOException {
if (bintang_lauttt == null) {
// write pre-init user code here
bintang_lauttt = Image.createImage("/Gambar/bintang lauttt.png");
}
// write post-init user code here
return this.bintang_lauttt;
}
public Image getIwak001() throws java.io.IOException {
if (iwak001 == null) {
// write pre-init user code here
iwak001 = Image.createImage("/Gambar/iwak.png");
}
// write post-init user code here
return this.iwak001;
}
public Image getBintangJ() throws java.io.IOException {
if (bintangJ == null) {
// write pre-init user code here
bintangJ = Image.createImage("/Gambar/bintangJ.png");
}
// write post-init user code here
return this.bintangJ;
}
public Image getKepiting_1() throws java.io.IOException {
if (kepiting_1 == null) {
// write pre-init user code here
kepiting_1 = Image.createImage("/Images/imagesOn_3.png");
}
// write post-init user code here
return this.kepiting_1;
}
public Image getZorf001() throws java.io.IOException {
if (zorf001 == null) {
// write pre-init user code here
zorf001 = Image.createImage("/Gambar/zorf.png");
}
// write post-init user code here
return this.zorf001;
}
public Sprite getKuda2() throws java.io.IOException {
if (kuda2 == null) {
// write pre-init user code here
kuda2 = new Sprite(getZorf001(), 80, 80);
kuda2.setFrameSequence(kuda2seq001);
// write post-init user code here
}
return kuda2;
}
public Image getKepiting_2() throws java.io.IOException {
if (kepiting_2 == null) {
// write pre-init user code here
kepiting_2 = Image.createImage("/Gambar/kepiting_2.png");
}
// write post-init user code here
return this.kepiting_2;
}
public Sprite getKepting() throws java.io.IOException {
if (kepting == null) {
// write pre-init user code here
kepting = new Sprite(getKepiting_2(), 80, 80);
kepting.setFrameSequence(keptingseq001);
// write post-init user code here
}
return kepting;
}
public TiledLayer getRacun() throws java.io.IOException {
if (racun == null) {
// write pre-init user code here
racun = new TiledLayer(1, 1, getBes(), 64, 64);
int[][] tiles = {
{ 4 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
racun.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return racun;
}
public TiledLayer getRacun2() throws java.io.IOException {
if (racun2 == null) {
// write pre-init user code here
racun2 = new TiledLayer(1, 1, getKotak(), 24, 24);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
racun2.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return racun2;
}
public Image getJamur() throws java.io.IOException {
if (jamur == null) {
// write pre-init user code here
jamur = Image.createImage("/Gambar/jamur.png");
}
// write post-init user code here
return this.jamur;
}
public TiledLayer getJamur1() throws java.io.IOException {
if (jamur1 == null) {
// write pre-init user code here
jamur1 = new TiledLayer(1, 1, getJamur(), 32, 48);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
jamur1.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return jamur1;
}
public TiledLayer getJamur2() throws java.io.IOException {
if (jamur2 == null) {
// write pre-init user code here
jamur2 = new TiledLayer(1, 1, getJamur(), 32, 48);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
jamur2.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return jamur2;
}
public TiledLayer getPintuBatu1() throws java.io.IOException {
if (pintuBatu1 == null) {
// write pre-init user code here
pintuBatu1 = new TiledLayer(2, 1, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 39, 40 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 2; col++) {
pintuBatu1.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return pintuBatu1;
}
public TiledLayer getPintuBatu() throws java.io.IOException {
if (pintuBatu == null) {
// write pre-init user code here
pintuBatu = new TiledLayer(1, 2, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 24 },
{ 32 }
};
// write mid-init user code here
for (int row = 0; row < 2; row++) {
for (int col = 0; col < 1; col++) {
pintuBatu.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return pintuBatu;
}
public TiledLayer getPintuBatu2() throws java.io.IOException {
if (pintuBatu2 == null) {
// write pre-init user code here
pintuBatu2 = new TiledLayer(2, 1, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 39, 40 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 2; col++) {
pintuBatu2.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return pintuBatu2;
}
public TiledLayer getPintuBatu3() throws java.io.IOException {
if (pintuBatu3 == null) {
// write pre-init user code here
pintuBatu3 = new TiledLayer(1, 2, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 24 },
{ 32 }
};
// write mid-init user code here
for (int row = 0; row < 2; row++) {
for (int col = 0; col < 1; col++) {
pintuBatu3.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return pintuBatu3;
}
public TiledLayer getPintuBatu4() throws java.io.IOException {
if (pintuBatu4 == null) {
// write pre-init user code here
pintuBatu4 = new TiledLayer(1, 2, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 24 },
{ 32 }
};
// write mid-init user code here
for (int row = 0; row < 2; row++) {
for (int col = 0; col < 1; col++) {
pintuBatu4.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return pintuBatu4;
}
public Image getMutiara() throws java.io.IOException {
if (Mutiara == null) {
// write pre-init user code here
Mutiara = Image.createImage("/Gambar/Mutiara.png");
}
// write post-init user code here
return this.Mutiara;
}
public TiledLayer getSoal() throws java.io.IOException {
if (soal == null) {
// write pre-init user code here
soal = new TiledLayer(1, 1, getMutiara(), 193, 96);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
soal.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return soal;
}
public Image getKuda_Laut() throws java.io.IOException {
if (kuda_Laut == null) {
// write pre-init user code here
kuda_Laut = Image.createImage("/Gambar/kuda Laut.png");
}
// write post-init user code here
return this.kuda_Laut;
}
public TiledLayer getSoal4() throws java.io.IOException {
if (soal4 == null) {
// write pre-init user code here
soal4 = new TiledLayer(1, 1, getKuda_Laut(), 193, 96);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
soal4.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return soal4;
}
public Image getKura_kura_1() throws java.io.IOException {
if (kura_kura_1 == null) {
// write pre-init user code here
kura_kura_1 = Image.createImage("/Gambar/kura-kura_1.png");
}
// write post-init user code here
return this.kura_kura_1;
}
public TiledLayer getSoal3() throws java.io.IOException {
if (soal3 == null) {
// write pre-init user code here
soal3 = new TiledLayer(1, 1, getKura_kura_1(), 193, 96);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
soal3.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return soal3;
}
public Image getGurita_1() throws java.io.IOException {
if (gurita_1 == null) {
// write pre-init user code here
gurita_1 = Image.createImage("/Gambar/gurita_1.png");
}
// write post-init user code here
return this.gurita_1;
}
public TiledLayer getSoal1() throws java.io.IOException {
if (soal1 == null) {
// write pre-init user code here
soal1 = new TiledLayer(1, 1, getGurita_1(), 193, 96);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
soal1.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return soal1;
}
public Image getKepiting_1001() throws java.io.IOException {
if (kepiting_1001 == null) {
// write pre-init user code here
kepiting_1001 = Image.createImage("/Gambar/kepiting_1.png");
}
// write post-init user code here
return this.kepiting_1001;
}
public TiledLayer getSoal2() throws java.io.IOException {
if (soal2 == null) {
// write pre-init user code here
soal2 = new TiledLayer(1, 1, getKepiting_1001(), 193, 96);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
soal2.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return soal2;
}
public TiledLayer getPertanyaanKunci() throws java.io.IOException {
if (pertanyaanKunci == null) {
// write pre-init user code here
pertanyaanKunci = new TiledLayer(1, 1, getTanya(), 24, 24);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
pertanyaanKunci.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return pertanyaanKunci;
}
public Image getKataKunci() throws java.io.IOException {
if (kataKunci == null) {
// write pre-init user code here
kataKunci = Image.createImage("/Gambar/kataKunci.png");
}
// write post-init user code here
return this.kataKunci;
}
public TiledLayer getSoalKunci() throws java.io.IOException {
if (soalKunci == null) {
// write pre-init user code here
soalKunci = new TiledLayer(1, 1, getKataKunci(), 193, 96);
int[][] tiles = {
{ 1 }
};
// write mid-init user code here
for (int row = 0; row < 1; row++) {
for (int col = 0; col < 1; col++) {
soalKunci.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return soalKunci;
}
public void updateLayerManagerForArea2(LayerManager lm) throws java.io.IOException {
// write pre-update user code here
getBatubatu().setPosition(8, 20);
getBatubatu().setVisible(true);
lm.append(getBatubatu());
getHp1().setPosition(0, 0);
getHp1().setVisible(true);
lm.append(getHp1());
getSoalKunci().setPosition(146, 59);
getSoalKunci().setVisible(true);
lm.append(getSoalKunci());
getPertanyaanKunci().setPosition(229, 49);
getPertanyaanKunci().setVisible(true);
lm.append(getPertanyaanKunci());
getSoal2().setPosition(526, 20);
getSoal2().setVisible(true);
lm.append(getSoal2());
getSoal1().setPosition(7, 177);
getSoal1().setVisible(true);
lm.append(getSoal1());
getSoal3().setPosition(119, 219);
getSoal3().setVisible(true);
lm.append(getSoal3());
getSoal4().setPosition(461, 209);
getSoal4().setVisible(true);
lm.append(getSoal4());
getSoal().setPosition(352, 15);
getSoal().setVisible(true);
lm.append(getSoal());
getPertanyaan().setPosition(434, 3);
getPertanyaan().setVisible(true);
lm.append(getPertanyaan());
getJamur1().setPosition(539, 188);
getJamur1().setVisible(true);
lm.append(getJamur1());
getPertanyaan2().setPosition(612, 1);
getPertanyaan2().setVisible(true);
lm.append(getPertanyaan2());
getPintuBatu4().setPosition(669, 2);
getPintuBatu4().setVisible(true);
lm.append(getPintuBatu4());
getPintuBatu3().setPosition(237, 251);
getPintuBatu3().setVisible(true);
lm.append(getPintuBatu3());
getPintuBatu2().setPosition(420, 100);
getPintuBatu2().setVisible(true);
lm.append(getPintuBatu2());
getPintuBatu().setPosition(106, 114);
getPintuBatu().setVisible(true);
lm.append(getPintuBatu());
getPintuBatu1().setPosition(132, 190);
getPintuBatu1().setVisible(true);
lm.append(getPintuBatu1());
getRumputLaut2().setPosition(6, -32);
getRumputLaut2().setVisible(true);
lm.append(getRumputLaut2());
getKepting().setPosition(422, 17);
getKepting().setVisible(true);
lm.append(getKepting());
getKura().setPosition(321, 221);
getKura().setVisible(true);
lm.append(getKura());
getKuda2().setPosition(537, 27);
getKuda2().setVisible(true);
lm.append(getKuda2());
getPertanyaan4().setPosition(544, 199);
getPertanyaan4().setVisible(true);
lm.append(getPertanyaan4());
getPertanyaan3().setPosition(200, 217);
getPertanyaan3().setVisible(true);
lm.append(getPertanyaan3());
getPertanyaan1().setPosition(76, 210);
getPertanyaan1().setVisible(true);
lm.append(getPertanyaan1());
getBatu1().setPosition(384, 1);
getBatu1().setVisible(true);
lm.append(getBatu1());
getHp().setPosition(31, 159);
getHp().setVisible(true);
lm.append(getHp());
getKuda().setPosition(134, 80);
getKuda().setVisible(true);
lm.append(getKuda());
getRacun4().setPosition(657, 271);
getRacun4().setVisible(true);
lm.append(getRacun4());
getRumputLaut4().setPosition(516, 0);
getRumputLaut4().setVisible(true);
lm.append(getRumputLaut4());
getRumputLaut3().setPosition(776, 62);
getRumputLaut3().setVisible(true);
lm.append(getRumputLaut3());
getKayu3().setPosition(30, 149);
getKayu3().setVisible(true);
lm.append(getKayu3());
getBatang2().setPosition(176, 226);
getBatang2().setVisible(true);
lm.append(getBatang2());
getRumputLaut1().setPosition(443, 179);
getRumputLaut1().setVisible(true);
lm.append(getRumputLaut1());
getPohon().setPosition(690, 205);
getPohon().setVisible(true);
lm.append(getPohon());
getKayu().setPosition(0, 302);
getKayu().setVisible(true);
lm.append(getKayu());
getTlBase().setPosition(65, 313);
getTlBase().setVisible(true);
lm.append(getTlBase());
getUbur().setPosition(168, 250);
getUbur().setVisible(true);
lm.append(getUbur());
getIkan().setPosition(120, 16);
getIkan().setVisible(true);
lm.append(getIkan());
getRumput().setPosition(-4, 0);
getRumput().setVisible(true);
lm.append(getRumput());
// write post-update user code here
}
public TiledLayer getBatubatu() throws java.io.IOException {
if (batubatu == null) {
// write pre-init user code here
batubatu = new TiledLayer(13, 9, get_07_Swamp01001(), 32, 32);
int[][] tiles = {
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 11, 11, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 11, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 11, 0, 0, 11, 0, 0, 11, 11, 11, 11, 11, 11, 11 },
{ 11, 0, 0, 11, 0, 0, 0, 11, 0, 0, 0, 0, 11 },
{ 11, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 11 },
{ 11, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 11 }
};
// write mid-init user code here
for (int row = 0; row < 9; row++) {
for (int col = 0; col < 13; col++) {
batubatu.setCell(col, row, tiles[row][col]);
}
}
}
// write post-init user code here
return batubatu;
}
}
beberapa file yang telah aku susun diantaranya adalah itu, untuk file About.java bisa anda tambahkan sebagai berikut :
import java.io.IOException;
import javax.microedition.lcdui.*;
/**
* Typical about box with a string and an image.
*/
public class About extends Canvas implements CommandListener {
public Midlet midlet;
Image img;
public Command cmdExit = new Command("Exit", Command.EXIT, 0);
public Command cmdBack = new Command("Back", Command.BACK, 1);
public About(Midlet midlet) {
this.midlet = midlet;
addCommand(cmdExit);
addCommand(cmdBack);
setCommandListener(this);
try {
img = Image.createImage("/Gambar/ppt.png");
} catch (IOException ex) {
ex.printStackTrace();
}
}
protected void paint(Graphics g) {
g.setColor(0, 255, 0);
g.fillRect(0, 0, 0, 0);
// g.drawImage(img, 0, 0, 0);
}
public void commandAction(Command c, Displayable d) {
if(c==cmdExit){
midlet.destroyApp(true);
}
if(c==cmdBack){
midlet.display.setCurrent(midlet.menu);
}
}
}
jadi dech gamenya....
kurang lebihnya gitu dech mudah mudahan lain kali aku bisa nambahin.....
1 comments:
Gamenya keren nih :d
Gan, boleh minta sourcenya gak ? :d
kalo boleh email ke kiky1991@gmail.com
Thanks full
EmoticonEmoticon