interface MyIntf
{
void DoSomething();
}
class MyClass : MyIntf
{
void DoSomething() { print("Doing something\n"); }
}
void Test()
{
MyClass a;
MyIntf @b = a;
b.DoSomething();
}
I'm sure you can see the potential of this. Some of the things I still need to implement: - Saving/loading bytecode with declared interfaces. - Faster resolution of calls to interface methods. - Registration of interfaces from the application so that the script classes can be passed directly to application registered functions. - Explicit casting from interface to class. Gives a null handle if the cast is illegal.
Interfaces in the script language are available in SVN
I've just committed the addition of interfaces in the script language to the SVN. There is still a lot to do before I release the next version 2.7.0, but the interfaces are working (even though they are currently very slow). You can now write code like:
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement