RPG Creator : créez votre MMORPG ou RPG sans aucune connaissance en programmation


Disponible le 4 Juin !




- Jouez à votre jeu sur tablettes tactiles, Smartphones et navigateurs Web
- Personnalisez vos menus
- Dessinez facilement et rapidement vos cartes
- Créez des actions pour le combat A-RPG


www.rpgcreator.net


Heures au format UTC + 1 heure [ Heure d’été ]


Règles du forum


Consultez la liste des Scripts : cliquez ici



Publier un nouveau sujet Répondre au sujet  [ 7 messages ] 
Auteur Message
 Sujet du message: [Rmxp] "Menu 1 Héros" - Menu principal
MessagePublié: 09 Juil 2009, 18:59 
Ancien membre du staff
Ancien membre du staff
Avatar de l’utilisateur

Inscrit le: 24 Juin 2008, 00:00
Messages: 476
Logiciel(s) préféré(s): Scintilla based
Point(s) Fort(s): Rubyismes
Points d'aide: 60/60

Créations :

- [Rmxp] Vocab

- [Rmxp] Visible Equipment

- [Rmxp] Animated Title

- [XP/VX] Cache Extension


Voir ses créations

"Menu 1 Héros" - Menu principal


Ressources :
http://www.megaupload.com/?d=VE8S23ET

Scripts


Haut
 Profil  
 
 Sujet du message: Re: [Rmxp] "Menu 1 Héros" - Menu principal
MessagePublié: 09 Juil 2009, 19:04 
Ancien membre du staff
Ancien membre du staff
Avatar de l’utilisateur

Inscrit le: 24 Juin 2008, 00:00
Messages: 476
Logiciel(s) préféré(s): Scintilla based
Point(s) Fort(s): Rubyismes
Points d'aide: 60/60

Créations :

- [Rmxp] Vocab

- [Rmxp] Visible Equipment

- [Rmxp] Animated Title

- [XP/VX] Cache Extension


Voir ses créations

Scripts :

Menu_Selectable

Code: Tout sélectionner
#=================================================
# �Ą Menu_Selectable
#------------------------------------------------------------------------------
#
#=================================================

