赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 9846 |
最后登录 | 2020-2-27 |
在线时间 | 192 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 60
- 在线时间
- 192 小时
- 注册时间
- 2011-12-10
- 帖子
- 73
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
XAS队员系统与空轨迹菜单系统冲突如下图
脚本如下
#==============================================================================#
# MOG_XAS移动动作显示窗口V1.1 #
#==============================================================================# #
#==============================================================================#
# 描述 #
#==============================================================================#
# 这个窗口会在主角得到或者使用物品和技能的时候显示。 #
#==============================================================================#
# 检查Name_ON在SKILL中的表格来确定在使用或者得到一个TOOL的时候, #
# 是否显示移动动作显出窗口 #
#==============================================================================#
# #
# 需要的图片: #
# #
# AF_Lay1 #
# AF_Lay2 #
# AF_Lay3 #
# #
# 所有图片请务必放在Windowskins文件夹中. #
# # #
#==============================================================================#
module MOG
# 移动动作显示窗口的X坐标..............................[移动动作显示窗口的位置]
IFA_HUD_X = 200
# 移动动作显示窗口的Y坐标..............................[移动动作显示窗口的位置]
IFA_HUD_Y = 420
# 信息显示在屏幕上的时间.................................................[秒数]
IFA_TIME = 2
end
#==============================================================================
# Game_Temp
#==============================================================================
class Game_Temp
attr_accessor :if_hud1_x
attr_accessor :if_hud1_y
attr_accessor :if_hud1_opa
attr_accessor :if_hud2_x
attr_accessor :if_hud2_y
attr_accessor :if_hud2_opa
attr_accessor :if_hud3_x
attr_accessor :if_hud3_y
attr_accessor :if_hud3_opa
attr_accessor :if_text_x
attr_accessor :if_text_y
attr_accessor :if_text_zoom_x
attr_accessor :if_text_zoom_y
attr_accessor :if_text_opa
attr_accessor :if_text
attr_accessor :if_text_time
attr_accessor :if_start
#--------------------------------------------------------------------------
# 初始化
#--------------------------------------------------------------------------
alias mog_if_initialize initialize
def initialize
mog_if_initialize
@if_hud1_x = 0
@if_hud1_y = 0
@if_hud1_opa = 0
@if_hud2_x = 0
@if_hud2_y = 0
@if_hud2_opa = 0
@if_hud3_x = 0
@if_hud3_y = 0
@if_hud3_opa = 0
@if_text_x = 0
@if_text_y = 0
@if_text_zoom_x = 1.00
@if_text_zoom_y = 1.00
@if_text_opa = 0
@if_text = ""
@if_text_time = 0
@if_start = false
end
end
#==============================================================================
# Game_Battler
#==============================================================================
module XAS_ACTION
#--------------------------------------------------------------------------
# 射击
#--------------------------------------------------------------------------
alias mog_actname_shoot shoot
def shoot(action_id)
mog_actname_shoot(action_id)
if action_id == nil or action_id == 0
return
end
item_id = XAS::ITEM_COST[action_id]
if self.battler.is_a?(Game_Actor) and
$data_skills[action_id].element_set.include?($data_system.elements.index("Name_ON"))
if item_id != nil and $game_party.item_number(item_id) == 0
$game_system.se_play($data_system.buzzer_se)
return
end
skill_sp_cost = $data_skills[action_id].sp_cost
if self.battler.sp >= skill_sp_cost and
$game_temp.cast_time == 0
$game_temp.if_text = $data_skills[action_id].name
$game_temp.if_text_time = 20 + Database_Bullet::DURATIONS[action_id]
$game_temp.if_start = true
end
end
end
end
#==============================================================================
# IFA
#==============================================================================
class Ifa < Sprite
include MOG
#--------------------------------------------------------------------------
# 初始化
#--------------------------------------------------------------------------
def initialize
@viewport = Viewport.new(0, 0, 640, 480)
@viewport.z = 9999
super(@viewport)
@hud1 = Sprite.new
@hud1.bitmap = RPG::Cache.windowskin("AF_Lay1")
@hud1.z = 9000
@hud1.ox = -IFA_HUD_X + $game_temp.if_hud1_x
@hud1.oy = -IFA_HUD_Y + $game_temp.if_hud1_y
@hud1.opacity = $game_temp.if_hud1_opa
@hud2 = Sprite.new
@hud2.bitmap = RPG::Cache.windowskin("AF_Lay2")
@hud2.z = 9000
@hud2.ox = -IFA_HUD_X - 50 + $game_temp.if_hud2_x
@hud2.oy = -IFA_HUD_Y - 20 + $game_temp.if_hud2_y
@hud2.opacity = $game_temp.if_hud2_opa
@hud3 = Sprite.new
@hud3.bitmap = RPG::Cache.windowskin("AF_Lay3")
@hud3.z = 9003
@hud3.ox = -IFA_HUD_X - 80 + $game_temp.if_hud3_x
@hud3.oy = -IFA_HUD_Y + 20 + $game_temp.if_hud3_y
@hud3.opacity = $game_temp.if_hud3_opa
@text = Sprite.new
@text.bitmap = Bitmap.new(120,40)
@text.z = 9002
@text.bitmap.font.name = "黑体"
@text.bitmap.font.size = 20
@text.bitmap.font.bold = true
@text.bitmap.font.italic = true
@text.bitmap.font.color.set(250, 250, 250,220)
@text.bitmap.draw_hemming_text(0, 0, 120, 40, $game_temp.if_text.to_s,1)
@text.ox = -IFA_HUD_X - 50 + $game_temp.if_text_x
@text.oy = -IFA_HUD_Y + 5 + $game_temp.if_text_y
@text.zoom_x = $game_temp.if_text_zoom_x
@text.zoom_y = $game_temp.if_text_zoom_y
@text.opacity = $game_temp.if_text_opa
end
#--------------------------------------------------------------------------
# 释放
#--------------------------------------------------------------------------
def dispose
@hud1.bitmap.dispose
@hud1.dispose
@hud1 = nil
@hud2.bitmap.dispose
@hud2.dispose
@hud2 = nil
@hud3.bitmap.dispose
@hud3.dispose
@hud3 = nil
@text.bitmap.dispose
@text.dispose
@text = nil
@viewport.dispose
@viewport = nil
end
#--------------------------------------------------------------------------
# 刷新
#--------------------------------------------------------------------------
def refresh
$game_temp.if_start = false
@text.bitmap.clear
$game_temp.if_hud1_opa = 100
$game_temp.if_hud2_opa = 100
$game_temp.if_hud3_opa = 100
$game_temp.if_text_opa = 100
$game_temp.if_hud1_x = 100
$game_temp.if_hud2_x = -100
$game_temp.if_text_zoom_x = 1.50
$game_temp.if_hud3_y = 0
@text.bitmap.draw_hemming_text(0, 0, 120, 40, $game_temp.if_text.to_s,1)
end
#--------------------------------------------------------------------------
# 移动动作显示窗口位置刷新
#--------------------------------------------------------------------------
def hud_pos_update
@hud1.ox = -IFA_HUD_X + $game_temp.if_hud1_x
@hud1.oy = -IFA_HUD_Y + $game_temp.if_hud1_y
@hud1.opacity = $game_temp.if_hud1_opa
@hud2.ox = -IFA_HUD_X - 50 + $game_temp.if_hud2_x
@hud2.oy = -IFA_HUD_Y - 20 + $game_temp.if_hud2_y
@hud2.opacity = $game_temp.if_hud2_opa
@hud3.ox = -IFA_HUD_X - 80 + $game_temp.if_hud3_x
@hud3.oy = -IFA_HUD_Y + 20 + $game_temp.if_hud3_y
@hud3.opacity = $game_temp.if_hud3_opa
@text.ox = -IFA_HUD_X - 50 + $game_temp.if_text_x
@text.oy = -IFA_HUD_Y + 5 + $game_temp.if_text_y
@text.zoom_x = $game_temp.if_text_zoom_x
@text.zoom_y = $game_temp.if_text_zoom_y
@text.opacity = $game_temp.if_text_opa
end
#--------------------------------------------------------------------------
# 滑动刷新
#--------------------------------------------------------------------------
def slide_update
$game_temp.if_text_time -= 1 if $game_temp.if_text_time > 0
if $game_temp.if_text_time > 0
if $game_temp.if_hud1_opa < 255
$game_temp.if_hud1_opa += 10
$game_temp.if_hud2_opa += 10
$game_temp.if_hud3_opa += 10
$game_temp.if_text_opa += 10
end
if $game_temp.if_hud1_x > 0
$game_temp.if_hud1_x -= 10
$game_temp.if_hud2_x += 10
elsif $game_temp.if_hud1_x < 0
$game_temp.if_hud1_x = 0
$game_temp.if_hud2_x = 0
end
if $game_temp.if_text_zoom_x > 1.00
$game_temp.if_text_zoom_x -= 0.1
elsif $game_temp.if_text_zoom_x < 1.00
$game_temp.if_text_zoom_x = 1.00
$game_temp.if_text_zoom_y = 1.00
$game_temp.if_text_x = 0
end
else
if $game_temp.if_hud1_opa > 0
$game_temp.if_hud1_opa -= 10
$game_temp.if_hud2_opa -= 10
$game_temp.if_hud3_opa -= 10
$game_temp.if_text_opa -= 10
end
if $game_temp.if_hud1_x < 100
$game_temp.if_hud1_x -= 10
$game_temp.if_hud2_x += 10
elsif $game_temp.if_hud1_x > 100
$game_temp.if_hud1_x = 100
$game_temp.if_hud2_x = 100
end
end
end
#--------------------------------------------------------------------------
# 刷新
#--------------------------------------------------------------------------
def update
hud_pos_update
slide_update
if $game_temp.if_start == true
refresh
end
end
end
#==============================================================================
# Scene_Map
#==============================================================================
class Scene_Map
#--------------------------------------------------------------------------
# Main
#--------------------------------------------------------------------------
alias mog_ifa_main main
def main
@ifa = Ifa.new
mog_ifa_main
@ifa.dispose
@ifa = nil
end
#--------------------------------------------------------------------------
# 刷新
#--------------------------------------------------------------------------
alias mog_ifa_update update
def update
mog_ifa_update
@ifa.update
end
end
$mog_rgss_xas_action_name = true
153行 @text.bitmap.draw_hemming_text(0, 0, 120, 40, $game_temp.if_text.to_s,1) 发生错误 |
|