#Just a quick info about creating classes and subclasses with Middleclass #When creating a class, do the following:
#1: Create the superclass, having the initialize method (mandatory)
#Example: #local Person = class("Person") #function Person:initialize(x,y,w,h)
#end #return Person
#2: To instantiate the class, all you have to do is:
#Example: #person = Person:new(10,10,64,64)
#3: To create a subclass, tou must create the subclass in the following way:
#Example: #local BasicEnemy = class("BasicEnemy", Person) #or #local BasicEnemy = Person:class("BasicEnemy")
#4: To instantiate the subclass, just have to instantiate like any other class #Example: #enemy = BasicEnemy:new(10,10,64,64)
#Note: When creating a subclass, if you wish to use the superclass constructor,you must #specify the call for that constructor in the subclass intialize method
#Example: #function BasicEnemy:initialize(x,y,w,h)
#end