Jump to content

Averice

Members
  • Posts

    36
  • Joined

  • Last visited

Blog Comments posted by Averice

  1. SplashScreen is an instance of CState not a new derivative class, I know semi colons aren't needed just a habit that I don't see the need in breaking.

     

    I try to make these modules self contained, so any errors are reported to the user instead of crashing the game, CStateManager checks if a CState is being pushed onto the stack, if it's not a CState it isn't allowed. The inheritance in my class module is used to have base classes with inherited values, whereas the SplashScreen in this example is just a class instance with modified public methods ( I know they're all public being Lua since we can't privatize them without a workaround with the standard class metatable )

     

    It would still work extending instead of instancing but most states will not be even remotely similar so inheriting values we won't use wouldn't be wise.

×
×
  • Create New...