You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, in order to create things in the game, we pass a reference to the manager for the target object, and then use some function like Manager.CreateObject(args). Instead, pass in an anonymous function that is a passthrough for CreateObject.
Example of old/bad format: passing in a reference to the bulletManager to a new EnemyManager, just so we can call bulletManager.FireBatch. Just pass in a lambda to FireBatch instead.
Example of new/good format: The player is instantiated with an action delegate which it then uses to create bullets.
The text was updated successfully, but these errors were encountered:
Currently, in order to create things in the game, we pass a reference to the manager for the target object, and then use some function like Manager.CreateObject(args). Instead, pass in an anonymous function that is a passthrough for CreateObject.
Example of old/bad format: passing in a reference to the bulletManager to a new EnemyManager, just so we can call bulletManager.FireBatch. Just pass in a lambda to FireBatch instead.
Example of new/good format: The player is instantiated with an action delegate which it then uses to create bullets.
The text was updated successfully, but these errors were encountered: