Merge branch 'master' of github.com:akesterson/moonlight-skulk

This commit is contained in:
2014-07-17 07:38:03 -07:00
2 changed files with 55 additions and 46 deletions

View File

@@ -24,19 +24,27 @@
</div> </div>
<table> <table>
<tr> <tr>
<td> <td rowspan=2>
<br/>Audio Volume <ul>
<li>Click New Game to start</li>
<li>Arrow keys to walk</li>
<li>Hold down SHIFT to run</li>
<li>Face someone and press<br/>SPACE to steal</li>
</ul>
</td> </td>
<td> <td>
<br/><input type="range" id="uiMusicVolume" min="1" max="100" value="75"/> Audio Volume
</td>
<td>
<input type="range" id="uiMusicVolume" min="1" max="100" value="75"/>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<br/>Brightness Brightness
</td> </td>
<td> <td>
<br/><input type="range" id="uiGamma" min="1" max="30" value="0"/> <input type="range" id="uiGamma" min="1" max="30" value="0"/>
</td> </td>
</tr> </tr>
</table> </table>

View File

@@ -29,7 +29,10 @@ GameState.prototype.create = function()
); );
if ( lp['inject_sprites'] == true ) { if ( lp['inject_sprites'] == true ) {
this.aiSprites = game.add.group(); this.aiSprites = game.add.group();
this.aiSprites.debug = true; this.aiSprites.debug = false;
this.aiSpriteEffects = game.add.group();
this.staticSounds = game.add.group();
this.bubble_group = game.add.group();
this.map.createFromObjects('AI', 3544, 'player', 0, true, false, this.aiSprites, AISprite); this.map.createFromObjects('AI', 3544, 'player', 0, true, false, this.aiSprites, AISprite);
this.aiSprites.forEach(function(spr) { this.aiSprites.forEach(function(spr) {
spr.update_new_values(); spr.update_new_values();
@@ -111,16 +114,12 @@ GameState.prototype.create = function()
light.update_new_values(); light.update_new_values();
}, this) }, this)
this.aiSpriteEffects = game.add.group();
this.staticSounds = game.add.group();
this.map.createFromObjects('Sounds', 11, 'player', 0, true, false, this.staticSounds, SoundSprite); this.map.createFromObjects('Sounds', 11, 'player', 0, true, false, this.staticSounds, SoundSprite);
this.staticSounds.forEach(function(snd) { this.staticSounds.forEach(function(snd) {
snd.update_new_values(); snd.update_new_values();
}, this) }, this)
this.bubble_group = game.add.group();
this.uigroup = game.add.group(); this.uigroup = game.add.group();
this.recentlyStolenGroup = game.add.group(); this.recentlyStolenGroup = game.add.group();
this.game.time.advancedTiming = true; this.game.time.advancedTiming = true;
@@ -432,7 +431,7 @@ GameState.prototype.update = function()
_AI_collide); _AI_collide);
this.updateShadowTexture(); this.updateShadowTexture();
if ( this.aiSprites.debug == false ) { if ( this.aiSprites.debug == true ) {
function _draw_viewrect(x) { function _draw_viewrect(x) {
var r = x.viewRectangle(); var r = x.viewRectangle();
if ( isSet(r) == false ) if ( isSet(r) == false )
@@ -483,6 +482,8 @@ GameState.prototype.shutdown = function()
}, this); }, this);
this.aiSprites.destroy(); this.aiSprites.destroy();
this.aiSprites = null; this.aiSprites = null;
this.aiSpriteEffects.destroy();
this.aiSpriteEffects = null;
this.uigroup.destroy(); this.uigroup.destroy();
this.uigroup = null; this.uigroup = null;
this.recentlyStolenGroup.destroy(); this.recentlyStolenGroup.destroy();