size property

  1. @override
NotifyingVector2 get size
inherited

The logical size of the component. The game assumes that this is the approximate size of the object that will be drawn on the screen. This size will therefore be used for collision detection and tap handling.

This property can be reassigned at runtime, although this is not recommended. Instead, in order to make the PositionComponent larger or smaller, change its scale.

Implementation

@override
NotifyingVector2 get size => _size;
  1. @override
set size (Vector2 value)
override

Implementation

@override
set size(Vector2 value) {
  throw UnsupportedError('The size of AlignComponent cannot be set directly');
}