| 赞 | 7  | 
 
| VIP | 866 | 
 
| 好人卡 | 185 | 
 
| 积分 | 32 | 
 
| 经验 | 130059 | 
 
| 最后登录 | 2025-4-20 | 
 
| 在线时间 | 3618 小时 | 
 
 
 
 
 
Lv3.寻梦者 双子人 
	- 梦石
 - 0 
 
        - 星屑
 - 3190 
 
        - 在线时间
 - 3618 小时
 
        - 注册时间
 - 2009-4-4
 
        - 帖子
 - 4154
 
 
  
 
 | 
	
这个用法的话,就是在你的行走图文件后面, 
比如说001-Fighter01有3帧,就把它的文件名改成001-Fighter01[3],有7帧就把文件名改成001-Fighter01[7] 
如果后面不加中括号的话,默认是4帧。- #==============================================================================
 
 - # 移動パターン増加 Ver 1.00
 
 - # 配布元・サポートURL
 
 - # By COGHWELL
 
 - # http://members.jcom.home.ne.jp/cogwheel/
 
 - #==============================================================================
 
 - # Translated by Calvin624 
 
 - # http://www.xasabs.wordpress.com
 
 - #===============================================================================
 
 - ###############################-DESCRIPTION-####################################
 
 - #===============================================================================
 
 - # To define the amount of frames an image has simply edit the image name
 
 - # as shown below:
 
 - # Example[X].png
 
 - #
 
 - # Where X is the amount of frames 
 
 - #==============================================================================
 
  
- #==============================================================================
 
 - # ■ Game_Character (分割定義 2)
 
 - #------------------------------------------------------------------------------
 
 - #  キャラクターを扱うクラスです。このクラスは Game_Player クラスと Game_Event
 
 - # クラスのスーパークラスとして使用されます。
 
 - #==============================================================================
 
  
- class Game_Character
 
 -   #--------------------------------------------------------------------------
 
 -   # ● フレーム更新
 
 -   #--------------------------------------------------------------------------
 
 -   def update
 
 -     # ジャンプ中、移動中、停止中で分岐
 
 -     if jumping?
 
 -       update_jump
 
 -     elsif moving?
 
 -       update_move
 
 -     else
 
 -       update_stop
 
 -     end
 
 -     # アニメカウントが最大値を超えた場合
 
 -     # ※最大値は、基本値 18 から移動速度 * 1 を引いた値
 
 -     # ファイル名に[n]が入っている場合、通常の(n-1)/4の速度でパターン更新
 
 -     if @character_name[/\[(\d+)\]/]
 
 -       @anime_count = 20 if @anime_count > 0 and @pattern == @original_pattern
 
 -       if @anime_count * ($1.to_i - 1) / 4 > 18 - @move_speed * 2
 
 -         # 停止時アニメが OFF かつ 停止中の場合
 
 -         if not @step_anime and @stop_count > 0
 
 -           # パターンをオリジナルに戻す
 
 -           @pattern = @original_pattern
 
 -         # 停止時アニメが ON または 移動中の場合
 
 -         else
 
 -           # パターンを更新
 
 -           @pattern = @pattern % ($1.to_i - 1) + 1
 
 -         end
 
 -         # アニメカウントをクリア
 
 -         @anime_count = 0
 
 -       end
 
 -     else
 
 -     # 通常キャラのパターン更新処理(デフォルトの処理をコピペしただけ)
 
 -       if @anime_count > 18 - @move_speed * 2
 
 -         # 停止時アニメが OFF かつ 停止中の場合
 
 -         if not @step_anime and @stop_count > 0
 
 -           # パターンをオリジナルに戻す
 
 -           @pattern = @original_pattern
 
 -         # 停止時アニメが ON または 移動中の場合
 
 -         else
 
 -           # パターンを更新
 
 -           @pattern = (@pattern + 1) % 4
 
 -         end
 
 -         # アニメカウントをクリア
 
 -         @anime_count = 0
 
 -       end
 
 -     end
 
 -     # ウェイト中の場合
 
 -     if @wait_count > 0
 
 -       # ウェイトカウントを減らす
 
 -       @wait_count -= 1
 
 -       return
 
 -     end
 
 -     # 移動ルート強制中の場合
 
 -     if @move_route_forcing
 
 -       # カスタム移動
 
 -       move_type_custom
 
 -       return
 
 -     end
 
 -     # イベント実行待機中またはロック状態の場合
 
 -     if @starting or lock?
 
 -       # 自律移動はしない
 
 -       return
 
 -     end
 
 -     # 停止カウントが一定の値 (移動頻度から算出) を超えた場合
 
 -     if @stop_count > (40 - @move_frequency * 2) * (6 - @move_frequency)
 
 -       # 移動タイプで分岐
 
 -       case @move_type
 
 -       when 1  # ランダム
 
 -         move_type_random
 
 -       when 2  # 近づく
 
 -         move_type_toward_player
 
 -       when 3  # カスタム
 
 -         move_type_custom
 
 -       end
 
 -     end
 
 -   end
 
 - end
 
  
