Faces Posted August 12, 2017 Share Posted August 12, 2017 Im currently in the process of developing a top down tower defense shooter. My question is how would you guys go about having a player click a something (seems a button would be prudent) which would select the appropriate tower (a sprite) and maybe on mousePointer.isDown place the sprite at that location. I am not new to programming, but a bit new to phaser. After a thorough read of the docs and examples provided online, this is the area I am struggling to figure out. Once the sprite is in game its gg. But allowing the player to place it is the issue I am having. Thanks in advance! Link to comment Share on other sites More sharing options...
ldd Posted August 12, 2017 Share Posted August 12, 2017 Does this example help? https://phaser.io/examples/v2/input/drag If not, there are other examples here: https://phaser.io/examples/v2/category/input Otherwise, I think trying to list the things you want to accomplish would help. I'd guess you want to do something like 1) click on structure 2) drag structure to map 3) leave structure in map Most of that is just a combination of the tutorials that I linked, so hopefully you figure it out Link to comment Share on other sites More sharing options...
Recommended Posts