Answer the question
In order to leave comments, you need to log in
Javascript game. How to write an enemy object constructor?
Hello, I am writing a platformer game on phaser.js, I wrote the behavior of the main character, I wrote the level, collisions, etc. But I can’t figure out how to create enemies. I assume that a constructor function is created, movement, collisions of enemies with other enemies and other various behaviors of enemies are recorded in it. Then a new object is created based on the constructor or hundreds of enemy objects. Could you explain how this is done in more detail or provide a link?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question