Che ore sono..? Non lo so, ma senza ombra di dubbio questo script ve lo dirà. In game.
Spoiler
//============================================================================= // Timer Enhancements // Author gameus // Version 1.0 //----------------------------------------------------------------------------- // Intro: // Adds a few options to change up the timer. Adds the option to change // position, manually or automatically, change the color, text size, and even // add a background image. // // Instructions: // Place in your plugins folder and save as 'TimerEnhancements.js' // Configure the options as you please. // // Credits: // gameus ~ For creating it. //============================================================================= /*: * @plugindesc Changes position and appearance of the Timer * @author gameus * * @param Auto Position * @desc Auto position the timer. 0: Manual, 1: Upper Left, 2: Upper Right, 3: Lower Left, 4: Lower Right * @default 0 * * @param Position X * @desc X coordinate for the timer. * @default 0 * * @param Position Y * @desc Y Coordinate for the timer. * @default 0 * * @param Text Size * @desc Defines the size of the text * @default 32 * * @param Text Color * @desc Defines the text color in RGB. e.g. 255,128,255 * @default 255, 255, 255 * * @param Background * @desc If false won't draw a background, otherwise, set it to the name of the picture. * @default false * * @param Background Transparency * @desc Background image's transparency. 0-255 * @default 255 * * @help This plugin does not provide plugin commands. */ var GameusScripts = GameusScripts || {}; var GameusScripts['TimerEnhancements'] = 1.0; (function() { var parameters = PluginManager.parameters('TimerEnhancements'); var gameus_Timer_Enhancements_createBitmap = Sprite_Timer.prototype.createBitmap; var gameus_Timer_Enhancements_updatePosition = Sprite_Timer.prototype.updatePosition; var gameus_Timer_Enhancements_redraw = Sprite_Timer.prototype.redraw; function toHex(n) { n = parseInt(n,10); if (isNaN(n)) return "00"; n = Math.max(0,Math.min(n,255)); return "0123456789ABCDEF".charAt((n-n%16)/16) + "0123456789ABCDEF".charAt(n%16); }; function rgbToHex(rgb) { nrgb = rgb.replace(/\s+/g, ''); nrgb = nrgb.split(','); return ("#" + toHex(nrgb[0]) + toHex(nrgb[1]) + toHex(nrgb[2])); }; Sprite_Timer.prototype.createBitmap = function() { gameus_Timer_Enhancements_createBitmap.call(this); this.backgroundImage = false; if (parameters['Background'].toLowerCase() !== "false") { var bmp = ImageManager.loadPicture(parameters['Background']); bmp.addLoadListener(this.onLoadBackground.bind(this, bmp)); } this.bitmap.fontSize = parameters['Text Size']; }; Sprite_Timer.prototype.onLoadBackground = function(bmp) { this.bitmap = new Bitmap(bmp.width, bmp.height); this.backgroundImage = bmp; }; Sprite_Timer.prototype.updatePosition = function() { gameus_Timer_Enhancements_updatePosition.call(this); var newX = 0; var newY = 0; switch (parameters['Auto Position'].toLowerCase()) { case "0": newX = Number(parameters['Position X']); newY = Number(parameters['Position Y']); break; case "2": newX = Graphics.width - this.bitmap.width; break; case "3": newY = Graphics.height - this.bitmap.height; break; case "4": newX = Graphics.width - this.bitmap.width; newY = Graphics.height - this.bitmap.height; break; } this.x = newX; this.y = newY; }; Sprite_Timer.prototype.redraw = function() { gameus_Timer_Enhancements_redraw.call(this); var text = this.timerText(); var width = this.bitmap.width; var height = this.bitmap.height; var backWidth = this.backgroundImage.width; var backHeight = this.backgroundImage.height; this.bitmap.clear(); this.bitmap.paintOpacity = Number(parameters['Background Transparency']); if (this.backgroundImage !== false) this.bitmap.blt(this.backgroundImage, 0, 0, backWidth, backHeight, 0, 0); this.bitmap.paintOpacity = 255; this.bitmap.textColor = rgbToHex(parameters['Text Color']); this.bitmap.drawText(text, 0, 0, width, height, 'center'); }; })();
Un'altra creazione di Gameaus, spero che vi possa piacere. Con quest'addon potrete personalizzare
la modalità di visualizzazione del tempo. Cambiandone il colore e quant'altro.
Spero possa servirvi. e niente. ciao..