In 2d games, we can subclass a base sprite class to our own sprites like this:
Code: Select all
class BoxThingy(BaseSprite):
def __init__(self):
self.xy = (0,0)
self.image = "box.png"
Code: Select all
class BoxThingy(BaseSprite):
def __init__(self):
self.xy = (0,0)
self.image = "box.png"
Code: Select all
class Actor : public scene::ISceneNode
{
public:
Actor(scene::ISceneNode* parent, scene::ISceneManager* mgr, s32 id)
: scene::ISceneNode(parent, mgr, id)
{
}
}
Code: Select all
C:\Documents and Settings\Raden Muaz\My Documents\Belajar Irrlicht\TaikBintang\main.cpp|26|error: base `Actor' with only non-default constructor in class without a constructor|