[hw] rename haxework package to hw
This commit is contained in:
20
src/main/hw/animate/FadeAnimate.hx
Executable file
20
src/main/hw/animate/FadeAnimate.hx
Executable file
@@ -0,0 +1,20 @@
|
||||
package hw.animate;
|
||||
|
||||
import hw.animate.Animate;
|
||||
import hw.animate.IAnimate;
|
||||
|
||||
class FadeAnimate extends Animate {
|
||||
|
||||
override public function start(callback:IAnimate -> Void, custom:Bool = false):Void {
|
||||
object.alpha = 1.0;
|
||||
super.start(callback, custom);
|
||||
}
|
||||
|
||||
override private function update(time:Float):Void {
|
||||
super.update(time);
|
||||
object.alpha = 1 - (progress * 1.0);
|
||||
if (progress >= 1) {
|
||||
object.alpha = 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user