public void act() 
    {
        setImage(grenade);
        if (distance <= 0)
        {
            if (distance == 0)
            {
                dealtDamage(this.x, this.y, 200, 200, 1, 0, 10.0, 200);
                Greenfoot.playSound("Sound//Bond//Grenade.mp3");
            }
            y = 400;
            setRotation(0);
            explosiveFrame++;
            this.setLocation(this.x, this.y);
            grenade = new GreenfootImage ("Ranged//explosive//explosive00"+explosiveFrame+".png");
            if (explosiveFrame == 26)
            {
                getWorld().removeObject(this);
            }
        }
        else
        {
            this.setLocation(this.x, this.y);
            if (this.direction == true)
            {
                this.x = this.x + 7;
            }
            else
            {
                this.x = this.x - 7;
            }

            if (this.y >= 470)
            {
                distance = distance/2;
            }

            if (this.y <= 470 - distance)
            {
                moveUp = false;
            }
            else if (this.y >= 470)
            {
                moveUp = true;
            }

            if (moveUp)
            {
                this.y = this.y - 3;
            }
            else
            {
                this.y = this.y + 3;
            }
        }

    }