I've learned much more in my programming class, in the book, and just self teaching, My game could be considered complete but I am determined to improve on it because as of now, it is literally just 2 buttons as you can see in this image of what you see when the game first starts up.
Look at that I've clicked the chocolate 100 times and now I have unlocked the ability to buy the dark chocolate. This will take 100 chocolate away BUT this will start generating 1 chocolate per second.
Now we have 1 dark chocolate and so far it has generated 5 chocolate. The more you buy the more times the chocolate goes up per second. This stacking can be stacked up infinity many times and so far I have gotten this up to this.
notLocked.addMouseListener(new MouseListener()A major problem I ran into making this was making multiple buttons, originally the buttons were doing the same thing and only one would do what I wanted it to do, and the other, does the same thing. I hope to expand on the available purchases by the next upload. If you have any suggestions i would love to hear them and try to implement them into the game.
{
@Override
public void mouseClicked(java.awt.event.MouseEvent e)
{
// TODO Auto-generated method stub
}
public void mouseEntered(java.awt.event.MouseEvent e)
{
unlock.setVisible(true);
price.setVisible(true);
}
@Override
public void mouseExited(java.awt.event.MouseEvent e)
{
unlock.setVisible(false);
price.setVisible(false);
}
public void mousePressed(java.awt.event.MouseEvent e)
{
if(count >= 100)
{
count-=100;
hasBought++;
}
}
@Override
public void mouseReleased(java.awt.event.MouseEvent e)
{
}
});
No comments:
Post a Comment