Original Post
I would like some quick advice on the proper or good way to manage something.
Just as a quick example lets say it is a simple 2D side scroller where the player and enemy can shoot each other. Both projectiles are the exact same they just move in different directions. What would be the proper way to update this projectile so all I have to do is just call like
Would it be best to just pass a parameter into the update function to say where the fire event came from and handle the different cases in the update function, or what?
This is just a simple little design issue that always seems to plague me when I start a larger project.
Thanks.
PS, This is really a design question not really on how to do something.
Just as a quick example lets say it is a simple 2D side scroller where the player and enemy can shoot each other. Both projectiles are the exact same they just move in different directions. What would be the proper way to update this projectile so all I have to do is just call like
projectile.Update() for both a player projectile and enemy projectile?Would it be best to just pass a parameter into the update function to say where the fire event came from and handle the different cases in the update function, or what?
This is just a simple little design issue that always seems to plague me when I start a larger project.
Thanks.
PS, This is really a design question not really on how to do something.