Skip to content
Browse files

Merge pull request #9 from juhana/master

Exposing interactivity state
  • Loading branch information...
2 parents 920165a + 1c286f3 commit f02ca7b2b78419be4b14fcea4f3e55afa2c07a10 @idmillington idmillington committed Sep 3, 2011
Showing with 9 additions and 1 deletion.
  1. +7 −1 docs/src/API.md
  2. +2 −0 games/media/js/undum.js
View
8 docs/src/API.md
@@ -1094,6 +1094,12 @@ games will not load correctly. A player may save their game at one
point and find most of their progress wiped out when they load it
again.
+If your game has elements that should not be triggered while Undum is
+replaying a saved game, for example sound effects or popup notifications,
+you can use `undum.isInteractive()` to test whether the game is being
+played normally (returns `true`) or being loaded from a save game
+(returns `false`).
+
# Translation and Internationalization
@@ -1211,4 +1217,4 @@ spec!
## 2011-08-18
- Added support for functions in the `content` and `header` of a
- `SimpleSituation` (credit: David Eyk).
+ `SimpleSituation` (credit: David Eyk).
View
2 games/media/js/undum.js
@@ -1313,6 +1313,8 @@
QualityGroup: QualityGroup,
game: game,
+
+ isInteractive: function() { return interactive; },
// The undum set of translated strings.
language: {}

0 comments on commit f02ca7b

Please sign in to comment.
Something went wrong with that request. Please try again.