Dear Experts
I am a teacher and I try to teach Makeblock by using the block editor AND the ‘code editing mode’ (not the python editor itself). When coding with the 'code editing mode" it is perfect to use the object sprite with all functions, methods and events. My students like very much coding in python and directly influencing the sprite.
My question:
is it possible to generate a class with attributes and methods in the ‘code editing mode’ and to heritate from Baseclass Sprite.
In my example an object from Class Person should heritate from the base class Sprite.
class Person():
def __init__(self, name, age):
self.name = name
self.age = age
p1 = Person("John", 36)
print(p1.name)
print(p1.age)
sprite.say(str('Sprite is called: ' + str(p1.name)))
thanks a lot
Mario