Vector2 extension

This commit is contained in:
Lukas Klingsbo
2020-09-20 17:30:58 +02:00
parent 99b2c91069
commit 50f8ffce3b
55 changed files with 275 additions and 786 deletions

View File

@ -3,7 +3,7 @@ import 'dart:ui';
import 'package:flutter/foundation.dart';
import 'flame.dart';
import 'vector2f.dart';
import 'vector2_extension.dart';
/// sprite atlas with an image and a set of rects and transforms
class SpriteBatch {
@ -28,7 +28,7 @@ class SpriteBatch {
int get height => atlas.height;
Vector2F get size => Vector2F(width.toDouble(), height.toDouble());
Vector2 get size => Vector2(width.toDouble(), height.toDouble());
void addTransform({
@required Rect rect,