EffectUtil class

特效工具类

Constructors

EffectUtil()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

hapticFeedbackImpact({int level = 1}) → void
触感反馈 level: 触感反馈强度
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
playSoundEffect(String assetPath) → void
播放音效的方法 assetPath : 'assets/sounds/win_sound.mp3'
stopSounds() → void
停止所有音效播放
tapFeedbackEffect({bool enableHapticFeedback = false, int level = 1, bool enableSound = false, String audioAssetPath = ''}) → void
点击反馈特效 enableHapticFeedback: 是否启用触感反馈 level: 触感反馈强度 enableSound: 是否启用音效 audioAssetPath: 音效资源路径
tapSoundEffect(String assetPath) → void
点击音效 assetPath : 'assets/sounds/win_sound.mp3'
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance EffectUtil
no setter