-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #123 from seisatsu/pmer/re-rumble
Get ready to rummmmmmmmmbllllllllllle!
- Loading branch information
Showing
7 changed files
with
59 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
def rumble(rate, intensity, duration): | ||
__end_regular_rumble() | ||
Driftwood.script.call("stdlib/viewport.py", "rumble", rate, intensity, duration) | ||
|
||
|
||
def regular_rumble(rate, intensity, duration, interval): | ||
__end_regular_rumble() | ||
def rumble(): | ||
Driftwood.script.call("stdlib/viewport.py", "rumble", rate, intensity, duration) | ||
Driftwood.vars["regular_rumble"] = rumble | ||
Driftwood.tick.register(rumble, delay=interval) | ||
|
||
|
||
def __end_regular_rumble(): | ||
if "regular_rumble" in Driftwood.vars: | ||
Driftwood.tick.unregister(Driftwood.vars["regular_rumble"]) | ||
del Driftwood.vars["regular_rumble"] | ||
|
||
|
||
def constant_rumble(rate, intensity): | ||
__end_regular_rumble() | ||
Driftwood.script.call("stdlib/viewport.py", "rumble", rate, intensity, None) | ||
|
||
|
||
def end_rumble(): | ||
__end_regular_rumble() | ||
Driftwood.script.call("stdlib/viewport.py", "end_rumble") |
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