Created
July 19, 2017 02:40
-
-
Save XANOZOID/ecee4e293010da46d6d5e355d43dfdbe to your computer and use it in GitHub Desktop.
An adaption to normal component paths in Luxe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ShiftedComponent extends luxe.tween.ComponentPath implements luxe.tween.IComponentPath { | |
| //var _shiftedComp : luxe.tween.ComponentPath; | |
| //public var start(get_start,set_start):Float; | |
| //public var end (get_end, null):Float; | |
| var _shifted: Float; | |
| public function new( path: luxe.tween.ComponentPath, shifted: Float ){ | |
| //_shiftedComp = path; | |
| super(); | |
| start = path.start; | |
| this.paths = path.paths; | |
| _shifted = shifted; | |
| this.totalStrength = path.totalStrength; | |
| trace('we have shifted: ${shifted} and our paths is: ${paths}'); | |
| } | |
| //public function addPath (path:BezierPath):Void{ _shiftedComp.addPath(path); } | |
| public override function calculate (k:Float):Float{ | |
| trace("going places!!!"); | |
| trace('what is this path ${paths}'); | |
| return super.calculate( k + _shifted ); | |
| } | |
| //public inline function set_start( s:Float ):Float return _shiftedComp.start = s; | |
| //public inline function get_start(): Float return _shiftedComp.start; | |
| //inline function get_end ():Float return _shiftedComp.get_end(); | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment