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
require('./thorny/base')('./config/default.json', function ($) { | |
// Register a component so we can use it below. | |
$.es().registerComponent('load-level', function () { | |
return { | |
// Used to enable the isReady function. | |
asynchronousAttachEvent: 'world-loaded', | |
// Called in response to .addComponent() | |
attach: function (entity, filename) { | |
$.ajax({ |
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
require('./thorny/base')('./config/default.json', function ($) { | |
if ($.dooooom().makeHappen() === $('thorny some-dooms-day-feature').makeHappen()) { | |
// serve cake, because cake and dooooom is an ideal pairing. | |
} | |
}); |
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
[ | |
"thorny math vector2", | |
"./config/other.json" | |
] |
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
require('thorny/base')('./config/default.json')(function ($) { | |
// Grab a copy of the entity system object | |
var entitySystem = $('thorny entity-system'); | |
// Make the actor template | |
entitySystem.makeEntity($.defined('template')) | |
.addTag('actor') | |
.addComponent('position') | |
.addComponent('keys') | |
.addComponent('render-2d'); |
NewerOlder