Do you want to improve this question?Update your question, Edit this post to be answered with facts and quotes.
Closed 5 years ago.
5 years agoI am an amateur in making game apps.
Do you want to combine multiple types of enemies into a class called enemy and generate each enemy as an instance?
Or do you create classes like enemy1 and enemy2 for each type and instance for each individual?
Do you make similar enemies by putting them together?
What are professionals doing?
For example, Mario's enemies, Cribo, Nokonoko, and Patapata, are
Will Cribo, Nokonoko, and Flatter be generated in enemy class?
Do you want to create a Cribo class, Scorpion class, or Patter class?
Will the Cribo Class and Turtle Class be generated?
After all, is it appropriate to adapt to readability and ease of creation?
game-development
Since it is programmed with an object orientation, isn't it best to create a class called enemy character, define a common implementation such as hit determination, and code the character's unique behavior differentially in subclasses of character types?
In this example,
© 2024 OneMinuteCode. All rights reserved.