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
触感反馈
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
playSoundEffect(String assetPath) → void
播放普通音效(复用音频池1)
stopSounds() → void
停止所有音效的播放(只作用于池1)
tapFeedbackEffect({bool enableHapticFeedback = false, int level = 1, bool enableSound = false, String audioAssetPath = ''}) → void
点击反馈特效,结合触感与音效
tapSoundEffect(String assetPath) → void
播放点击音效(复用音频池0)
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance EffectUtil
单例访问
no setter