tweenx icon indicating copy to clipboard operation
tweenx copied to clipboard

Is there a way to tween an Abstract typedef property without relying on update?

Open nanjizal opened this issue 7 years ago • 0 comments

typedef Holder = { twen: Float }
abstract AbstractHolder( Holder ) from Holder to Holder  {
    public var tweenParam(get, set) : Float;
    function get_tweenParam() return this.twen.;
    function set_tweenParam( val : Float) { 
        trace( 'setting value ' + val );
        this.twen = val;
        return val; 
    }
}
var h = new AbstractHolder( { twen: 0 } );
TweenX.to( h, { tweenParam: 1 } ).delay( 0.1 ).time( 0.7 ).onUpdate( function(){
trace( h.tweenParam );
});

It does not seem to update tweenParam and it does not error telling me it's not found, should this work?

nanjizal avatar Feb 04 '18 16:02 nanjizal