public void act()
    {
        if (this.down == true)
        {
            move(20);
            dealtDamage(this.getX(), this.getY(), 5, 300, 1, 0, 0.6,0);
        }
        else
        {
            if (this.direction == true)
            {
                setLocation(this.getX() + speed,getY());
                dealtDamage (this.getX(), this.getY(),700,5,1,0,0.5,1);
            }
            else if (this.direction == false)
            {
                setLocation(this.getX() - speed,getY());
                dealtDamage (this.getX(), this.getY(),700,5,1,0,0.5,1);
            }
        }

        if (getX() < 0 || getX() > 1000)
        {
            getWorld().removeObject(this);
        }
        else if (getY() > 400)
        {
            getWorld().removeObject(this);
        }
    }