From d516dc2624c6e0d28f0c7daa7c9fe1826ca3488f Mon Sep 17 00:00:00 2001 From: nise_nabe Date: Mon, 27 Jan 2014 21:17:33 +0900 Subject: [PATCH] =?UTF-8?q?15s=20=E6=AF=8E=E3=81=AB=20bind()=20=E3=81=97?= =?UTF-8?q?=E3=81=A6=E3=81=84=E3=81=8F=E3=81=AE=E3=81=A7=E3=82=84=E3=81=B0?= =?UTF-8?q?=E3=81=84=E3=82=89=E3=81=97=E3=81=84=E3=82=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/beamQuest/ctrl/fieldMap.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/beamQuest/ctrl/fieldMap.js b/app/beamQuest/ctrl/fieldMap.js index df3bd04..dfbf574 100644 --- a/app/beamQuest/ctrl/fieldMap.js +++ b/app/beamQuest/ctrl/fieldMap.js @@ -10,6 +10,9 @@ var FieldMap = function(map) { this.scheduleUpdate(); this.map = map; + + this.initMobs_(); + setInterval(this.initMobs_.bind(this), FieldMap.POP_INTERVAL); }; util.inherits(FieldMap, EntityCtrl); @@ -17,8 +20,7 @@ FieldMap.POP_INTERVAL = 15000; /** @override */ FieldMap.prototype.update = function() { - this.initMobs_(); - setInterval(this.initMobs_.bind(this), FieldMap.POP_INTERVAL); + // ここに毎ループの処理を書いてくよ }; /** @@ -70,4 +72,4 @@ FieldMap.prototype.randomPosition_ = function() { return position; }; -module.exports = FieldMap; \ No newline at end of file +module.exports = FieldMap;