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;