http://bit.ly/latihangreenfoot
Question? Ask Me Please:
HATMA Suryotrisongko
Whatsapp: 0853.5900.7300
Email: suryotrisongko@gmail.com
etika Copy Paste, klik menu EDIT > AUTO LAYOUT supaya rapi kode prog
moveDown();
moveRight();
moveRight(); moveLeft();
18. Collision
Detection. ???
if (getOneIntersectingObject(Laser.class) !
= null)
{
Show explosion
Play explosion sound
Remove the missile from the world
Remove the enemy (this enemy object)
from the world
}
Greenfoot.playSound("explosion.wav");
Actor laser =
getOneIntersectingObject(Laser.class);
getWorld().removeObject(laser);
NB = File Audio yang diperlukan untuk latihan ini sudah tersed
getWorld().removeObject(this);
di folder 2. Audio Suara Untuk Membuat Game Latihan
}
PS = anda bisa membuat banyak subclass World, misal untuk welcome screen,
vel 1, level 2, dll supaya World ditampilkan, klik kanan, New