refactor: 使用flutter对原先的web项目重构,正在进行中
This commit is contained in:
1 parent
273224f5cf
commit
18017f819a
205 files changed
+13563
No files matched your search
@@ -0,0 +1,58 @@
|
||||
// 渲染层只读的"视图"接口:让 sprites.dart 不依赖完整游戏类,避免循环依赖。
|
||||
import 'dart:ui' show Color;
|
||||
|
||||
abstract class PlayerView {
|
||||
double get x;
|
||||
double get y;
|
||||
double get w;
|
||||
double get h;
|
||||
double get cx;
|
||||
double get cy;
|
||||
bool get grounded;
|
||||
int get facing;
|
||||
bool get hasGun;
|
||||
bool get dead;
|
||||
}
|
||||
|
||||
abstract class EntityView {
|
||||
double get x;
|
||||
double get y;
|
||||
double get w;
|
||||
double get h;
|
||||
bool get active;
|
||||
bool get falling;
|
||||
String get dir;
|
||||
}
|
||||
|
||||
abstract class MoverView {
|
||||
double get x;
|
||||
double get y;
|
||||
double get w;
|
||||
double get h;
|
||||
double get ax;
|
||||
double get ay;
|
||||
double get aw;
|
||||
double get ah;
|
||||
double get bx;
|
||||
double get by;
|
||||
}
|
||||
|
||||
abstract class BulletView {
|
||||
double get x;
|
||||
double get y;
|
||||
double get w;
|
||||
double get h;
|
||||
String get col;
|
||||
bool get big;
|
||||
}
|
||||
|
||||
class DeathFX {
|
||||
double x, y;
|
||||
int t;
|
||||
DeathFX(this.x, this.y, this.t);
|
||||
}
|
||||
|
||||
class DeathMark {
|
||||
double x, y;
|
||||
DeathMark(this.x, this.y);
|
||||
}
|
||||
Reference in new issue
Block a user