赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 3 |
经验 | 0 |
最后登录 | 2020-12-24 |
在线时间 | 18 小时 |
Lv2.观梦者
- 梦石
- 0
- 星屑
- 261
- 在线时间
- 18 小时
- 注册时间
- 2018-12-20
- 帖子
- 8
|
class Game_Player < Game_Character
#--------------------------------------------------------------------------
# ● 更新遇敌
#--------------------------------------------------------------------------
def update_encounter
return if $TEST && Input.press?(:CTRL)
return if $game_party.encounter_none?
# return if in_airship?
return if @move_route_forcing
@encounter_count -= encounter_progress_value
end
#--------------------------------------------------------------------------
# ● 更新登上载具
#--------------------------------------------------------------------------
def update_vehicle_get_on
if [email protected]? && !moving?
@direction = vehicle.direction
@move_speed = vehicle.speed
@vehicle_getting_on = false
@transparent = true
# @through = true if in_airship? #登上飞艇事件是为路障
vehicle.get_on
end
end
#--------------------------------------------------------------------------
# ● 判定事件是否由接触启动(重叠)
#--------------------------------------------------------------------------
def check_touch_event
# return false if in_airship?
check_event_trigger_here([1,2])
$game_map.setup_starting_event
end
#--------------------------------------------------------------------------
# ● 判定事件是否由确认键启动
#--------------------------------------------------------------------------
def check_action_event
# return true if in_airship?
check_event_trigger_here([0])
return true if $game_map.setup_starting_event
check_event_trigger_there([0,1,2])
$game_map.setup_starting_event
end
#--------------------------------------------------------------------------
# ● 非移动中的处理
# last_moving : 此前是否正在移动
#--------------------------------------------------------------------------
def update_nonmoving(last_moving)
return if $game_map.interpreter.running?
if last_moving
$game_party.on_player_walk
return if check_touch_event
end
if movable? && Input.trigger?(:Z) #按键 D登上载具
return if get_on_off_vehicle
elsif movable? && Input.trigger?(:C)
return if check_action_event
end
update_encounter if last_moving
end
end |
|