Mmnmtco Week 4
Mmnmtco Week 4
Mmnmtco Week 4
Week 4: Interaction
Keyboard Mouse
if (this.app.keyboard.wasPressed(pc.KEY_SPACE)) if (this.app.mouse.wasPressed(pc.MOUSEBUTTON_LEFT))
if (this.app.keyboard.isPressed(pc.KEY_SPACE)) if (this.app.mouse.isPressed(pc.MOUSEBUTTON_LEFT))
if (this.app.keyboard.wasReleased(pc.KEY_SPACE)) if (this.app.mouse.wasReleased(pc.MOUSEBUTTON_LEFT))
Add an entity and place it inside the gun, right in front of where the muzzle
should be. Name this entity "bulletEmitter".