Closed Rowan5654 closed 4 years ago
You didn't grok the concept, I'm afraid.
I'm still a bit confused by where I'm supposed to put the event listener. Should it go in the main.js? Or can it go in the constructor of the Node?
I have it here working and giving no errors in my player node but when I click I receive no response from the event listener. no bullet appears.
Post links to the application and the code, please
https://github.com/Rowan5654/Prototyping-interactive-Media-Applications-and-Games-
This is a link to just a folder containing my code.
Post links to the application and the code, please
Ok so I went into the source .ts file of your test application link and studied how events were created and called upon. Then related that information into my own program and with a bit of persistence, got it working. :)
And all I needed to do was post the request for the application twice. Do you know how you would do that?
No I wasn't sure what you meant by "application". All I had was my html file which runs my code.
I mean a link I click on and immediately see your application running in my browser. Look up Github-Pages if you don't know how to do that.
So I am trying to make a bullet (Node) spawn in when I left click on my mouse.
I think I've got the right class, that being the EventPointer, I have no idea what I'm supposed to give it for it's second argument.
It says it needs another EventPointer but whatever I give it gives me an error. If I try pass it the "mouse" variable it tells me I can't use it because it's already been declared. What am I doing wrong?