DataManager._databaseFiles = [
{ name: '$dataActors', src: 'Actors.json' },
{ name: '$dataClasses', src: 'Classes.json' },
{ name: '$dataSkills', src: 'Skills.json' },
{ name: '$dataItems', src: 'Items.json' },
{ name: '$dataWeapons', src: 'Weapons.json' },
{ name: '$dataArmors', src: 'Armors.json' },
{ name: '$dataEnemies', src: 'Enemies.json' },
{ name: '$dataTroops', src: 'Troops.json' },
{ name: '$dataStates', src: 'States.json' },
{ name: '$dataAnimations', src: 'Animations.json' },
{ name: '$dataTilesets', src: 'Tilesets.json' },
{ name: '$dataCommonEvents', src: 'CommonEvents.json' },
{ name: '$dataSystem', src: 'System.json' },
{ name: '$dataMapInfos', src: 'MapInfos.json' },
{ name: '$dataTestCreature', src: 'default.json' }
];
var alias_sceneMap_createDispObj = Scene_Map.prototype.createDisplayObjects;
Scene_Map.prototype.createDisplayObjects = function () {
alias_sceneMap_createDispObj.call(this);
this.createDemoCreatureObject();
}
Scene_Map.prototype.createDemoCreatureObject = function () {
this._creature = new Creature ($dataTestCreature, false);
this._creature._anim1 = new CreatureAnimation($dataTestCreature, "default", false);
this._creature._anim2 = new CreatureAnimation($dataTestCreature, "second", false);
this._creature._manager = new CreatureManager(this._creature);
this._creature._manager.AddAnimation(this._creature._anim1);
this._creature._manager.AddAnimation(this._creature._anim2);
this._creature._manager.SetActiveAnimationName("default", false);
this._creature._manager.SetShouldLoop(true);
this._creature._manager.SetIsPlaying(true);
this._creature._manager.RunAtTime(0);
var texture = PIXI.texture.fromImage ("character-dragon.png");
this._creatureLayer = new PIXI.Container(); //displayObjectContainer is deprecated
this._creatureLayer.position.x = window.innerWidth/2;
this._creatureLayer.position.y = window.innerHeight/2;
this._creatureLayer.scale.set(35.0);
this.addChild(this._creatureLayer);
this._creatureRenderer = new CreatureRenderer(this._creature._manager, texture);
this._creatureLayer.addChild(this._creatureRenderer);
}
var alias_sceneMap_update = Scene_Map.prototype.update;
Scene_Map.prototype.update = function () {
alias_sceneMap_update.call(this);
this.updateCreature();
}
Scene_Map.prototype.updateCreature = function () {
this._creature._manager.Update(0.05);
this._creatureRenderer.refresh();
}