Custom Binding
Hi! I have a question, is there any way i can do custom binding of classes?
Imagine I want to deal with some abstract game data as if it was part of a class, containing methods and properties (but they actually don't exist in game, or not as such). So basically, i'd like to create some object that tells angelscript which functions and properties it has, so i can handle myself the behavior on set/get/operators/etc. (maybe something like fallbacks in lua?)
Cheers
You can register your own classes with AngelScript. You'll then tell AngelScript what methods and behaviours it has. Since the methods and behaviours are implemented by the application you can have them pick up their information from anywhere you want.
AngelScript currently doesn't support setters and getters for properties, though it is planned for the future. Currently you'll have to implement this via exposing two methods instead.
Regards,
Andreas
AngelScript currently doesn't support setters and getters for properties, though it is planned for the future. Currently you'll have to implement this via exposing two methods instead.
Regards,
Andreas
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