This site requires JavaScript, please enable it in your browser!
Greenfoot back
Luc_Stoffer
Luc_Stoffer wrote ...

2016/2/5

Tower Defense Menu

Luc_Stoffer Luc_Stoffer

2016/2/5

#
Hello everyone! At the moment I am trying to create a Tower Defense Game in Greenfoot. And now I have the problem that I have a menu with different Tower-previews and my goal is that i can click on one of them and then the cursor image changes into the Tower and when I click on my World the Tower is placed at the position that I have clicked. And I have no idea how to do that.... Does anyone have an idea how to do that?
danpost danpost

2016/2/5

#
I would create a separate class for the object that is to follow the mouse into the world. It can keep a reference to the object that is to be placed into the world; it can have the same image of that actor set to itself; it can move with the mouse and replace itself with that actor in the world when the mouse is clicked.
Luc_Stoffer Luc_Stoffer

2016/2/5

#
Thanks a lot!:)
You need to login to post a reply.