| 
 
| 赞 | 5 |  
| VIP | 620 |  
| 好人卡 | 38 |  
| 积分 | 70 |  
| 经验 | 125468 |  
| 最后登录 | 2015-7-27 |  
| 在线时间 | 1666 小时 |  
 Lv4.逐梦者 
	梦石0 星屑6950 在线时间1666 小时注册时间2008-10-29帖子6710 
 | 
| 利用地形标志简单的做了一个. 
  行走脚步声.rar
(207.07 KB, 下载次数: 1321) Game_Player 的 update
 里面的相关内容改成这样
 复制代码
      # 如果方向键被按下、主角就朝那个方向移动
      @step_count = 0 if @step_count.nil?
      if @step_count > 0
        @step_count -= 1
      end
      case Input.dir4
      when 2
        @old_x = self.x
        @old_y = self.y
        move_down
        if @old_x != self.x or @old_y != self.y
          case $game_map.terrain_tag(self.x, self.y)
          when 0
            Audio.se_play("Audio/SE/stonerun3")
          when 1
            Audio.se_play("Audio/SE/step02")
          when 2
            if @step_count == 0
              Audio.se_play("Audio/SE/inwater 2")
              @step_count = 4
            end
          end
        end
      when 4
        @old_x = self.x
        @old_y = self.y
        move_left
        if @old_x != self.x or @old_y != self.y
          case $game_map.terrain_tag(self.x, self.y)
          when 0
            Audio.se_play("Audio/SE/stonerun3")
          when 1
            Audio.se_play("Audio/SE/step02")
          when 2
            if @step_count == 0
              Audio.se_play("Audio/SE/inwater 2")
              @step_count = 4
            end
          end
        end
      when 6
        @old_x = self.x
        @old_y = self.y
        move_right
        if @old_x != self.x or @old_y != self.y
          case $game_map.terrain_tag(self.x, self.y)
          when 0
            Audio.se_play("Audio/SE/stonerun3")
          when 1
            Audio.se_play("Audio/SE/step02")
          when 2
            if @step_count == 0
              Audio.se_play("Audio/SE/inwater 2")
              @step_count = 4
            end
          end
        end
      when 8
        @old_x = self.x
        @old_y = self.y
        move_up
        if @old_x != self.x or @old_y != self.y
          case $game_map.terrain_tag(self.x, self.y)
          when 0
            Audio.se_play("Audio/SE/stonerun3")
          when 1
            Audio.se_play("Audio/SE/step02")
          when 2
            if @step_count == 0
              Audio.se_play("Audio/SE/inwater 2")
              @step_count = 4
            end
          end
        end
      end
    end
 | 
 评分
查看全部评分
 |