From f594ef14f0f608d602675613bea76e1ea6ee22a0 Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Sun, 15 Jun 2014 20:31:13 -0700 Subject: [PATCH] Add a preloader bar --- README.md | 8 -------- moonlight/js/moonlight-skulk.js | 7 +++++++ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 40aa46f..cc38d71 100644 --- a/README.md +++ b/README.md @@ -28,10 +28,6 @@ The Chase AI should stop chasing you if it has not seen you for a certain amount See above, once the Chase AI loses you, it should look for you for some time before giving up -## TODO : Make player harder to "see" when they are in shadows or far away - -The dynamic lighting effect will make certain areas of the map "darker" than others. When the player stands in them, they get darker as well. This "darkness" factor, as well as how far away the player is, should be taken into account when determining if an AI can "see" the player - ## TODO : Player should be able to "steal" from people The player should be able to get within a certain distance of people, press an action button, and "steal" objects from them @@ -51,7 +47,3 @@ The game should keep score based on how much loot the player steals ($$ value?), ## TODO : AI stops and chats with each other A coup de grace would be if, every so often, AI would randomly stop and have short preprogrammed chats with each other. - -## TODO : AI should give some indicator that it is about to change directions - -As a player, it would really suck if the AI I was following suddenly did an about-face with absolutely no warning. The AI should telegraph this movement somehow with varying degrees of "time to get your shit together". diff --git a/moonlight/js/moonlight-skulk.js b/moonlight/js/moonlight-skulk.js index 4fcd4c0..aea12a6 100644 --- a/moonlight/js/moonlight-skulk.js +++ b/moonlight/js/moonlight-skulk.js @@ -992,6 +992,13 @@ function addAnimation(obj, anim) GameState.prototype.preload = function() { + game.load.image('preloader', 'gfx/ui/preloader.png'); + preloadBar = game.add.sprite(0, 0, 'preloader'); + preloadBar.anchor.setTo(0.5, 0.5); + preloadBar.x = game.camera.x + (game.camera.width / 2); + preloadBar.y = game.camera.y + (game.camera.width / 2); + game.load.setPreloadSprite(preloadBar, 0); + for (var k in moonlightSettings['map']['tilesets']) { var ts = moonlightSettings['map']['tilesets'][k]; this.load.image(ts['name'], ts['path']);