Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*:
- * @plugindesc Some plugin description
- * @author eastw
- *
- * @help This plugin does not provide plugin commands.
- *
- */
- /*:ja
- * @plugindesc Some plugin desc
- * @author eastw
- *
- *
- */
- //Graphic actor presentation
- function GActor() {
- this.init();
- }
- GActor.prototype.constructor = GActor;
- GActor.prototype.init = function() {
- this._actor = 'riven';
- this._emotion = 'normal';
- this._hide = false;
- this._sprite = new Sprite_Riven();
- this._sprite.createBitmap(this._actor, this._emotion);
- };
- GActor.prototype.hide = function() {
- this._hide = true;
- };
- GActor.prototype.show = function() {
- this._hide = false;
- };
- GActor.prototype.isHidden = function() {
- return this._hide;
- };
- GActor.prototype.setActor = function(actor) {
- this._actor = actor;
- };
- GActor.prototype.showEmotion = function(emotion) {
- this._emotion = emotion;
- this._sprite.createBitmap(this._actor, this._emotion);
- this.show();
- };
- GActor.prototype.getSprite = function() {
- return this._sprite;
- };
- var ga_init = Game_System.prototype.initialize;
- Game_Interpreter.prototype.initialize = function() {
- ga_init.call(this);
- this._gActor = null;
- };
- var gs_init = Game_System.prototype.initialize;
- Game_System.prototype.initialize = function() {
- gs_init.call(this);
- this._gActor = new GActor();
- };
- Game_System.prototype.getGActor = function() {
- return this._gActor;
- };
- Game_Interpreter.prototype.getGActor = function() {
- return $gameSystem.getGActor();
- };
- function Sprite_Riven() {
- this.initialize.apply(this, arguments);
- }
- Sprite_Riven.prototype = Object.create(Sprite_Base.prototype);
- Sprite_Riven.prototype.constructor = Sprite_Riven;
- Sprite_Riven.prototype.initialize = function() {
- Sprite_Base.prototype.initialize.call(this);
- };
- Sprite_Riven.prototype.createBitmap = function(actor, emotion) {
- this.bitmap = ImageManager.loadPicture(actor + '/' + emotion);
- };
- Sprite_Riven.prototype.update = function() {
- Sprite_Base.prototype.update.call(this);
- this.updatePosition();
- };
- Sprite_Riven.prototype.updatePosition = function() {
- this.x = Graphics.boxWidth / 2 - 100;
- this.y = Graphics.boxHeight - 413;
- if ($gameSystem.getGActor().isHidden()) {
- this.opacity = 0;
- } else {
- this.opacity = 500;
- }
- };
- Scene_Map.prototype.createRivenSprite = function() {
- this._riven = $gameSystem.getGActor().getSprite();
- this.addChild(this._riven);
- };
- var scene_map_terminate = Scene_Map.prototype.terminate;
- Scene_Map.prototype.terminate = function() {
- scene_map_terminate.call(this);
- this.removeChild(this._riven);
- };
- Scene_Map.prototype.createDisplayObjects = function() {
- this.createSpriteset();
- this.createRivenSprite(); //if create below then sprite on top
- this.createMapNameWindow();
- this.createWindowLayer();
- this.createAllWindows();
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement