Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*:
- //==============================================================================
- // ■ Emoji Engine MV - Origin "EmojiBase"
- // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- @plugindesc Base for EMM. It's store the base values for the engine.
- @author Nio Kasgami.
- @Data : 2015/10/05
- @Version : 1.0.0
- @Require : NA
- //==============================================================================
- //==============================================================================
- // History
- // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- // 2015/10/29 - Begin and finish the plugin.
- //==============================================================================
- //==============================================================================
- // Introduction
- // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- //
- //==============================================================================
- //==============================================================================
- // Plugin Parameter
- // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- // this section handle the plugin parameter. Please do not edit unless you
- // want to add extra plugin command.
- //------------------------------------------------------------------------------
- * it's a base so this not handle any param commands
- //==============================================================================
- //==============================================================================
- // Help File
- // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- // This section serve for input the help file in the engine don't touch this
- // unless you want to input more information
- //------------------------------------------------------------------------------
- * @help
- * This plugin base serve for handles datas so it's not provide plugin command
- * though it's serve for store my other plugin commands via the alias of
- * the method "get_pluginname" and "get_params".
- *
- * be sure please to input this above all my EEMV plugin for avoid any issues.
- */
- //==============================================================================
- // ■ Emoji_Engine
- //------------------------------------------------------------------------------
- // the class who handle all the base of my plugins. Can be access via $emoji.
- //==============================================================================
- function Emoji_Engine() {this.initialize.apply(this,arguments);}
- Emoji_Engine.prototype.constructor = Emoji_Engine;
- //----------------------------------------------------------------------------
- // ○ new function: initialize
- //----------------------------------------------------------------------------
- Emoji_Engine.prototype.initialize = function() {
- this.get_data();
- };
- //----------------------------------------------------------------------------
- // ○ new function: get_data
- //----------------------------------------------------------------------------
- Emoji_Engine.prototype.get_data = function() {
- this.get_pluginname();
- this.get_params();
- };
- //----------------------------------------------------------------------------
- // ○ new function: get_pluginname
- //----------------------------------------------------------------------------
- Emoji_Engine.prototype.get_pluginname = function() {
- this.emojibase = PluginManager.parameters('EmojiBase');
- };
- //----------------------------------------------------------------------------
- // ○ new function: get_params
- //----------------------------------------------------------------------------
- Emoji_Engine.prototype.get_params = function() {};
- //===============================================================================
- // => END : Emoji_Engine
- //===============================================================================
- //==============================================================================
- // ■ DataManager
- //------------------------------------------------------------------------------
- // The static class that manages the database and game objects.
- //==============================================================================
- //----------------------------------------------------------------------------
- // ★ new global variables : $emoji
- //----------------------------------------------------------------------------
- var $emoji = null;
- //----------------------------------------------------------------------------
- // ● alias function: createGameObjects
- //----------------------------------------------------------------------------
- var emoji_basealias = DataManager.createGameObjects;
- DataManager.createGameObjects = function() {
- emoji_basealias.call(this);
- $emoji = new Emoji_Engine();
- };
- //----------------------------------------------------------------------------
- // ● overwrite function: loadDataFileSync
- //----------------------------------------------------------------------------
- DataManager.loadDataFileSync = function(name, src) {
- var xhr = new XMLHttpRequest();
- var url = 'data/' + src;
- xhr.open('GET', url, true);
- xhr.overrideMimeType('application/json');
- xhr.onload = function() {
- if (xhr.status < 400) {
- window[name] = JSON.parse(xhr.responseText);
- DataManager.onLoad(window[name]);
- }
- };
- xhr.onerror = function() {
- DataManager._errorUrl = DataManager._errorUrl || url;
- };
- window[name] = null;
- xhr.send();
- };
- //===============================================================================
- // => END : DataManager
- //===============================================================================
Advertisement
Add Comment
Please, Sign In to add comment