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>
<table>
<tr>
<td>
<br/>Audio Volume
<td rowspan=2>
<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>
<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>
</tr>
<tr>
<td>
<br/>Brightness
Brightness
</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>
</tr>
</table>

View File

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