Game Development Community

Adding behavior to a object

by Joao Caxaria · in Technical Issues · 09/24/2008 (1:10 pm) · 2 replies

Hi!

How can I add a behavior to a object without using the construto:

new t2dAnimatedSprite() {
_behavior0 = "AquariumBounds";
};


but using something like:

%image.addBehavior(?????);

Thanks!

#1
09/24/2008 (1:27 pm)
%obj.addBehavior( BehaviorName.createInstance() );
#2
09/24/2008 (2:01 pm)
Thank you James!