Created
June 30, 2010 20:52
-
-
Save krawaller/459206 to your computer and use it in GitHub Desktop.
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
"plr-gate":{ | |
conds: [{ // array of condition objects | |
'if': { // all properties here are conditions to be evaluated | |
"hasflag": "haskey" // tests for global flag of the given name | |
}, | |
then: { // effects to take place if all conditions were true | |
on: true, // collision takes place on the square | |
stop: "b", // stops the marble motion, with animation "b" (bounce) | |
setwalltype: "none" // makes the gate disappear | |
}, | |
'else': { // if any condition in if-object was false, execute this | |
stop:"b" // stop marble motion (on a neighbouring square, since object doesn't have prop on=true | |
} | |
}] | |
}, // ... |
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
// part of propertylist of collision definition object | |
"plr-key":{ | |
setwalltype: "none", // makes the key disappear | |
setflag: "haskey", // sets a global flag with the given name | |
on: true // collision happens when marble is on the square, as opposed to next to it | |
}, | |
// ...more definitions... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment