Preferences class

Глобальные константы, определяющие работу игры.

Constructors

Preferences.new({double textBoxHeight = 114, int typingDelay = 20, double backgroundParallax = 0.005, Map<String, Offset> spritePositions = const {'center' : Offset(0, 0.5), 'center_left' : Offset(-1 / 3, 0.5), 'center_right' : Offset(1 / 3, 0.5), 'left' : Offset(-2 / 3, 0.5), 'right' : Offset(2 / 3, 0.5)}, String savePath = '/novel/', String translate(String) = Preferences.defaultTranslator})
const

Properties

backgroundParallax double
Parallax intensity of background and sprites with depth set to 1.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
savePath String
Relative path to the save folder. Root is defined by getApplicationDocumentsDirectory().
final
spritePositions Map<String, Offset>
Named relative positions of the sprites on a scene. Each position is represented as Offset from the center of the screen, where (-1, -1) is the top-left corner, and (1, 1) is the bottom-right one.
final
textBoxHeight double
Высота текстового окна. По умолчанию равна 3 сантиметрам в логических пикселях.
final
translate String Function(String)
A callback which translates the engine built-in strings. Default to Preferences.defaultTranslator
final
typingDelay int
It's the time between drawing characters of the string on the scene.
final

Methods

copyWith({double? textBoxHeight, int? typingDelay, double? backgroundParallax, Map<String, Offset>? spritePositions, String? savePath, String translate(String)?}) Preferences
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

defaultTranslator(String s) String