aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-06-23 17:17:20 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-06-23 17:17:20 +0800
commit2c3505074cc5eeceb9ec5ed6563eb4dc394afea1 (patch)
tree60c976f6d2c9aae126d0ef7fb4801957de01ee13
parentbd00f688e3a81029e235f0ae4f6984161b854af5 (diff)
parent5ac9d3860d1cb78c220fb9f5012c7e10d1654d35 (diff)
downloadSoopyV2-2c3505074cc5eeceb9ec5ed6563eb4dc394afea1.tar.gz
SoopyV2-2c3505074cc5eeceb9ec5ed6563eb4dc394afea1.tar.bz2
SoopyV2-2c3505074cc5eeceb9ec5ed6563eb4dc394afea1.zip
Merge branch 'master' of https://github.com/Soopyboo32/SoopyV2
-rw-r--r--featureClass/class.js9
-rw-r--r--featureClass/featureManager.js10
2 files changed, 17 insertions, 2 deletions
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
+}
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