class Menu_Selectable < Window_Base
    #--------------------------------------------------------------------------
    #--------------------------------------------------------------------------
    attr_reader   :index                    # �J�[����Ę�u
    attr_reader   :help_window              # �w���v�E�B���h�E
    #--------------------------------------------------------------------------
    #--------------------------------------------------------------------------
    def initialize(x, y, width, height)
         super(x, y, width, height)
         @item_max = 1
         @column_max = 1
         @index = -1
    end
    #--------------------------------------------------------------------------
    #--------------------------------------------------------------------------
    def index=(index)
         @index = index
         # �w���v�e�L�X�g�đ�X�V (update_help �Í�p�ł�ć�Ĺ�č�`�ł�ę�é)
         if self.active and @help_window != nil
             update_help
         end
         # �J�[����Ě�é�`�đ�X�V
         update_cursor_rect
    end
    #--------------------------------------------------------------------------
    #--------------------------------------------------------------------------
    def row_max
         return (@item_max + @column_max - 1) / @column_max
    end
    #--------------------------------------------------------
    #--------------------------------------------------------------------------
    def top_row
         return self.oy / 32
    end
    #--------------------------------------------------------------------------
    #--------------------------------------------------------------------------
    def top_row=(row)
         # When a row is below 0, it is changed to 0.
         if row < 0
               row = 0
         end
         if row > row_max - 1
               row = row_max - 1
         end
         self.oy = row * 32
    end
    #--------------------------------------------------------------------------
    #--------------------------------------------------------------------------
    def page_row_max
         return (self.height - 32) / 32
    end
    #--------------------------------------------------------------------------
    #--------------------------------------------------------------------------
    def page_item_max
         return page_row_max * @column_max
    end
    #--------------------------------------------------------------------------
    #--------------------------------------------------------------------------
    def help_window=(help_window)
         @help_window = help_window
         if self.active and @help_window != nil
               update_help
         end
    end
    #--------------------------------------------------------------------------
    #--------------------------------------------------------------------------
    def update_cursor_rect
         if @index < 0
             self.cursor_rect.empty
             return
         end
         row = @index / @column_max
         if row < self.top_row
             self.top_row = row
         end
         if row > self.top_row + (self.page_row_max - 1)
             self.top_row = row - (self.page_row_max - 1)
         end
         cursor_width = self.width / @column_max - 32
         x = @index % @column_max * (cursor_width + 32)
         y = @index / @column_max * 100
       self.cursor_rect.set(y, x, 80, 80)
    end
    #--------------------------------------------------------------------------
    #--------------------------------------------------------------------------
    def update
         super
         if self.active and @item_max > 0 and @index >= 0
               if Input.repeat?(Input::RIGHT)
                       if (@column_max == 1 and Input.trigger?(Input::LEFT)) or
                                        @index < @item_max - @column_max
                            $game_system.se_play($data_system.cursor_se)
                           @index = (@index + @column_max) % @item_max
                       end
             end
             if Input.repeat?(Input::LEFT)
                       if (@column_max == 1 and Input.trigger?(Input::UP)) or
                                          @index >= @column_max
                             $game_system.se_play($data_system.cursor_se)
                             @index = (@index - @column_max + @item_max) % @item_max
                       end
             end
             if Input.repeat?(Input::RIGHT)
                       if @column_max >= 2 and @index < @item_max - 1
                             $game_system.se_play($data_system.cursor_se)
                             @index += 1
                       end
             end
             if Input.repeat?(Input::LEFT)
                       if @column_max >= 2 and @index > 0
                               $game_system.se_play($data_system.cursor_se)
                               @index -= 1
                       end
             end
             if Input.repeat?(Input::R)
                      if self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
                             $game_system.se_play($data_system.cursor_se)
                             @index = [@index + self.page_item_max, @item_max - 1].min
                             self.top_row += self.page_row_max
                     end
             end
             if Input.repeat?(Input::L)
                      if self.top_row > 0
                             $game_system.se_play($data_system.cursor_se)
                             @index = [@index - self.page_item_max, 0].max
                              self.top_row -= self.page_row_max
                     end
           end
       end
       if self.active and @help_window != nil
             update_help
       end
       update_cursor_rect
    end
end


Haut
 Profil  
 
 Sujet du message: Re: [Rmxp] "Menu 1 Héros" - Menu principal
MessagePublié: 09 Juil 2009, 19:07 
Ancien membre du staff
Ancien membre du staff
Avatar de l’utilisateur

Inscrit le: 24 Juin 2008, 00:00
Messages: 476
Logiciel(s) préféré(s): Scintilla based
Point(s) Fort(s): Rubyismes
Points d'aide: 60/60

Créations :

- [Rmxp] Vocab

- [Rmxp] Visible Equipment

- [Rmxp] Animated Title

- [XP/VX] Cache Extension


Voir ses créations

Menu_Command

Code: Tout sélectionner
#=================================================
# �Ą Menu_Command
#------------------------------------------------------
# �@ For horizontal selection
#=================================================

class Menu_Command < Menu_Selectable

      #---------------------------------------------------
      # �� Object Initialization
      #     width    : Window Width
      #     commands : Command String Layout
      #---------------------------------------------------
      def initialize(width, commands)
           # The height of the window is calculated from the number of commands.
           super(0, 0, 700, 500)
           @item_max = commands.size
           @commands = commands
           self.contents = Bitmap.new(width - 32, @item_max * 32)
           self.contents.font.name = "Arial"
           self.contents.font.size = 24
           self.back_opacity = 0
           refresh
           self.index = 0
      end
      #---------------------------------------------------
      # �� Refresh
      #---------------------------------------------------
      def refresh
            self.contents.clear
            for i in 0...@item_max
                   draw_item(i, normal_color)
            end
      end
      #---------------------------------------------------
      # �� Item Drawing
      #     index : Item Number
      #     color : Item Color
      #---------------------------------------------------
      def draw_item(index, color)
            self.contents.font.color = color
            rect = Rect.new(100*index, 5, self.contents.width - 8, 32)
            self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
            self.contents.draw_text(rect, @commands[index])
      end
      #---------------------------------------------------
      # �� Disable Item
      #     index : Item Number
      #---------------------------------------------------
      def disable_item(index)
            draw_item(index, disabled_color)
      end
