搜索附件  
同能RPG制作大师 附件中心 同能RM技术讨论区 RPG Maker XP 讨论区 八方向行走图(不影响4方): 125.rar

八方向行走图(不影响4方): 125.rar

 

八方向行走图(不影响4方):
其实不是什么特别好的东西,只是见到RM大师天干宝典中的八方行走图,连4方行走图都要拉长,很不方便,于是......
素材在XAS里弄得,找不到XAS的八方脚本,只好自己改......

脚本■ Game_Character3
  1. #==============================================================================# ■ Game_Character (分割定义 3)#------------------------------------------------------------------------------#  处理角色的类。本类作为 Game_Player 类与 Game_Event# 类的超级类使用。#==============================================================================class Game_Character  #--------------------------------------------------------------------------  # ● 向下移动  #     turn_enabled : 本场地位置更改许可标志  #--------------------------------------------------------------------------  def move_down(turn_enabled = true)    # 面向下    if turn_enabled      turn_down    end    unless @direction_fix      # 朝向是右的情况下适合的面是左面、朝向是上的情况下适合的面是下面  ###########################################################################      @direction = 2  ###########################################################################    end    # 可以通行的场合    if passable?(@x, @y, 2)      # 面向下      turn_down      # 更新坐标      @y += 1      # 增加步数      increase_steps    # 不能通行的情况下    else      # 接触事件的启动判定      check_event_trigger_touch(@x, @y+1)    end  end  #--------------------------------------------------------------------------  # ● 向左移动  #     turn_enabled : 本场地位置更改许可标志  #--------------------------------------------------------------------------  def move_left(turn_enabled = true)    # 面向左    if turn_enabled      turn_left    end    unless @direction_fix      # 朝向是右的情况下适合的面是左面、朝向是上的情况下适合的面是下面  ###########################################################################      @direction = 4  ###########################################################################    end    # 可以通行的情况下    if passable?(@x, @y, 4)      # 面向左      turn_left      # 更新坐标      @x -= 1      # 增加步数      increase_steps    # 不能通行的情况下    else      # 接触事件的启动判定      check_event_trigger_touch(@x-1, @y)    end  end  #--------------------------------------------------------------------------  # ● 向右移动  #     turn_enabled : 本场地位置更改许可标志  #--------------------------------------------------------------------------  def move_right(turn_enabled = true)    # 面向右    if turn_enabled      turn_right    end    unless @direction_fix      # 朝向是右的情况下适合的面是左面、朝向是上的情况下适合的面是下面  ###########################################################################      @direction = 6  ###########################################################################    end    # 可以通行的场合    if passable?(@x, @y, 6)      # 面向右      turn_right      # 更新坐标      @x += 1      # 增加部数      increase_steps    # 不能通行的情况下    else      # 接触事件的启动判定      check_event_trigger_touch(@x+1, @y)    end  end  #--------------------------------------------------------------------------  # ● 向上移动  #     turn_enabled : 本场地位置更改许可标志  #--------------------------------------------------------------------------  def move_up(turn_enabled = true)    # 面向上    if turn_enabled      turn_up    end    unless @direction_fix      # 朝向是右的情况下适合的面是左面、朝向是上的情况下适合的面是下面  ###########################################################################      @direction = 8  ###########################################################################    end    # 可以通行的情况下    if passable?(@x, @y, 8)      # 面向上      turn_up      # 更新坐标      @y -= 1      # 歩数増加      increase_steps    # 不能通行的情况下    else      # 接触事件的启动判定      check_event_trigger_touch(@x, @y-1)    end  end  #--------------------------------------------------------------------------  # ● 向左下移动  #--------------------------------------------------------------------------  def move_lower_left    # 没有固定面向的场合    unless @direction_fix      # 朝向是右的情况下适合的面是左面、朝向是上的情况下适合的面是下面  ###########################################################################      @direction = 1  ###########################################################################    end    # 下→左、左→下 的通道可以通行的情况下    if (passable?(@x, @y, 2) and passable?(@x, @y + 1, 4)) or       (passable?(@x, @y, 4) and passable?(@x - 1, @y, 2))      # 更新坐标      @x -= 1      @y += 1      # 增加步数      increase_steps    end  end  #--------------------------------------------------------------------------  # ● 向右下移动  #--------------------------------------------------------------------------  def move_lower_right    # 没有固定面向的场合    unless @direction_fix      # 朝向是右的情况下适合的面是左面、朝向是上的情况下适合的面是下面  ###########################################################################      @direction = 3  ###########################################################################    end    # 下→右、右→下 的通道可以通行的情况下    if (passable?(@x, @y, 2) and passable?(@x, @y + 1, 6)) or       (passable?(@x, @y, 6) and passable?(@x + 1, @y, 2))      # 更新坐标      @x += 1      @y += 1      # 增加步数      increase_steps    end  end  #--------------------------------------------------------------------------  # ● 向左上移动  #--------------------------------------------------------------------------  def move_upper_left    # 没有固定面向的场合    unless @direction_fix      # 朝向是右的情况下适合的面是左面、朝向是上的情况下适合的面是下面  ###########################################################################      @direction = 7  ###########################################################################    end    # 上→左、左→上 的通道可以通行的情况下    if (passable?(@x, @y, 8) and passable?(@x, @y - 1, 4)) or       (passable?(@x, @y, 4) and passable?(@x - 1, @y, 8))      # 更新坐标      @x -= 1      @y -= 1      # 增加步数      increase_steps    end  end  #--------------------------------------------------------------------------  # ● 向右上移动  #--------------------------------------------------------------------------  def move_upper_right    # 没有固定面向的场合    unless @direction_fix      # 朝向是右的情况下适合的面是左面、朝向是上的情况下适合的面是下面  ###########################################################################      @direction = 9  ###########################################################################    end    # 上→右、右→上 的通道可以通行的情况下    if (passable?(@x, @y, 8) and passable?(@x, @y - 1, 6)) or       (passable?(@x, @y, 6) and passable?(@x + 1, @y, 8))      # 更新坐标      @x += 1      @y -= 1      # 增加步数      increase_steps    end  end  #--------------------------------------------------------------------------  # ● 随机移动  #--------------------------------------------------------------------------  def move_random    case rand(4)    when 0  # 向下移动      move_down(false)    when 1  # 向左移动      move_left(false)    when 2  # 向右移动      move_right(false)    when 3  # 向上移动      move_up(false)    end  end  #--------------------------------------------------------------------------  # ● 接近主角  #--------------------------------------------------------------------------  def move_toward_player    # 求得与主角的坐标差    sx = @x - $game_player.x    sy = @y - $game_player.y    # 坐标相等情况下    if sx == 0 and sy == 0      return    end    # 求得差的绝对值    abs_sx = sx.abs    abs_sy = sy.abs    # 横距离与纵距离相等的情况下    if abs_sx == abs_sy      # 随机将边数增加 1      rand(2) == 0 ? abs_sx += 1 : abs_sy += 1    end    # 横侧距离长的情况下    if abs_sx > abs_sy      # 左右方向优先。向主角移动      sx > 0 ? move_left : move_right      if not moving? and sy != 0        sy > 0 ? move_up : move_down      end    # 竖侧距离长的情况下    else      # 上下方向优先。向主角移动      sy > 0 ? move_up : move_down      if not moving? and sx != 0        sx > 0 ? move_left : move_right      end    end  end  #--------------------------------------------------------------------------  # ● 远离主角  #--------------------------------------------------------------------------  def move_away_from_player    # 求得与主角的坐标差    sx = @x - $game_player.x    sy = @y - $game_player.y    # 坐标相等情况下    if sx == 0 and sy == 0      return    end    # 求得差的绝对值    abs_sx = sx.abs    abs_sy = sy.abs    # 横距离与纵距离相等的情况下    if abs_sx == abs_sy      # 随机将边数增加 1      rand(2) == 0 ? abs_sx += 1 : abs_sy += 1    end    # 横侧距离长的情况下    if abs_sx > abs_sy      # 左右方向优先。远离主角移动      sx > 0 ? move_right : move_left      if not moving? and sy != 0        sy > 0 ? move_down : move_up      end    # 竖侧距离长的情况下    else      # 上下方向优先。远离主角移动      sy > 0 ? move_down : move_up      if not moving? and sx != 0        sx > 0 ? move_right : move_left      end    end  end  #--------------------------------------------------------------------------  # ● 前进一步  #--------------------------------------------------------------------------  def move_forward    case @direction    when 2      move_down(false)    when 4      move_left(false)    when 6      move_right(false)    when 8      move_up(false)    end  end  #--------------------------------------------------------------------------  # ● 后退一步  #--------------------------------------------------------------------------  def move_backward    # 记忆朝向固定信息    last_direction_fix = @direction_fix    # 强制固定朝向    @direction_fix = true    # 朝向分支    case @direction    when 2  # 下      move_up(false)    when 4  # 左      move_right(false)    when 6  # 右      move_left(false)    when 8  # 上      move_down(false)    end    # 还原朝向固定信息    @direction_fix = last_direction_fix  end  #--------------------------------------------------------------------------  # ● 跳跃  #     x_plus : X 坐标增加值  #     y_plus : Y 坐标增加值  #--------------------------------------------------------------------------  def jump(x_plus, y_plus)    # 增加值不是 (0,0) 的情况下    if x_plus != 0 or y_plus != 0      # 横侧距离长的情况下      if x_plus.abs > y_plus.abs        # 变更左右方向        x_plus < 0 ? turn_left : turn_right      # 竖侧距离长的情况下      else        # 变更上下方向        y_plus < 0 ? turn_up : turn_down      end    end    # 计算新的坐标    new_x = @x + x_plus    new_y = @y + y_plus    # 增加值为 (0,0) 的情况下、跳跃目标可以通行的场合    if (x_plus == 0 and y_plus == 0) or passable?(new_x, new_y, 0)      # 矫正姿势      straighten      # 更新坐标      @x = new_x      @y = new_y      # 距计算距离      distance = Math.sqrt(x_plus * x_plus + y_plus * y_plus).round      # 设置跳跃记数      @jump_peak = 10 + distance - @move_speed      @jump_count = @jump_peak * 2      # 清除停止记数信息      @stop_count = 0    end  end  #--------------------------------------------------------------------------  # ● 面向向下  #--------------------------------------------------------------------------  def turn_down    unless @direction_fix      @direction = 2      @stop_count = 0    end  end  #--------------------------------------------------------------------------  # ● 面向向左  #--------------------------------------------------------------------------  def turn_left    unless @direction_fix      @direction = 4      @stop_count = 0    end  end  #--------------------------------------------------------------------------  # ● 面向向右  #--------------------------------------------------------------------------  def turn_right    unless @direction_fix      @direction = 6      @stop_count = 0    end  end  #--------------------------------------------------------------------------  # ● 面向向上  #--------------------------------------------------------------------------  def turn_up    unless @direction_fix      @direction = 8      @stop_count = 0    end  end  #--------------------------------------------------------------------------  # ● 向右旋转 90 度  #--------------------------------------------------------------------------  def turn_right_90    case @direction    when 2      turn_left    when 4      turn_up    when 6      turn_down    when 8      turn_right    end  end  #--------------------------------------------------------------------------  # ● 向左旋转 90 度  #--------------------------------------------------------------------------  def turn_left_90    case @direction    when 2      turn_right    when 4      turn_down    when 6      turn_up    when 8      turn_left    end  end  #--------------------------------------------------------------------------  # ● 旋转 180 度  #--------------------------------------------------------------------------  def turn_180    case @direction    when 2      turn_up    when 4      turn_right    when 6      turn_left    when 8      turn_down    end  end  #--------------------------------------------------------------------------  # ● 从右向左旋转 90 度  #--------------------------------------------------------------------------  def turn_right_or_left_90    if rand(2) == 0      turn_right_90    else      turn_left_90    end  end  #--------------------------------------------------------------------------  # ● 随机变换方向  #--------------------------------------------------------------------------  def turn_random    case rand(4)    when 0      turn_up    when 1      turn_right    when 2      turn_left    when 3      turn_down    end  end  #--------------------------------------------------------------------------  # ● 接近主角的方向  #--------------------------------------------------------------------------  def turn_toward_player    # 求得与主角的坐标差    sx = @x - $game_player.x    sy = @y - $game_player.y    # 坐标相等的场合下    if sx == 0 and sy == 0      return    end    # 横侧距离长的情况下    if sx.abs > sy.abs      # 将左右方向变更为朝向主角的方向      sx > 0 ? turn_left : turn_right    # 竖侧距离长的情况下    else      # 将上下方向变更为朝向主角的方向      sy > 0 ? turn_up : turn_down    end  end  #--------------------------------------------------------------------------  # ● 背向主角的方向  #--------------------------------------------------------------------------  def turn_away_from_player    # 求得与主角的坐标差    sx = @x - $game_player.x    sy = @y - $game_player.y    # 坐标相等的场合下    if sx == 0 and sy == 0      return    end    # 横侧距离长的情况下    if sx.abs > sy.abs      # 将左右方向变更为背离主角的方向      sx > 0 ? turn_right : turn_left    # 竖侧距离长的情况下    else      # 将上下方向变更为背离主角的方向      sy > 0 ? turn_down : turn_up    end  endend复制代码
复制代码
■ Game_Player
  1. #==============================================================================# ■ Game_Player#------------------------------------------------------------------------------#  处理主角的类。事件启动的判定、以及地图的滚动等功能。# 本类的实例请参考 $game_player。#==============================================================================class Game_Player < Game_Character  #--------------------------------------------------------------------------  # ● 恒量  #--------------------------------------------------------------------------  CENTER_X = (320 - 16) * 4   # 画面中央的 X 坐标 * 4  CENTER_Y = (240 - 16) * 4   # 画面中央的 Y 坐标 * 4  #--------------------------------------------------------------------------  # ● 可以通行判定  #     x : X 坐标  #     y : Y 坐标  #     d : 方向 (0,2,4,6,8)  ※ 0 = 全方向不能通行的情况判定 (跳跃用)  #--------------------------------------------------------------------------  def passable?(x, y, d)    # 求得新的坐标    new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0)    new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0)    # 坐标在地图外的情况下    unless $game_map.valid?(new_x, new_y)      # 不能通行      return false    end    # 调试模式为 ON 并且 按下 CTRL 键的情况下    if $DEBUG and Input.press?(Input::CTRL)      # 可以通行      return true    end    super  end  #--------------------------------------------------------------------------  # ● 像通到画面中央一样的设置地图的显示位置  #--------------------------------------------------------------------------  def center(x, y)    max_x = ($game_map.width - 20) * 128    max_y = ($game_map.height - 15) * 128    $game_map.display_x = [0, [x * 128 - CENTER_X, max_x].min].max    $game_map.display_y = [0, [y * 128 - CENTER_Y, max_y].min].max  end  #--------------------------------------------------------------------------  # ● 向指定的位置移动  #     x : X 座標  #     y : Y 座標  #--------------------------------------------------------------------------  def moveto(x, y)    super    # 自连接    center(x, y)    # 生成遇敌计数    make_encounter_count  end  #--------------------------------------------------------------------------  # ● 增加步数  #--------------------------------------------------------------------------  def increase_steps    super    # 不是强制移动路线的场合    unless @move_route_forcing      # 增加步数      $game_party.increase_steps      # 步数是偶数的情况下      if $game_party.steps % 2 == 0        # 检查连续伤害        $game_party.check_map_slip_damage      end    end  end  #--------------------------------------------------------------------------  # ● 获取遇敌计数  #--------------------------------------------------------------------------  def encounter_count    return @encounter_count  end  #--------------------------------------------------------------------------  # ● 生成遇敌计数  #--------------------------------------------------------------------------  def make_encounter_count    # 两种颜色震动的图像    if $game_map.map_id != 0      n = $game_map.encounter_step      @encounter_count = rand(n) + rand(n) + 1    end  end  #--------------------------------------------------------------------------  # ● 刷新  #--------------------------------------------------------------------------  def refresh    # 同伴人数为 0 的情况下    if $game_party.actors.size == 0      # 清除角色的文件名及对像      @character_name = ""      @character_hue = 0      # 分支结束      return    end    # 获取带头的角色    actor = $game_party.actors[0]    # 设置角色的文件名及对像    @character_name = actor.character_name    @character_hue = actor.character_hue    # 初始化不透明度和合成方式子    @opacity = 255    @blend_type = 0  end  #--------------------------------------------------------------------------  # ● 同位置的事件启动判定  #--------------------------------------------------------------------------  def check_event_trigger_here(triggers)    result = false    # 事件执行中的情况下    if $game_system.map_interpreter.running?      return result    end    # 全部事件的循环    for event in $game_map.events.values      # 事件坐标与目标一致的情况下      if event.x == @x and event.y == @y and triggers.include?(event.trigger)        # 跳跃中以外的情况下、启动判定是同位置的事件        if not event.jumping? and event.over_trigger?          event.start          result = true        end      end    end    return result  end  #--------------------------------------------------------------------------  # ● 正面事件的启动判定  #--------------------------------------------------------------------------  def check_event_trigger_there(triggers)    result = false    # 事件执行中的情况下    if $game_system.map_interpreter.running?      return result    end    # 计算正面坐标    new_x = @x + (@direction == 6 ? 1 : @direction == 4 ? -1 : 0)    new_y = @y + (@direction == 2 ? 1 : @direction == 8 ? -1 : 0)    # 全部事件的循环    for event in $game_map.events.values      # 事件坐标与目标一致的情况下      if event.x == new_x and event.y == new_y and         triggers.include?(event.trigger)        # 跳跃中以外的情况下、启动判定是正面的事件        if not event.jumping? and not event.over_trigger?          event.start          result = true        end      end    end    # 找不到符合条件的事件的情况下    if result == false      # 正面的元件是计数器的情况下      if $game_map.counter?(new_x, new_y)        # 计算 1 元件里侧的坐标        new_x += (@direction == 6 ? 1 : @direction == 4 ? -1 : 0)        new_y += (@direction == 2 ? 1 : @direction == 8 ? -1 : 0)        # 全事件的循环        for event in $game_map.events.values          # 事件坐标与目标一致的情况下          if event.x == new_x and event.y == new_y and             triggers.include?(event.trigger)            # 跳跃中以外的情况下、启动判定是正面的事件            if not event.jumping? and not event.over_trigger?              event.start              result = true            end          end        end      end    end    return result  end  #--------------------------------------------------------------------------  # ● 接触事件启动判定  #--------------------------------------------------------------------------  def check_event_trigger_touch(x, y)    result = false    # 事件执行中的情况下    if $game_system.map_interpreter.running?      return result    end    # 全事件的循环    for event in $game_map.events.values      # 事件坐标与目标一致的情况下      if event.x == x and event.y == y and [1,2].include?(event.trigger)        # 跳跃中以外的情况下、启动判定是正面的事件        if not event.jumping? and not event.over_trigger?          event.start          result = true        end      end    end    return result  end  #--------------------------------------------------------------------------  # ● 画面更新  #--------------------------------------------------------------------------  def update    # 本地变量记录移动信息    last_moving = moving?    # 移动中、事件执行中、强制移动路线中、    # 信息窗口一个也不显示的时候    unless moving? or $game_system.map_interpreter.running? or           @move_route_forcing or $game_temp.message_window_showing      # 如果方向键被按下、主角就朝那个方向移动  ###########################################################################      case Input.dir8      when 2        move_down      when 4        move_left      when 6        move_right      when 8        move_up      when 1        move_lower_left      when 3        move_lower_right      when 7        move_upper_left      when 9        move_upper_right      end  ###########################################################################    end    # 本地变量记忆坐标    last_real_x = @real_x    last_real_y = @real_y    super    # 角色向下移动、画面上的位置在中央下方的情况下    if @real_y > last_real_y and @real_y - $game_map.display_y > CENTER_Y      # 画面向下卷动      $game_map.scroll_down(@real_y - last_real_y)    end    # 角色向左移动、画面上的位置在中央左方的情况下    if @real_x < last_real_x and @real_x - $game_map.display_x < CENTER_X      # 画面向左卷动      $game_map.scroll_left(last_real_x - @real_x)    end    # 角色向右移动、画面上的位置在中央右方的情况下    if @real_x > last_real_x and @real_x - $game_map.display_x > CENTER_X      # 画面向右卷动      $game_map.scroll_right(@real_x - last_real_x)    end    # 角色向上移动、画面上的位置在中央上方的情况下    if @real_y < last_real_y and @real_y - $game_map.display_y < CENTER_Y      # 画面向上卷动      $game_map.scroll_up(last_real_y - @real_y)    end    # 不在移动中的情况下    unless moving?      # 上次主角移动中的情况      if last_moving        # 与同位置的事件接触就判定为事件启动        result = check_event_trigger_here([1,2])        # 没有可以启动的事件的情况下        if result == false          # 调试模式为 ON 并且按下 CTRL 键的情况下除外          unless $DEBUG and Input.press?(Input::CTRL)            # 遇敌计数下降            if @encounter_count > 0              @encounter_count -= 1            end          end        end      end      # 按下 C 键的情况下      if Input.trigger?(Input::C)        # 判定为同位置以及正面的事件启动        check_event_trigger_here([0])        check_event_trigger_there([0,1,2])      end    end  endend复制代码
复制代码
■ Sprite_Character
  1. #==============================================================================# ■ Sprite_Character#------------------------------------------------------------------------------#  角色显示用脚本。监视 Game_Character 类的实例、# 自动变化脚本状态。#==============================================================================class Sprite_Character < RPG::Sprite  #--------------------------------------------------------------------------  # ● 定义实例变量  #--------------------------------------------------------------------------  attr_accessor :character                # 角色  #--------------------------------------------------------------------------  # ● 初始化对像  #     viewport  : 查看端口  #     character : 角色 (Game_Character)  #--------------------------------------------------------------------------  def initialize(viewport, character = nil)    super(viewport)    @character = character    update  end  #--------------------------------------------------------------------------  # ● 更新画面  #--------------------------------------------------------------------------  def update    super    # 元件 ID、文件名、色相与现在的情况存在差异的情况下    if @tile_id != @character.tile_id or       @character_name != @character.character_name or       @character_hue != @character.character_hue      # 记忆元件 ID 与文件名、色相      @tile_id = @character.tile_id      @character_name = @character.character_name      @character_hue = @character.character_hue      # 元件 ID 为有效值的情况下      if @tile_id >= 384        self.bitmap = RPG::Cache.tile($game_map.tileset_name,          @tile_id, @character.character_hue)        self.src_rect.set(0, 0, 32, 32)        self.ox = 16        self.oy = 32      # 元件 ID 为无效值的情况下      else        self.bitmap = RPG::Cache.character(@character.character_name,          @character.character_hue)        @cw = bitmap.width / 4  ###########################################################################        @ch = bitmap.height / 4  ###########################################################################        self.ox = @cw / 2        self.oy = @ch      end    end    # 设置可视状态    self.visible = (not @character.transparent)    # 图形是角色的情况下    if @tile_id == 0      # 设置传送目标的矩形      sx = @character.pattern * @cw  ###########################################################################      case @character.direction      when 2        self.bitmap = RPG::Cache.character(@character.character_name,          @character.character_hue)          @cw = bitmap.width / 4        @ch = bitmap.height / 4        sy = 0 * @ch      when 4        self.bitmap = RPG::Cache.character(@character.character_name,          @character.character_hue)          @cw = bitmap.width / 4        @ch = bitmap.height / 4        sy = 1 * @ch      when 6        self.bitmap = RPG::Cache.character(@character.character_name,          @character.character_hue)          @cw = bitmap.width / 4        @ch = bitmap.height / 4        sy = 2 * @ch      when 8        self.bitmap = RPG::Cache.character(@character.character_name,          @character.character_hue)          @cw = bitmap.width / 4        @ch = bitmap.height / 4        sy = 3 * @ch      when 1        self.bitmap = RPG::Cache.character(@character.character_name + "_quarter.png",          @character.character_hue)          @cw = bitmap.width / 4        @ch = bitmap.height / 4        sy = 0 * @ch      when 3        self.bitmap = RPG::Cache.character(@character.character_name + "_quarter.png",          @character.character_hue)          @cw = bitmap.width / 4        @ch = bitmap.height / 4        sy = 2 * @ch              when 7        self.bitmap = RPG::Cache.character(@character.character_name + "_quarter.png",          @character.character_hue)          @cw = bitmap.width / 4        @ch = bitmap.height / 4        sy = 1 * @ch      when 9        self.bitmap = RPG::Cache.character(@character.character_name + "_quarter.png",          @character.character_hue)          @cw = bitmap.width / 4        @ch = bitmap.height / 4        sy = 3 * @ch      end      self.src_rect.set(sx, sy, @cw, @ch)  ###########################################################################    end    # 设置脚本的坐标    self.x = @character.screen_x    self.y = @character.screen_y    self.z = @character.screen_z(@ch)    # 设置不透明度、合成方式、茂密    self.opacity = @character.opacity    self.blend_type = @character.blend_type    self.bush_depth = @character.bush_depth    # 动画    if @character.animation_id != 0      animation = $data_animations[@character.animation_id]      animation(animation, true)      @character.animation_id = 0    end  endend复制代码
复制代码
工程
新手弄的,不知道有没有问题
             本帖来自P1论坛作者竹轩轩,因Project1站服务器在国外有时候访问缓慢不方便作者交流学习,经联系P1站长fux2同意署名转载一起分享游戏制作经验,共同为国内独立游戏作者共同创造良好交流环境,原文地址:https://rpg.blue/forum.php?mod=viewthread&tid=215646  若有侵权,发帖作者可联系底部站长QQ在线咨询功能删除,谢谢。
         同一主题附件:
    d1.jpg
    125.rar (236.66 KB)

QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

GMT+8, 2024-9-21 19:52 , Processed in 0.039439 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

返回顶部