Original Post
Let me know if this is good design for UFO game.
Superclass is UFO.
Subclass is UFO_Up_and_Down. (moves up and down)
Subclass is UFO_Side_to_Side. (moves side to side)
Subclass is Kamikaze_UFO. (goes straight for the player)
Subclass is Slider_UFO. (moves across screen from right to left or vice versa)
Subclass is Sine_Slider_UFO. (moves across screen from right to left but with sine bobbing motion)
Subclass is Hammer_UFO. (slides in from right or left to player's x coordinate… then drops!)
So, there will be a virtual method called move:
virtual void move(void)
Superclass is UFO.
Subclass is UFO_Up_and_Down. (moves up and down)
Subclass is UFO_Side_to_Side. (moves side to side)
Subclass is Kamikaze_UFO. (goes straight for the player)
Subclass is Slider_UFO. (moves across screen from right to left or vice versa)
Subclass is Sine_Slider_UFO. (moves across screen from right to left but with sine bobbing motion)
Subclass is Hammer_UFO. (slides in from right or left to player's x coordinate… then drops!)
So, there will be a virtual method called move:
virtual void move(void)