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
This may be a newbie question but it is unclear to me how to save data when using a component pattern. For example say I have a Room class with max 5 random monsters that all inherit from the Monster class. If I don't use inheritance how can I save the data of these monsters without knowing the info at runtime? My room might spawn 5 Tree monsters, or 2 snakes and 3 blobs or something else.. What kind of pointer do I use (I can't use Monster * monster[ 5 ] in the Room class anymore... I also asked this on stack overflow https://stackoverflow.com/questions/71280409/how-to-save-c-class-data-from-a-template-when-using-component-pattern
The text was updated successfully, but these errors were encountered:
This may be a newbie question but it is unclear to me how to save data when using a component pattern. For example say I have a Room class with max 5 random monsters that all inherit from the Monster class. If I don't use inheritance how can I save the data of these monsters without knowing the info at runtime? My room might spawn 5 Tree monsters, or 2 snakes and 3 blobs or something else.. What kind of pointer do I use (I can't use Monster * monster[ 5 ] in the Room class anymore... I also asked this on stack overflow https://stackoverflow.com/questions/71280409/how-to-save-c-class-data-from-a-template-when-using-component-pattern
The text was updated successfully, but these errors were encountered: