mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-03 12:28:03 +08:00
16 lines
364 B
Dart
16 lines
364 B
Dart
import 'package:flutter/animation.dart';
|
|
|
|
import '../particle_component.dart';
|
|
|
|
class CurvedParticle extends Particle {
|
|
final Curve curve;
|
|
|
|
CurvedParticle({
|
|
this.curve = Curves.linear,
|
|
double lifespan,
|
|
Duration duration,
|
|
}) : super(lifespan: lifespan, duration: duration);
|
|
|
|
@override
|
|
double get progress => curve.transform(super.progress);
|
|
} |