end


Haut
 Profil  
 
 Sujet du message: Re: [Rmxp] "Menu 1 Héros" - Menu principal
MessagePublié: 09 Juil 2009, 19:08 
Ancien membre du staff
Ancien membre du staff
Avatar de l’utilisateur

Inscrit le: 24 Juin 2008, 00:00
Messages: 476
Logiciel(s) préféré(s): Scintilla based
Point(s) Fort(s): Rubyismes
Points d'aide: 60/60

Créations :

- [Rmxp] Vocab

- [Rmxp] Visible Equipment

- [Rmxp] Animated Title

- [XP/VX] Cache Extension


Voir ses créations

Window_Gold

Code: Tout sélectionner
#===========================================
# ■ Window_Gold
#------------------------------------------------------
#  ゴールドを表示するウィンドウです。
#===========================================

class Window_Gold < Window_Base
    #---------------------------------------------------
    # ● オブジェクト初期化
    #---------------------------------------------------
    def initialize
        super(0, 0, 160, 96)
        self.contents = Bitmap.new(width - 32, height - 32)
        self.contents.font.name = $fontface
        self.contents.font.size = $fontsize
        refresh
    end
    #---------------------------------------------------
    # ● リフレッシュ
    #---------------------------------------------------
    def refresh
        self.contents.clear
        self.contents.font.color = Color.new(255,245,233,255)
        self.contents.draw_text(4, 0, 120, 32, "Cash")
        cx = contents.text_size($data_system.words.gold).width
        self.contents.draw_text(4, 0, 120-cx-2, 96, $game_party.gold.to_s, 2)
        self.contents.draw_text(124-cx, 0, cx, 96, $data_system.words.gold, 2)
    end
end


Haut
 Profil  
 
 Sujet du message: Re: [Rmxp] "Menu 1 Héros" - Menu principal
MessagePublié: 09 Juil 2009, 19:10 
Ancien membre du staff
Ancien membre du staff
Avatar de l’utilisateur

Inscrit le: 24 Juin 2008, 00:00
Messages: 476
Logiciel(s) préféré(s): Scintilla based
Point(s) Fort(s): Rubyismes
Points d'aide: 60/60

Créations :

- [Rmxp] Vocab

- [Rmxp] Visible Equipment

- [Rmxp] Animated Title

- [XP/VX] Cache Extension


Voir ses créations

Window_MenuStatus

Code: Tout sélectionner
#=========================================================
# ■ Window_MenuStatus
#------------------------------------------------------
#  メニュー画面でパーティメンバーのステータスを表示するウィンドウです。
#=========================================================

