rpg制作大師mv天氣特效的戰(zhàn)斗js代碼
時(shí)間:2015-12-22 10:43:42 來(lái)源:k73電玩之家 作者:小四 熱度: 198 次
《rpg制作大師mv》中擁有許多不同的天氣,但有些時(shí)候天氣的顯示是否顯示在戰(zhàn)斗中需要玩家來(lái)進(jìn)行調(diào)試,以下給大家分享的是一個(gè)在非戰(zhàn)斗情況下顯示的天氣特效js代碼,還是相當(dāng)有用的,會(huì)讓你的游戲看起來(lái)高大上。
《rpg制作大師mv》中擁有許多不同的天氣,但有些時(shí)候天氣的顯示是否顯示在戰(zhàn)斗中需要玩家來(lái)進(jìn)行調(diào)試,以下給大家分享的是一個(gè)在非戰(zhàn)斗情況下顯示的天氣特效js代碼,還是相當(dāng)有用的,會(huì)讓你的游戲看起來(lái)高大上。
而這可能或可能不理想的人物,不給你MV多選擇:沒有天氣特效的戰(zhàn)斗。
你可以自己測(cè)試:
1。在地圖上,創(chuàng)建一個(gè)事件,將添加一些雪天氣的影響。
2。當(dāng)你運(yùn)行的事件,它應(yīng)該開始下雪
3。當(dāng)戰(zhàn)斗開始,雪效果停止。
4。戰(zhàn)斗結(jié)束后,雪影響簡(jiǎn)歷。
所以即便是沉重下雪的地圖上,你的戰(zhàn)場(chǎng)將是很干凈的。
有了這個(gè)插件,你可以有你的天氣影響到戰(zhàn)斗!
使用方法:
下載插件并將其放置在“插件”文件夾在您的項(xiàng)目中的“JS”文件夾。然后打開你的插件管理器(F10),雙擊一個(gè)空白行,然后選擇battleweather插件。
一旦它在你的插件列表,打開插件。
使用
即插即用,可有使用和不使用之分。
JS腳本:
/*:
-------------------------------------------------------------------------
@title Battle Weather
@author Hime
@date Oct 26, 2015
@url http://himeworks.com/2015/10/battle-weather/
-------------------------------------------------------------------------
@plugindesc Allows you to display weather effects in battle
@help
-------------------------------------------------------------------------
== Description ==
When there are weather effects on the map, these effects do not carry
over into battle.
This means that even if it's snowing heavily on your map, once you
enter the battle, it will be perfectly clean.
With this plugin, weather effects will carry over into battle, and
you can even start or stop weather effects during battle.
== Terms of Use ==
- Free for use in non-commercial projects with credits
- Contact me for commercial use
== Usage ==
Plug and Play.
-------------------------------------------------------------------------
*/
var Imported = Imported || {};
var TH = TH || {};
Imported.BattleWeather = 1
TH.BattleWeather = TH.BattleWeather || {};
(function ($) {
var TH_BattleWeather_SpritesetBattle_createLowerLayer = Spriteset_Battle.prototype.createLowerLayer;
Spriteset_Battle.prototype.createLowerLayer = function() {
TH_BattleWeather_SpritesetBattle_createLowerLayer.call(this);
this.createWeather();
}
var TH_BattleWeather_SpritesetBattle_update = Spriteset_Battle.prototype.update;
Spriteset_Battle.prototype.update = function() {
TH_BattleWeather_SpritesetBattle_update.call(this);
this.updateWeather();
};
Spriteset_Battle.prototype.createWeather = function() {
this._weather = new Weather();
this.addChild(this._weather);
};
Spriteset_Battle.prototype.updateWeather = function() {
console.log($gameScreen);
this._weather.type = $gameScreen.weatherType();
this._weather.power = $gameScreen.weatherPower();
this._weather.origin.x = 0
this._weather.origin.y = 0
};
/* Overwrite */
Game_Interpreter.prototype.command236 = function() {
$gameScreen.changeWeather(this._params[0], this._params[1], this._params[2]);
if (this._params[3]) {
this.wait(this._params[2]);
}
return true;
};
})(TH.BattleWeather);
熱門新聞
我要評(píng)論 查看全部評(píng)論 (0)>>