Piko3D


Script bindings done!

Hey everyone!

The Revision demo party has proven to be a great opportunity to get some coding done!
I’ve basically finished the script bindings for the existing classes!

Aside from that I worked on delegates and a timer class for script.
It is now possible to create timers in angelscript, and attach delegates to them that call script functions when the timer fires.
The timers can be set to loop, or can be stopped, paused or resumed. This makes the timers very useful for timing periodic or occasional events!

The delegates are used to attach event handlers to the timers, but can be used to attach event handlers to anything that is observable, like objects, resources, or entities. This means that an object can be monitored for instance, and a script function can be called either when it moves, or when it is destroyed.
Delegates can store arguments that can be passed to a script function when it fires for easy customization   Delegates will also play a major part in the input handling/notification system, as they can be used by the control class internally to bind script functions to key presses etc.

Neat! 😀

Well that’s it for now.
I think I’ve made some good progress.
Going to sleep now 😉

Till next time !

Wracky.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

 

Creative Commons License
This work by piko3d.net is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Netherlands License
Powered by WordPress