赞 | 28 |
VIP | 0 |
好人卡 | 0 |
积分 | 75 |
经验 | 0 |
最后登录 | 2025-1-12 |
在线时间 | 1477 小时 |
Lv4.逐梦者
- 梦石
- 0
- 星屑
- 7504
- 在线时间
- 1477 小时
- 注册时间
- 2018-12-16
- 帖子
- 2064
|
下面這個官方插件 可以做到 月光大的功能
不過 他只可以 4個方向轉而已
就是無法像 下面這兩個一樣 可以 全方向.... 而且跟很多插件衝突....
01.本來找到GLV的MV Map Projectiles,但是相當難設定..
https://galvs-scripts.com/2016/09/13/mv-map-projectiles/
02. 日本人做的這個 看起來很厲害...不過也是很難設定
https://tm.lucky-duet.com/viewtopic.php?t=7121
https://game.nicovideo.jp/atsumaru/games/gm9334
-----------------------------------
//=============================================================================
// PlayerPointerTurn.js
// ----------------------------------------------------------------------------
// Copyright (c) 2015 Triacontane
// This software is released under the MIT License.
// http://opensource.org/licenses/mit-license.php
// ----------------------------------------------------------------------------
// Version
// 1.1.0 2018/02/10 PD_8DirDash.js?券????游????孵??怠紋敹????賬?餈賢??????
// 1.0.0 2016/02/23 ??
// ----------------------------------------------------------------------------
// [Blog] : https://triacontane.blogspot.jp/
// [Twitter]: https://twitter.com/triacontane/
// [GitHub] : https://github.com/triacontane/
//=============================================================================
/*:
* @plugindesc ??喋餈質楚??啜??
* @author ??U?喋??
*
* @help 蝘餃??航?芸???扎?潦?
* ??嫘??扎?踴?嫘????整???
*
* ???啜?喋?胯??押?扎?喋??喋??胯??????
*
* ?拍閬?嚗?
* 雿?⊥?扳憭?????賬??典耦?????8蝳?函?嚗?
* ?怒??????整???
* ???啜?喋??????扼???
*/
(function() {
var isExistPlugin = function(pluginName) {
return PluginManager._parameters.hasOwnProperty([pluginName.toLowerCase()]);
};
//=============================================================================
// Game_Player
// ??喋?格????
//=============================================================================
var _Game_Player_moveByInput = Game_Player.prototype.moveByInput;
Game_Player.prototype.moveByInput = function() {
if (!this.isMoving() && this.canMove() && TouchInput.isMoved()) {
this.turnToPointer();
}
_Game_Player_moveByInput.apply(this, arguments);
};
Game_Player._8dirTable = [6, 9, 8, 7, 4, 1, 2, 3, 6];
Game_Player.prototype.turnToPointer = function() {
var tx = TouchInput.x, ty = TouchInput.y, sx = this.screenX(), sy = this.screenY();
var dir;
if (isExistPlugin('PD_8DirDash') && this._characterName.indexOf('Q') !== -1) {
var degree = (Math.atan2(ty - sy, -(tx - sx)) / Math.PI + 1) / 2 * 8;
dir = Game_Player._8dirTable[Math.round(degree)];
} else {
dir = Math.abs(tx - sx) > Math.abs(ty - sy) ? (tx > sx ? 6 : 4) : (ty > sy ? 2 : 8);
}
this.setDirection(dir);
};
//=============================================================================
// TouchInput
// ??喋?桐?蝵柴?撣詻閮
//=============================================================================
TouchInput._onMouseMove = function(event) {
var x = Graphics.pageToCanvasX(event.pageX);
var y = Graphics.pageToCanvasY(event.pageY);
this._onMove(x, y);
};
})();
|
|