- #==============================================================================
 
 - # ■ Sprite_Character
 
 - #------------------------------------------------------------------------------
 
 - #  キャラクター表示用のスプライトです。Game_Character クラスのインスタンスを
 
 - # 監視し、スプライトの状態を自動的に変化させます。
 
 - #==============================================================================
 
  
- class Sprite_Character < RPG::Sprite
 
 -   #--------------------------------------------------------------------------
 
 -   # ● フレーム更新
 
 -   #--------------------------------------------------------------------------
 
 -   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)
 
 -         # ファイル名に[n]が入っている場合、パターン数を横:n, 縦:4とみなす
 
 -         if @character.character_name[/\[(\d+)\]/]
 
 -           @cw = bitmap.width / $1.to_i
 
 -           @ch = bitmap.height / 4
 
 -         # ファイル名に[D]が入っていない場合、通常通り横:4, 縦:4とする
 
 -         else
 
 -           @cw = bitmap.width / 4
 
 -           @ch = bitmap.height / 4
 
 -         end
 
 -         self.ox = @cw / 2
 
 -         self.oy = @ch
 
 -       end
 
 -     end
 
 -     # 可視状態を設定
 
 -     self.visible = (not @character.transparent)
 
 -     # グラフィックがキャラクターの場合
 
 -     if @tile_id == 0
 
 -       # 転送元の矩形を設定
 
 -       sx = @character.pattern * @cw
 
 -       sy = (@character.direction - 2) / 2 * @ch
 
 -       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
 
 -   end
 
 - end
 
  
 
- # ついでにメニュー画面でパターンが多いグラフィックを使用した場合の表記変更
 
  
- #==============================================================================
 
 - # ■ Window_Base
 
 - #------------------------------------------------------------------------------
 
 - #  ゲーム中のすべてのウィンドウのスーパークラスです。
 
 - #==============================================================================
 
  
- class Window_Base < Window
 
 -   #--------------------------------------------------------------------------
 
 -   # ● グラフィックの描画
 
 -   #     actor : アクター
 
 -   #     x     : 描画先 X 座標
 
 -   #     y     : 描画先 Y 座標
 
 -   #--------------------------------------------------------------------------
 
 -   def draw_actor_graphic(actor, x, y)
 
 -     bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
 
 -     if actor.character_name[/\[(\d+)\]/]
 
 -       cw = bitmap.width / $1.to_i
 
 -       ch = bitmap.height / 4
 
 -     else
 
 -       cw = bitmap.width / 4
 
 -       ch = bitmap.height / 4
 
 -     end
 
 -     src_rect = Rect.new(0, 0, cw, ch)
 
 -     self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
 
 -   end
 
 - end
 
  
- #==============================================================================
 
 - # ■ Window_SaveFile
 
 - #------------------------------------------------------------------------------
 
 - #  セーブ画面およびロード画面で表示する、セーブファイルのウィンドウです。
 
 - #==============================================================================
 
  