class Window_MenuStatus < Window_Selectable
      #------------------------------------------------
      # ● オブジェクト初期化
      #------------------------------------------------
      def initialize
            super(0, 0, 640, 480)
            self.contents = Bitmap.new(width - 32, height - 32)
            self.contents.font.name = $fontface
            self.contents.font.size = $fontsize
            refresh
            self.active = false
            self.index = -1
      end
      #------------------------------------------------
      # ● リフレッシュ
      #------------------------------------------------
      def refresh
            self.contents.clear
            @item_max = $game_party.actors.size
            for i in 0...$game_party.actors.size
                  x = 64
                  y = i * 116
                  actor = $game_party.actors[i]
                  draw_actor_name(actor, x, y)
                  draw_actor_barz(actor,100, 100, "horizontal", 150, 20, actor.hp,actor.maxhp, Color.new(73,22,14,255), Color.new(194,64,13,255))
                  draw_actor_barz(actor,100, 133, "horizontal", 150, 20, actor.sp,actor.maxsp, Color.new(22,14,73,255), Color.new(64,13,194,255))
                  draw_actor_level(actor, x, y + 32)
                  draw_actor_state(actor, x + 96, y)
                  draw_actor_exp(actor, x, y + 64)
                  draw_actor_hp(actor, x , y + 96)
                  draw_actor_sp(actor, x , y + 128)
            end
      end
      #------------------------------------------------
      # ● カーソルの矩形更新
      #------------------------------------------------
      def update_cursor_rect
            if @index < 0
                  self.cursor_rect.empty
            else
                  self.cursor_rect.set(0, @index * 116, self.width - 32,96)
            end
      end
      #------------------------------------------------
      def draw_actor_name(actor, x, y)
         self.contents.font.color = Color.new(101,54,36,255)
         self.contents.font.size=30
         self.contents.draw_text(x, y, 120, 32, actor.name)
      end
      #------------------------------------------------
      def draw_actor_level(actor, x, y)
         self.contents.font.size= 20
         self.contents.font.color = Color.new(101,54,36,255)
         self.contents.draw_text(x, y, 32, 32, "Lvl")
         self.contents.draw_text(x + 32, y, 24, 32, actor.level.to_s, 2)
      end
      #------------------------------------------------
      def draw_actor_state(actor, x, y, width = 120)
         text = make_battler_state_text(actor, width, true)
         self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color
          self.contents.font.color = Color.new(101,54,36,255)
          self.contents.draw_text(x, y, width, 32, text)
      end
      #------------------------------------------------
      def draw_actor_exp(actor, x, y)
          self.contents.font.size = 20
          self.contents.font.color = Color.new(101,54,36,255)
          self.contents.draw_text(x, y, 32, 32, "Exp")
          self.contents.draw_text(x + 24, y, 84, 32, actor.exp_s, 2)
          self.contents.draw_text(x + 108, y, 12, 32, "/", 1)
          self.contents.draw_text(x + 120, y, 84, 32, actor.next_exp_s)
      end
      #------------------------------------------------
      def draw_actor_hp(actor, x, y, width = 144)
          # 文字列 "HP" を描画
          self.contents.font.color = Color.new(101,54,36,255)
          self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
          # MaxHP を描画するスペースがあるか計算   
          if width - 32 >= 108
              hp_x = x + width - 108
              flag = true
          elsif width - 32 >= 48
              hp_x = x + width - 48
              flag = false
          end
          # HP を描画
          self.contents.font.color = actor.hp == 0 ? knockout_color :
      actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
          self.contents.font.color = Color.new(255,245,233,255)
          self.contents.draw_text(hp_x+20, y, 48, 32, actor.hp.to_s, 2)
          # MaxHP を描画
          if flag
              self.contents.font.color = Color.new(255,245,233,255)
              self.contents.draw_text(hp_x + 68, y, 12, 32, "/", 1)
              self.contents.draw_text(hp_x + 80, y, 48, 32, actor.maxhp.to_s)
          end
       end
      #------------------------------------------------
      def draw_actor_sp(actor, x, y, width = 144)
         # 文字列 "SP" を描画
         self.contents.font.color = Color.new(101,54,36,255)
         self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
         # MaxSP を描画するスペースがあるか計算
         if width - 32 >= 108
           sp_x = x + width - 108
           flag = true
         elsif width - 32 >= 48
           sp_x = x + width - 48
           flag = false
         end
         # SP を描画
         self.contents.font.color = actor.sp == 0 ? knockout_color :
      actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
        self.contents.font.color = Color.new(255,245,233,255)
        self.contents.draw_text(sp_x+20, y, 48, 32, actor.sp.to_s, 2)   
        # MaxSP を描画
        if flag
            self.contents.draw_text(sp_x + 68, y, 12, 32, "/", 1)
            self.contents.draw_text(sp_x + 80, y, 48, 32, actor.maxsp.to_s)
         end
      end
      #------------------------------------------------
end


Haut
 Profil  
 
 Sujet du message: Re: [Rmxp] "Menu 1 Héros" - Menu principal
