generated from League-of-Foundry-Developers/FoundryVTT-Module-Template
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
130 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import * as lib from "../lib/lib.js"; | ||
import Section from "./section.js"; | ||
import SequencerFoundryReplicator from "../modules/sequencer-foundry-replicator.js"; | ||
import SequencerSoundManager from "../modules/sequencer-sound-manager.js"; | ||
|
||
export default class EngagementSection extends Section { | ||
constructor(inSequence, inSrc = null, inMaxWaitTime = null) { | ||
super(inSequence); | ||
this._waitUntilFinished = true; | ||
this._sound = inSrc; | ||
this._maxWaitTime = inMaxWaitTime; | ||
} | ||
|
||
static niceName = "Engagement"; | ||
|
||
/** | ||
* @returns {Promise<void>} | ||
*/ | ||
async run() { | ||
lib.debug("Running engagement"); | ||
let soundFile = await SequencerSoundManager.AudioHelper.preloadSound(this._sound); | ||
if(!soundFile) return; | ||
await SequencerFoundryReplicator._waitForEngagement(this._sound, this._maxWaitTime); | ||
} | ||
|
||
/** | ||
* @returns {Promise} | ||
* @private | ||
*/ | ||
async _execute() { | ||
await this.run(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters