| 
 
| 赞 | 9 |  
| VIP | 1 |  
| 好人卡 | 6 |  
| 积分 | 205 |  
| 经验 | 289801 |  
| 最后登录 | 2025-6-10 |  
| 在线时间 | 94 小时 |  
 Lv5.捕梦者 御灵的宠物 
	梦石12 星屑8481 在线时间94 小时注册时间2006-12-11帖子3156 
 | 
| 替换默认的Arrow_Actor 那两个state?(2)我自己加的,你可以随便改~
 
 
 复制代码#==============================================================================
# ■ Arrow_Actor
#------------------------------------------------------------------------------
#  选择角色的箭头光标。本类继承 Arrow_Base 
# 类。
#==============================================================================
class Arrow_Actor < Arrow_Base
  #--------------------------------------------------------------------------
  # ● 获取光标指向的角色
  #--------------------------------------------------------------------------
  def actor
    return $game_party.actors[@index]
  end
  #--------------------------------------------------------------------------
  # ● 刷新画面
  #--------------------------------------------------------------------------
  def update
    super
    # 光标右
    if Input.repeat?(Input::RIGHT)
      $game_system.se_play($data_system.cursor_se)
      @index += 1
      @index %= $game_party.actors.size
      if $game_party.actors[@index]!= nil and $game_party.actors[@index].state?(2)
        @index += 1
        @index %= $game_party.actors.size
     end
    end
    # 光标左
    if Input.repeat?(Input::LEFT)
      $game_system.se_play($data_system.cursor_se)
      @index += $game_party.actors.size - 1
      @index %= $game_party.actors.size
      if $game_party.actors[@index]!= nil and $game_party.actors[@index].state?(2)
        @index  += $game_party.actors.size - 1
        @index %= $game_party.actors.size
      end
    end
    # 设置活动块坐标
    if self.actor != nil
      self.x = self.actor.screen_x
      self.y = self.actor.screen_y
    end
  end
  #--------------------------------------------------------------------------
  # ● 刷新帮助文本
  #--------------------------------------------------------------------------
  def update_help
    # 帮助窗口显示角色的状态
    @help_window.set_actor(self.actor)
  end
end
 另外,不是@index的问题……LZ等进一步学习类别的概念就明白了
 之前出错是因为没有考虑到角色循环的状态而已……
 | 
 |