mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-02 03:15:43 +08:00
Reverting doc rename
This commit is contained in:
21
doc/examples/effects/infinite_effects/lib/square.dart
Normal file
21
doc/examples/effects/infinite_effects/lib/square.dart
Normal file
@ -0,0 +1,21 @@
|
||||
import 'package:flame/anchor.dart';
|
||||
import 'package:flame/components/component.dart';
|
||||
|
||||
import 'dart:ui';
|
||||
|
||||
class Square extends PositionComponent {
|
||||
final Paint _paint;
|
||||
|
||||
Square(this._paint, double x, double y) {
|
||||
width = 100;
|
||||
height = 100;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
anchor = Anchor.center;
|
||||
}
|
||||
|
||||
@override
|
||||
void render(Canvas canvas) {
|
||||
canvas.drawRect(toRect(), _paint);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user