dbeef / spelunky-psp

Spelunky remake for Sony PSP.
Other
138 stars 10 forks source link

Permanent item inventory #89

Closed dbeef closed 3 years ago

dbeef commented 3 years ago

Main dude instance is created and disposed in each level - thus for saving permanent state, Inventory singleton is utilized (so far only for hearts/bombs/ropes/dollars).

I extended Inventory singleton to also save carried item types upon each GameLoopPlayingState exit and re-populate instances of them on each entry.

Inventory is cleaned upon entering GameLoopScoresState.