MessagePublié: 09 Juil 2009, 19:11 
Ancien membre du staff
Ancien membre du staff
Avatar de l’utilisateur

Inscrit le: 24 Juin 2008, 00:00
Messages: 476
Logiciel(s) préféré(s): Scintilla based
Point(s) Fort(s): Rubyismes
Points d'aide: 60/60

Créations :

- [Rmxp] Vocab

- [Rmxp] Visible Equipment

- [Rmxp] Animated Title

- [XP/VX] Cache Extension


Voir ses créations

Gradient_Barz

Code: Tout sélectionner
#=====================================
#Gradient Bars with customizable lengths, thicknesses, types and Colors
#By AcedentProne
#=====================================
class Window_Base
 def draw_normal_barz(x, y, type, length, thick, e1, e2, c1 = Color.new(255,0,0,255), c2 = Color.new(0,0,0,255))
   if type == "horizontal"
     width = length
     height = thick
     self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(255, 255, 255, 255))
     self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0, 255))
     w = width * e1 / e2
     for i in 0..height
     r = c1.red + (c2.red - c1.red)   * (height -i)/height  + 0   * i/height
     g = c1.green + (c2.green - c1.green) * (height -i)/height  + 0 * i/height
     b = c1.blue + (c2.blue - c1.blue)  * (height -i)/height  + 0 * i/height
     a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height  + 255 * i/height
     self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a))
   end
 elsif type == "vertical"
   width = thick
   height = length
     self.contents.fill_rect(x-1, y - 1, width+3, height + 2, Color.new(255, 255, 255, 255))
     self.contents.fill_rect(x, y, width+1, height , Color.new(0, 0, 0, 255))
   h = height * e1 / e2
   for i in 0..width
     r = c1.red + (c2.red - c1.red)   * (width -i)/width  + 0   * i/width
     g = c1.green + (c2.green - c1.green) * (width -i)/width  + 0 * i/width
     b = c1.blue + (c2.blue - c1.blue)  * (width -i)/width  + 0 * i/width
     a = c1.alpha + (c2.alpha - c1.alpha)* (width -i)/width  + 255 * i/width
     self.contents.fill_rect(x+i, y, 1, h, Color.new(r, g, b, a))
   end
 end
end
def draw_actor_barz(actor,x, y, type, length, thick, e1, e2, c1 = Color.new(255,0,0,255), c2 = Color.new(0,0,0,255))
   if type == "horizontal"
     width = length
     height = thick
     self.contents.fill_rect(x-1, y - 1, width +2, height +3 , Color.new(255, 255, 255, 0))
     self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0, 255))
     w = width * e1 / e2
     for i in 0..height
     r = c1.red + (c2.red - c1.red)   * (height -i)/height  + 0   * i/height
     g = c1.green + (c2.green - c1.green) * (height -i)/height  + 0 * i/height
     b = c1.blue + (c2.blue - c1.blue)  * (height -i)/height  + 0 * i/height
     a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height  + 255 * i/height
     self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a))
   end
 elsif type == "vertical"
   width = thick
   height = length
     self.contents.fill_rect(x, y, width, height, Color.new(255, 255, 255, 255))
     self.contents.fill_rect(x, y, width+1, height , Color.new(0, 0, 0, 255))
   h = height * e1 / e2
   for i in 0..width
     r = c1.red + (c2.red - c1.red)   * (width -i)/width  + 0   * i/width
     g = c1.green + (c2.green - c1.green) * (width -i)/width  + 0 * i/width
     b = c1.blue + (c2.blue - c1.blue)  * (width -i)/width  + 0 * i/width
     a = c1.alpha + (c2.alpha - c1.alpha)* (width -i)/width  + 255 * i/width
     self.contents.fill_rect(x+i, y, 1, h, Color.new(r, g, b, a))
   end
 end
end
end


Haut
 Profil  
 
 Sujet du message: Re: [Rmxp] "Menu 1 Héros" - Menu principal
MessagePublié: 09 Juil 2009, 19:14 
Ancien membre du staff
Ancien membre du staff
Avatar de l’utilisateur