- class Window_SaveFile < Window_Base
 
 -   #--------------------------------------------------------------------------
 
 -   # ● リフレッシュ
 
 -   #--------------------------------------------------------------------------
 
 -   def refresh
 
 -     self.contents.clear
 
 -     # ファイル番号を描画
 
 -     self.contents.font.color = normal_color
 
 -     name = "File #{@file_index + 1}"
 
 -     self.contents.draw_text(4, 0, 600, 32, name)
 
 -     @name_width = contents.text_size(name).width
 
 -     # セーブファイルが存在する場合
 
 -     if @file_exist
 
 -       # キャラクターを描画
 
 -       for i in [email protected]
 
 -         bitmap = RPG::Cache.character(@characters[i][0], @characters[i][1])
 
 -         if @characters[i][0][/\[(\d+)\]/]
 
 -           cw = bitmap.width / $1.to_i
 
 -           ch = bitmap.height / 4
 
 -         else
 
 -           cw = bitmap.width / 4
 
 -           ch = bitmap.height / 4
 
 -         end
 
 -         src_rect = Rect.new(0, 0, cw, ch)
 
 -         x = 300 - @characters.size * 32 + i * 64 - cw / 2
 
 -         self.contents.blt(x, 68 - ch, bitmap, src_rect)
 
 -       end
 
 -       # プレイ時間を描画
 
 -       hour = @total_sec / 60 / 60
 
 -       min = @total_sec / 60 % 60
 
 -       sec = @total_sec % 60
 
 -       time_string = sprintf("%02d:%02d:%02d", hour, min, sec)
 
 -       self.contents.font.color = normal_color
 
 -       self.contents.draw_text(4, 8, 600, 32, time_string, 2)
 
 -       # タイムスタンプを描画
 
 -       self.contents.font.color = normal_color
 
 -       time_string = @time_stamp.strftime("%Y/%m/%d %H:%M")
 
 -       self.contents.draw_text(4, 40, 600, 32, time_string, 2)
 
 -     end
 
 -   end
 
 - end
 
  
- #==============================================================================
 
 - # ■ Game_Player
 
 - #------------------------------------------------------------------------------
 
 - #  プレイヤーを扱うクラスです。イベントの起動判定や、マップのスクロールなどの
 
 - # 機能を持っています。このクラスのインスタンスは $game_player で参照されます。
 
 - #==============================================================================
 
  
- class Game_Player < Game_Character
 
 -   #--------------------------------------------------------------------------
 
 -   # ● アニメーションアップデート
 
 -   #--------------------------------------------------------------------------
 
 -   def anime_update
 
 -     # アニメカウントが最大値を超えた場合
 
 -     # ※最大値は、基本値 18 から移動速度 * 1 を引いた値
 
 -     # ファイル名に[n]が入っている場合、通常の(n-1)/4の速度でパターン更新
 
 -     if @character_name[/\[(\d+)\]/]
 
 -       @anime_count = 20 if @anime_count > 0 and @pattern == @original_pattern
 
 -       if @anime_count * ($1.to_i - 1) / 4 > 18 - @move_speed * 2
 
 -         # 停止時アニメが OFF かつ 停止中の場合
 
 -         if not @step_anime and @stop_count > 0
 
 -           # パターンをオリジナルに戻す
 
 -           @pattern = @original_pattern
 
 -         # 停止時アニメが ON または 移動中の場合
 
 -         else
 
 -           # パターンを更新
 
 -           @pattern = @pattern % ($1.to_i - 1) + 1
 
 -         end
 
 -         # アニメカウントをクリア
 
 -         @anime_count = 0
 
 -       end
 
 -     else
 
 -     # 通常キャラのパターン更新処理(デフォルトの処理をコピペしただけ)
 
 -       if @anime_count > 18 - @move_speed * 2
 
 -         # 停止時アニメが OFF かつ 停止中の場合
 
 -         if not @step_anime and @stop_count > 0
 
 -           # パターンをオリジナルに戻す
 
 -           @pattern = @original_pattern
 
 -         # 停止時アニメが ON または 移動中の場合
 
 -         else
 
 -           # パターンを更新
 
 -           @pattern = (@pattern + 1) % 4
 
 -         end
 
 -         # アニメカウントをクリア
 
 -         @anime_count = 0
 
 -       end
 
 -     end
 
 -   end
 
 - end
 
 
  复制代码 |   
 
评分
- 
查看全部评分
 
 
 
 
 
 |