mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-02 20:13:50 +08:00
formating and fixing warnings
This commit is contained in:
@ -61,8 +61,8 @@ class Animation {
|
||||
int amount, {
|
||||
double textureX = 0.0,
|
||||
double textureY = 0.0,
|
||||
double textureWidth = null,
|
||||
double textureHeight = null,
|
||||
double textureWidth,
|
||||
double textureHeight,
|
||||
double stepTime = 0.1,
|
||||
}) {
|
||||
this.frames = new List<Frame>(amount);
|
||||
@ -85,8 +85,8 @@ class Animation {
|
||||
List<double> stepTimes, {
|
||||
double textureX = 0.0,
|
||||
double textureY = 0.0,
|
||||
double textureWidth = null,
|
||||
double textureHeight = null,
|
||||
double textureWidth,
|
||||
double textureHeight,
|
||||
}) {
|
||||
this.frames = new List<Frame>(amount);
|
||||
for (var i = 0; i < amount; i++) {
|
||||
@ -108,7 +108,7 @@ class Animation {
|
||||
bool get isLastFrame => currentIndex == frames.length - 1;
|
||||
|
||||
/// Sets a different step time to each frame. The sizes of the arrays must match.
|
||||
void set variableStepTimes(List<double> stepTimes) {
|
||||
set variableStepTimes(List<double> stepTimes) {
|
||||
assert(stepTimes.length == frames.length);
|
||||
for (int i = 0; i < frames.length; i++) {
|
||||
frames[i].stepTime = stepTimes[i];
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import 'dart:ui';
|
||||
import 'dart:math' as math;
|
||||
|
||||
import 'package:flutter/src/painting/text_painter.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
import 'component.dart';
|
||||
import 'resizable.dart';
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flame/components/component.dart';
|
||||
@ -77,7 +78,5 @@ class TiledComponent extends Component {
|
||||
}
|
||||
|
||||
@override
|
||||
void update(double t) {
|
||||
// TODO: implement update
|
||||
}
|
||||
void update(double t) {}
|
||||
}
|
||||
|
||||
@ -57,7 +57,8 @@ class Util {
|
||||
/// Use this in order to get it to work in case your app also contains other widgets.
|
||||
void addGestureRecognizer(GestureRecognizer recognizer) {
|
||||
if (GestureBinding.instance == null) {
|
||||
throw new Exception("GestureBinding is not initialized yet, this probably happened because addGestureRecognizer was called before the runApp method");
|
||||
throw new Exception(
|
||||
"GestureBinding is not initialized yet, this probably happened because addGestureRecognizer was called before the runApp method");
|
||||
}
|
||||
|
||||
GestureBinding.instance.pointerRouter.addGlobalRoute((PointerEvent e) {
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'dart:typed_data';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user