Inscrit le: 24 Juin 2008, 00:00
Messages: 476
Logiciel(s) préféré(s): Scintilla based
Point(s) Fort(s): Rubyismes
Points d'aide: 60/60

Créations :

- [Rmxp] Vocab

- [Rmxp] Visible Equipment

- [Rmxp] Animated Title

- [XP/VX] Cache Extension


Voir ses créations

Scene_Menu

Code: Tout sélectionner
#=====================================================
# ■ Scene_Menu
#---------------------------------------------------
#  メニュー画面の処理を行うクラスです。
#=====================================================

class Scene_Menu
  #-----------------------------------------------
  # ● オブジェクト初期化
  #     menu_index : コマンドのカーソル初期位置
  #-----------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #-----------------------------------------------
  # ● メイン処理
  #-----------------------------------------------
  def main
    @ico=Sprite.new
    @ico.bitmap=RPG::Cache.picture("item")
    @ico.x=28
    @ico.y=14
    @ico.z=9990
    @ico2=Sprite.new
    @ico2.bitmap=RPG::Cache.picture("skill")
    @ico2.x=128
    @ico2.y=14
    @ico2.z=9990
    @ico3=Sprite.new
    @ico3.bitmap=RPG::Cache.picture("equip")
    @ico3.x=228
    @ico3.y=14
    @ico3.z=9990
    @ico4=Sprite.new
    @ico4.bitmap=RPG::Cache.picture("status")
    @ico4.x=328
    @ico4.y=14
    @ico4.z=9990
    @ico5=Sprite.new
    @ico5.bitmap=RPG::Cache.picture("save")
    @ico5.x=428
    @ico5.y=14
    @ico5.z=9990
    @ico6=Sprite.new
    @ico6.bitmap=RPG::Cache.picture("exit")
    @ico6.x=528
    @ico6.y=14
    @ico6.z=9990
    @hero=Sprite.new
    @hero.bitmap=RPG::Cache.picture("hero")
    @hero.x=0
    @hero.y=0
    @hero.z=9990
    @back=Sprite.new
    @back.bitmap=RPG::Cache.picture("back")
    @back.x=0
    @back.y=0
    @back.z=0
    # コマンドウィンドウを作成
    s1 = " "
    s2 = " "
    s3 = " "
    s4 = " "
    s5 = " "
    s6 = " "
    @dummy_window = Window_Base.new(0, 0, 640, 100)
    @command_window = Menu_Command.new(640, [s1, s2, s3, s4, s5, s6,])
    @command_window.index = @menu_index
    @command_window.width = 700
    @command_window.height = 500
    @command_window.y = -5
    @command_window.x = 10
    @command_window.z=9999
    @command_window.opacity = 0
    @dummy_window.opacity = 0
    @dummy_window.back_opacity = 0
    # パーティ人数が 0 人の場合
    if $game_party.actors.size == 0
      # アイテム、スキル、装備、ステータスを無効化
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    # セーブ禁止の場合
    if $game_system.save_disabled
      # セーブを無効にする
      @command_window.disable_item(4)
    end
    # プレイ時間ウィンドウを作成
    @playtime_window = Window_PlayTime.new
    @playtime_window.x = 160
    @playtime_window.y = 400
    @playtime_window.opacity=0
    # 歩数ウィンドウを作成
    # ゴールドウィンドウを作成
    @gold_window = Window_Gold.new
    @gold_window.x = 0
    @gold_window.y = 400
    @gold_window.opacity=0
    # ステータスウィンドウを作成
    @status_window = Window_MenuStatus.new
    @status_window.x = 0
    @status_window.y = 125
    @status_window.opacity = 0
    # トランジション実行
    Graphics.transition
    # メインループ
    loop do
      # ゲーム画面を更新
      Graphics.update
      # 入力情報を更新
      Input.update
      # フレーム更新
      update
      # 画面が切り替わったらループを中断
      if $scene != self
        break
      end
    end
    # トランジション準備
    Graphics.freeze
    # ウィンドウを解放
    @back.dispose
    @hero.dispose
    @ico.dispose
    @ico2.dispose
    @ico3.dispose
    @ico4.dispose
    @ico5.dispose
    @ico6.dispose
    @dummy_window.dispose
    @command_window.dispose
    @playtime_window.dispose
    @gold_window.dispose
    @status_window.dispose
  end
  #-----------------------------------------------
  # ● フレーム更新
  #-----------------------------------------------
  def update
    # ウィンドウを更新
    @back.update
    @hero.update
    @ico.update
    @ico2.update
    @ico3.update
    @ico4.update
    @ico5.update
    @ico6.update
    @dummy_window.update
    @command_window.update
    @playtime_window.update
    @gold_window.update
    @status_window.update
    # コマンドウィンドウがアクティブの場合: update_command を呼ぶ
    if @command_window.active
      update_command
      return
    end
    # ステータスウィンドウがアクティブの場合: update_status を呼ぶ
    if @status_window.active
      update_status
      return
    end
  end
  #-----------------------------------------------
  # ● フレーム更新 (コマンドウィンドウがアクティブの場合)
  #-----------------------------------------------
  def update_command
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # マップ画面に切り替え
      $scene = Scene_Map.new
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # パーティ人数が 0 人で、セーブ、ゲーム終了以外のコマンドの場合
      if $game_party.actors.size == 0 and @command_window.index < 4
        # ブザー SE を演奏
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # コマンドウィンドウのカーソル位置で分岐
      case @command_window.index
      when 0  # アイテム
        # 決定  SE を演奏
        $game_system.se_play($data_system.decision_se)
        # アイテム画面に切り替え
        $scene = Scene_Item.new
      when 1  # スキル
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # ステータスウィンドウをアクティブにする
        $scene = Scene_Skill.new
      when 2  # 装備
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # ステータスウィンドウをアクティブにする
        $scene = Scene_Equip.new
      when 3  # ステータス
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # ステータスウィンドウをアクティブにする
        $scene = Scene_Status.new
      when 4  # セーブ
        # セーブ禁止の場合
        if $game_system.save_disabled
          # ブザー SE を演奏
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # セーブ画面に切り替え
        $scene = Scene_Save.new
      when 5  # ゲーム終了
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # ゲーム終了画面に切り替え
        $scene = Scene_End.new
      end
      return
    end
  end
  #-----------------------------------------------
  # ● フレーム更新 (ステータスウィンドウがアクティブの場合)
  #-----------------------------------------------
  def update_status
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # コマンドウィンドウをアクティブにする
      @command_window.active = true
      @status_window.active = false
      @status_window.index = -1
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # コマンドウィンドウのカーソル位置で分岐
      case @command_window.index
      when 1  # スキル
        # このアクターの行動制限が 2 以上の場合
        if $game_party.actors[@status_window.index].restriction >= 2
          # ブザー SE を演奏
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # スキル画面に切り替え
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # 装備
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # 装備画面に切り替え
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # ステータス
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # ステータス画面に切り替え
        $scene = Scene_Status.new(@status_window.index)
      end
      return
    end
  end
end


Haut
 Profil  
 
Afficher les messages depuis:  Trier par  
Publier un nouveau sujet Répondre au sujet  [ 7 messages ] 

Heures au format UTC + 1 heure [ Heure d’été ]


Qui est en ligne ?

Utilisateurs parcourant actuellement ce forum : Aucun utilisateur inscrit et 1 invité


Vous ne pouvez pas publier de nouveaux sujets dans ce forum
Vous ne pouvez pas répondre aux sujets dans ce forum
Vous ne pouvez pas éditer vos messages dans ce forum
Vous ne pouvez pas supprimer vos messages dans ce forum
Vous ne pouvez pas insérer de pièces jointes dans ce forum

Rechercher pour:
Sauter vers:  
cron
RPG Creative Forum version 5 ; Tous droits réservés
phpBB Group (Traduit par Xaphos)
Optimisé pour une résolution 1024*728