how can i have the class Bomb use the Explode() mehtod after 3sec
if (tMinus > 0)
{
tMinus--;
if (tMinus == 0) Explode();
}public void act()
{
tminus--;
if (tminus == 0) Explode();
}private int tMinus = 600;
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class Bomb here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Bomb extends Actor
{
private int tMinus = 600;
public void act()
{
if (tMinus > 0)
{
tMinus--;
if (tMinus == 0) Explode();
}import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class Bomb here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Bomb extends Actor
{
private int tMinus = 600;
public void act()
{
tMinus--;
if (tMinus == 0) Explode();
}
private void Explode()
{
// some code
}
}