change extended type

BlitzMax Forums/BlitzMax Programming/change extended type

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I was thinking something like this:
Type TPlayer
  Field Class:TClass

  Method Attack()
     Class.Attack()
  EndMethod
EndType

Type TClass
    Method Attack() Abstract
EndType

Type TWizard Extends TClass
  Method Attack()
  EndMethod
EndType


If you keep all player critical stuff out of the Class types, you could swap them at will.

edit: Yep, seems like you had it all figured out already =)