mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-03 12:28:03 +08:00
25 lines
664 B
Dart
Executable File
25 lines
664 B
Dart
Executable File
import 'package:flame/components.dart';
|
|
import 'package:flame/flame.dart';
|
|
import 'package:flame_isolate_example/constants.dart';
|
|
import 'package:flame_isolate_example/objects/colonists_object.dart';
|
|
import 'package:flame_isolate_example/standard/int_vector2.dart';
|
|
|
|
class Bread extends StaticColonistsObject {
|
|
@override
|
|
Sprite objectSprite = Sprite(Flame.images.fromCache('bread.png'));
|
|
|
|
@override
|
|
IntVector2 tileSize = const IntVector2(1, 1);
|
|
|
|
Bread(super.x, super.y);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'Bread(${x / Constants.tileSize.toInt()}, '
|
|
'${y / Constants.tileSize.toInt()})';
|
|
}
|
|
|
|
@override
|
|
double difficulty = 11.3;
|
|
}
|