This file contains hidden or 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
| return Backbone.Marionette.ItemView.extend({ | |
| // Pass model to view because template 'this' is not current view. | |
| // based on: https://github.com/marionettejs/backbone.marionette/blob/master/docs/marionette.view.md#basic-example | |
| // | |
| templateHelpers: function() { | |
| return { model: this.model }; | |
| } | |
| }); |
This file contains hidden or 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
| <html> | |
| <head> | |
| <script src='http://cdn.html5quintus.com/v0.2.0/quintus-all.js'></script> | |
| <style> | |
| canvas { background-color: #5e81a2; } | |
| </style> | |
| </head> | |
| <body> | |
| <script> | |
| // This game uses spritesheet.png from: |
This file contains hidden or 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
| <html> | |
| <head> | |
| <script src='http://cdn.html5quintus.com/v0.2.0/quintus-all.js'></script> | |
| <style> | |
| canvas { background-color: #5e81a2; } | |
| </style> | |
| </head> | |
| <body> | |
| <script> | |
| // This game uses spritesheet.png from: |
This file contains hidden or 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
| <html> | |
| <head> | |
| <script src='http://cdn.html5quintus.com/v0.2.0/quintus-all.js'></script> | |
| <style> | |
| canvas { background-color: black; } | |
| </style> | |
| </head> | |
| <body> | |
| <script> | |
| // This game uses images from: |
This file contains hidden or 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
| // introduction | |
| // a game with two rooms | |
| // walk to next room | |
| // grab an item | |
| // (something good or bad happens) | |
| var room1 = { | |
| description: "A dark room full of holographic clowns" | |
| } |
This file contains hidden or 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
| var player1 = {name: "yoda", power: "jedi", age: 900}; | |
| var player2 = {name: "luke"} | |
| var players = [player1, player2]; | |
| var jump = function(player) { | |
| console.log(player.name + " jumps!"); | |
| } |
This file contains hidden or 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
| module SwingableInstanceMethods | |
| def instance_swing | |
| puts 'Did an instance swing!' | |
| end | |
| end | |
| module SwingableClassMethods | |
| def static_swing | |
| puts 'Did a static swing!' | |
| end |
This file contains hidden or 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
| var hit_enemy = function(enemy, weapon) { | |
| if(enemy.state == "alive") { | |
| enemy.health = enemy.health - weapon.damage; | |
| console.log("hit!", enemy.health); | |
| if(enemy.health <= 0) { | |
| console.log("it died"); | |
| enemy.state = "dead"; | |
| } | |
| } |
This file contains hidden or 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
| { | |
| "app/assets/javascripts/models/*.coffee": { | |
| "command": "jmodel", | |
| "alternate": "spec/javascripts/models/%s_spec.coffee", | |
| "template": "class @AppName.Models.%S extends Backbone.Model" | |
| }, | |
| "app/assets/javascripts/collections/*.coffee": { | |
| "command": "jcollection", |
This file contains hidden or 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
| X:72 | |
| T:Happy Birthday | |
| M:3/4 | |
| L:1/4 | |
| K:G | |
| V:1 | |
| |"G"D/2D/2|"G"E D G|"D"F2 D/2D/2|E D A| | |
| "G"G2 D/2D/2|d B G|"C"F E2-|E2 c/2c/2|"G"B G "D"A|"G"G2| |