From 9978834cecf950dddec16de3b1c701bf4da1d783 Mon Sep 17 00:00:00 2001 From: EmeraldMerchant <96396730+EmeraldMerchant@users.noreply.github.com> Date: Wed, 22 Jun 2022 23:56:21 +0800 Subject: added register soundplay as title --- featureClass/class.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/featureClass/class.js b/featureClass/class.js index b8a17d9..3471652 100644 --- a/featureClass/class.js +++ b/featureClass/class.js @@ -106,6 +106,13 @@ class Feature { return new CustomEvent(theEvent, theEvent.trigger, [criteria, func], this) } + registerSoundPlay(criteria, func) { + let theEvent = this.FeatureManager.registerSoundPlay(criteria, func, this) + + this.customEvents[theEvent.id] = theEvent + + return new CustomEvent(theEvent, theEvent.trigger, [criteria, func], this) + } registerActionBar(criteria, func) { let theEvent = this.FeatureManager.registerActionBar(criteria, func, this) @@ -274,4 +281,4 @@ class CustomEvent extends Event { actuallyUnregister() { this.trigger.unregister() } -} \ No newline at end of file +} -- cgit From 73471a72ae85900114cc5f69bf8cdd28e4a53e6a Mon Sep 17 00:00:00 2001 From: EmeraldMerchant <96396730+EmeraldMerchant@users.noreply.github.com> Date: Wed, 22 Jun 2022 23:57:15 +0800 Subject: added register soundplay as title --- featureClass/featureManager.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/featureClass/featureManager.js b/featureClass/featureManager.js index 991f549..41ba671 100644 --- a/featureClass/featureManager.js +++ b/featureClass/featureManager.js @@ -382,6 +382,14 @@ class FeatureManager { return event } + registerSoundPlay(criteria, func, context) { + let event = this.registerCustom("soundPlay", func, context) + + event.trigger.setCriteria(criteria) + + return event + } + registerActionBar(criteria, func, context) { let event = this.registerCustom("actionBar", func, context) @@ -624,4 +632,4 @@ if (!global.soopyv2featuremanagerthing) { global.soopyv2featuremanagerthing = undefined }) } -export default global.soopyv2featuremanagerthing \ No newline at end of file +export default global.soopyv2featuremanagerthing -- cgit