设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1418|回复: 3
打印 上一主题 下一主题

[已经过期] 飞船怎么触发事件?还有怎么遇敌?

[复制链接]

Lv2.观梦者

梦石
0
星屑
261
在线时间
18 小时
注册时间
2018-12-20
帖子
8
1
发表于 2018-12-21 20:38:53 | 显示全部楼层
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

点评

大神 飞行器能单独遇敌吗? 这样子设定 陆地上的怪也能打到  发表于 2018-12-22 11:57
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-5-14 08:36

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表