Войти на сайт

Авторизация, ждите ...
×
Правила раздела:
1 Задавайте конкретные вопросы. Для болтовни есть свободный раздел.
2 По возможности давайте конкретные ответы.
3 Один вопрос=одна тема. Если хотите задать ещё вопрос, то начинайте новую тему.
4 Название темы должно составлять сам вопрос, и быть максимально конкретным. Рекомендуется начинать тему словами "Как", "Что", "Почему". А первый пост повторяет вопрос и даёт расширенные сведения.
5 Рекомендуется указывать версию мейкера (2000, 2003, RMXP, RMVX, ACE, IGM, и.т.д.. Это важно, и всё равно ведь спросят.
6 Темы "Пара вопросов", "Помогите", и подобные им - самый лёгкий путь к бану.
7 Поиск находится вверху справа.
А. Названия подразделов этого раздела уточняются. Советы принимаются.
  • Страница:
  • 1
  • 2

ТЕМА: Как поставить заставку перед главным меню?

Re: Как поставить заставку перед главным меню? 13 года 3 мес. назад #38957

  • Soliд
  • Soliд аватар
  • Вне сайта
  • Светлый дракон
  • Сообщений: 542
  • Спасибо получено: 71
Зеро пишет:
[quote=Но есть и плюсы:

Диалоговая система.
Виклы.
Зоны на картах (как в 2000-2003)
Расширенные стандартные условия в ивентах (типа если есть предмет в инвентаре и т п без использования Condition Branch - ветвления условий. это удобно)

вот имено по этому мне и нравится веха потому что не надо думать как вставить простейший фейс в диалог отвлекаясь на такие мелочи иногда тратиться слишком много времени и сил а это всегда плохо ... твой любимый ХР злодей это скорей головоломка чем нормальный инструмент по принцепу измени все и только тогда получишь результат. я конечно понимаю что ты слишком крут и не мне с тобой тягаться но надо понимать одно что если мы хотим развиваться то веха это пока лучший старт для привлечение новичков в мекер строительстве! . простите за офф топ! но я не мог не ответить[/quote]
А мне наоборот удобнее на XP. И фейсы можно добавить и если добавить парочку новых возможностей(скрипты) то VX по сравнению с XP нервно курить в углу. У меня щас стоят пять скриптов(все есть в файловом архиве) и мне стало ОЧЕНЬ даже неудобно работать в VX(да и скриптов в фаловом архиве для него маленько)да и в VX получаются какие-то несерьезные игры, типо "Приключения головастика с маленьким телом, который бьет себе подобных монстров и людей"
Администратор запретил публиковать записи гостям.

Re: Как поставить заставку перед главным меню? 13 года 2 мес. назад #39163

  • Scorpio
  • Scorpio аватар
  • Вне сайта
  • Мастер
  • Сообщений: 173
  • Спасибо получено: 6
Спасибо за оффтоп :laugh:

собственно как я понял что никто не энает как сделать это для VX так что я нашёл сам скриптик причём неплохой

Вот если кому интересно www.hbgames.org/forums/viewtopic.php?f=11&t=61007
Администратор запретил публиковать записи гостям.
За этот пост поблагодарили: SaretOdin-Sol

Re: Как поставить заставку перед главным меню? 13 года 2 мес. назад #39278

  • SaretOdin-Sol
  • SaretOdin-Sol аватар
  • Вне сайта
  • Просветлённый
  • Жизнь - не игра...Хотя кого это колышет?
  • Сообщений: 475
  • Спасибо получено: 77
To Scorpio:
Есть еще и такой.
#==============================================================================
# ** Scene_Splash 2.0.2 RGSS2
# D�vic - Programming and debugging
# Isaacsol - Supporting and debugging
#
# Version history:
#   ~ 07.03.08 :: First version released with fade effects, image delaying and
#                 unlimited number of logo images.
#   ~ 10.03.08 :: Version 1.5 released with beta Audio processing; plays all
#                 types of Audio (BGM, BGS, SE & ME), but just one through all
#                 the Scene. It is possible to disable Audio.
#   ~ 24.03.08 :: Script rewrite - beta version 1.8a for animation beta
#                 function (not released beta-version).
#   ~ 25.03.08 :: Script second rewrite - non-released 1.9 beta version in tests
#                 for plain image, animation and audio compatibility.
#   ~ 25.03.08 :: Release of version 2.0! Features:
#                 - [!] Change in the Script's name to Scene_Splash [!]
#                 - Script rewritten; more clear and pure
#                 - New customisation system; unlimited amount of images and audio
#                 - Audio playing system more deep
#                 - Can be disabled in playtest
#                 - Animation compatible
#                 - New Wait engine; dœs not modify Graphics Module anymore
#                 - BreakSplash engine improved; break keys customisable
#   ~ 25.03.08 :: Version 2.0.1 - Slight edit on Scene_Title; the Splash
#                 Screen will not appear more than one time per initialisation.
#                 (Function called OneTimeSplash)
#   ~ 30.03.08 :: Version 2.0.2 - Fixed non-stopable sound bug.
#------------------------------------------------------------------------------
# Shows a splash screen on startup. Compatible only with RGSS2!
#   Questions, acknowledgments and requests may be taken on the script's
#   threads, but you can send me an e-mail at: phabio_almeida@hotmail.com
#------------------------------------------------------------------------------
#   English thread:
#   http://www.rpgmakervx.net/index.php?showtopic=974
#   Portuguese thread:
#   http://www.rpgmakerbrasil.com/forum/f43/rmvx-scene-logo-1-7-rgss2-552.html
#   German thread:
#   http://forum.rpgvx.net/index.php?showtopic=481
#------------------------------------------------------------------------------
#                                                          Respectfully,
#                                                                      D�vic.
#==============================================================================
 
class Scene_Splash
  DisableInDebug = false
  BreakSplash = true
  OneTimeSplash = true
 
  def initialize
    @logo = [
        [ [ 1, 200, 200 ], 'frame', 'ME', 'sound', 80, 100 ],
        [ 120, 'logo' ]
      ]
    @fade_delay = 20
    @break = 'Input.press?(Input::B) || Input.press?(Input::C)'
    main
  end
 
  def main
    @logo.each { |a|
      unless a.length < 3
        case a[2]
        when 'BGM'
          Audio.bgm_play("Audio/BGM/#{a[3]}", a[4], a[5])
        when 'BGS'
          Audio.bgs_play("Audio/BGS/#{a[3]}", a[4], a[5])
        when 'ME'
          Audio.me_play("Audio/ME/#{a[3]}", a[4], a[5])
        when 'SE'
          Audio.se_play("Audio/SE/#{a[3]}", a[4], a[5])
        end
      end
      if a[0].kind_of?(Array)
        sprite = Sprite.new
        sprite.bitmap = Cache.system("#{a[1]}1")
        Graphics.transition
        Graphics.fadein(@fade_delay)
        for j in 2..(a[0][0] - 1)
          sprite = Sprite.new
          sprite.bitmap = Cache.system(a[1] + j.to_s)
          a[0][1].times {
            Graphics.update
            Input.update
            (break if eval(@break)) if BreakSplash
           }
          (break if eval(@break)) if BreakSplash
          sprite.dispose
        end
        unless eval(@break)
          sprite = Sprite.new
          sprite.bitmap = Cache.system(a[1] + a[0][0].to_s)
          Graphics.wait(a[0][2])
        end
        audio_stop(a)
        Graphics.fadeout(@fade_delay)
        sprite.dispose
      else
        sprite = Sprite.new
        sprite.bitmap = Cache.system(a[1])
        Graphics.transition
        Graphics.fadein(@fade_delay)
        a[0].times {
          Graphics.update
          Input.update
          (break if eval(@break)) if BreakSplash
         }
        audio_stop(a)
        Graphics.fadeout(@fade_delay)
        sprite.dispose
      end
      Graphics.freeze
     }
   end
 
   def audio_stop(a)
    unless a.length < 3
      case a[2]
      when 'BGM'
        Audio.bgm_fade(@fade_delay)
      when 'BGS'
        Audio.bgs_fade(@fade_delay)
      when 'ME'
        Audio.me_fade(@fade_delay)
      when 'SE'
        Audio.se_stop
      end
    end
  end
end
 
class Scene_Title
  alias old_start start
  def start
    unless $splash
      $splash = true if Scene_Splash::OneTimeSplash
      if Scene_Splash::DisableInDebug
        Scene_Splash.new unless $TEST
      else
        Scene_Splash.new
      end
    end
    old_start
  end
end
За ссылку на рафидельза спасиб. Каким то макаром я его пропустил.



Последнее редактирование: 13 года 2 мес. назад от SaretOdin-Sol.
Администратор запретил публиковать записи гостям.
За этот пост поблагодарили: Scorpio

Re: Как поставить заставку перед главным меню? 13 года 2 мес. назад #39283

  • Scorpio
  • Scorpio аватар
  • Вне сайта
  • Мастер
  • Сообщений: 173
  • Спасибо получено: 6
SaretOdin-Sol пишет:
To Scorpio:
Есть еще и такой.
#==============================================================================
# ** Scene_Splash 2.0.2 RGSS2
# D�vic - Programming and debugging
# Isaacsol - Supporting and debugging
#
# Version history:
#   ~ 07.03.08 :: First version released with fade effects, image delaying and
#                 unlimited number of logo images.
#   ~ 10.03.08 :: Version 1.5 released with beta Audio processing; plays all
#                 types of Audio (BGM, BGS, SE & ME), but just one through all
#                 the Scene. It is possible to disable Audio.
#   ~ 24.03.08 :: Script rewrite - beta version 1.8a for animation beta
#                 function (not released beta-version).
#   ~ 25.03.08 :: Script second rewrite - non-released 1.9 beta version in tests
#                 for plain image, animation and audio compatibility.
#   ~ 25.03.08 :: Release of version 2.0! Features:
#                 - [!] Change in the Script's name to Scene_Splash [!]
#                 - Script rewritten; more clear and pure
#                 - New customisation system; unlimited amount of images and audio
#                 - Audio playing system more deep
#                 - Can be disabled in playtest
#                 - Animation compatible
#                 - New Wait engine; dœs not modify Graphics Module anymore
#                 - BreakSplash engine improved; break keys customisable
#   ~ 25.03.08 :: Version 2.0.1 - Slight edit on Scene_Title; the Splash
#                 Screen will not appear more than one time per initialisation.
#                 (Function called OneTimeSplash)
#   ~ 30.03.08 :: Version 2.0.2 - Fixed non-stopable sound bug.
#------------------------------------------------------------------------------
# Shows a splash screen on startup. Compatible only with RGSS2!
#   Questions, acknowledgments and requests may be taken on the script's
#   threads, but you can send me an e-mail at: phabio_almeida@hotmail.com
#------------------------------------------------------------------------------
#   English thread:
#   http://www.rpgmakervx.net/index.php?showtopic=974
#   Portuguese thread:
#   http://www.rpgmakerbrasil.com/forum/f43/rmvx-scene-logo-1-7-rgss2-552.html
#   German thread:
#   http://forum.rpgvx.net/index.php?showtopic=481
#------------------------------------------------------------------------------
#                                                          Respectfully,
#                                                                      D�vic.
#==============================================================================
 
class Scene_Splash
  DisableInDebug = false
  BreakSplash = true
  OneTimeSplash = true
 
  def initialize
    @logo = [
        [ [ 1, 200, 200 ], 'frame', 'ME', 'sound', 80, 100 ],
        [ 120, 'logo' ]
      ]
    @fade_delay = 20
    @break = 'Input.press?(Input::B) || Input.press?(Input::C)'
    main
  end
 
  def main
    @logo.each { |a|
      unless a.length < 3
        case a[2]
        when 'BGM'
          Audio.bgm_play("Audio/BGM/#{a[3]}", a[4], a[5])
        when 'BGS'
          Audio.bgs_play("Audio/BGS/#{a[3]}", a[4], a[5])
        when 'ME'
          Audio.me_play("Audio/ME/#{a[3]}", a[4], a[5])
        when 'SE'
          Audio.se_play("Audio/SE/#{a[3]}", a[4], a[5])
        end
      end
      if a[0].kind_of?(Array)
        sprite = Sprite.new
        sprite.bitmap = Cache.system("#{a[1]}1")
        Graphics.transition
        Graphics.fadein(@fade_delay)
        for j in 2..(a[0][0] - 1)
          sprite = Sprite.new
          sprite.bitmap = Cache.system(a[1] + j.to_s)
          a[0][1].times {
            Graphics.update
            Input.update
            (break if eval(@break)) if BreakSplash
           }
          (break if eval(@break)) if BreakSplash
          sprite.dispose
        end
        unless eval(@break)
          sprite = Sprite.new
          sprite.bitmap = Cache.system(a[1] + a[0][0].to_s)
          Graphics.wait(a[0][2])
        end
        audio_stop(a)
        Graphics.fadeout(@fade_delay)
        sprite.dispose
      else
        sprite = Sprite.new
        sprite.bitmap = Cache.system(a[1])
        Graphics.transition
        Graphics.fadein(@fade_delay)
        a[0].times {
          Graphics.update
          Input.update
          (break if eval(@break)) if BreakSplash
         }
        audio_stop(a)
        Graphics.fadeout(@fade_delay)
        sprite.dispose
      end
      Graphics.freeze
     }
   end
 
   def audio_stop(a)
    unless a.length < 3
      case a[2]
      when 'BGM'
        Audio.bgm_fade(@fade_delay)
      when 'BGS'
        Audio.bgs_fade(@fade_delay)
      when 'ME'
        Audio.me_fade(@fade_delay)
      when 'SE'
        Audio.se_stop
      end
    end
  end
end
 
class Scene_Title
  alias old_start start
  def start
    unless $splash
      $splash = true if Scene_Splash::OneTimeSplash
      if Scene_Splash::DisableInDebug
        Scene_Splash.new unless $TEST
      else
        Scene_Splash.new
      end
    end
    old_start
  end
end
За ссылку на рафидельза спасиб. Каким то макаром я его пропустил.

хммм странно что-то я его там и не смог запустить ( какая-то ошибка на связанная с музыкой
Администратор запретил публиковать записи гостям.

Re: Как поставить заставку перед главным меню? 13 года 2 мес. назад #39285

  • SaretOdin-Sol
  • SaretOdin-Sol аватар
  • Вне сайта
  • Просветлённый
  • Жизнь - не игра...Хотя кого это колышет?
  • Сообщений: 475
  • Спасибо получено: 77
[ [ 1, 200, 200 ], 'frame', 'ME', 'sound', 80, 100 ],
Думаю эта строку.
sound = имя звукового файла, который ты поставишь. Просто переименнуй sound.
И еще. Файл должен лежать в папке МЕ.



Администратор запретил публиковать записи гостям.

Re: Как поставить заставку перед главным меню? 13 года 2 мес. назад #39286

  • Scorpio
  • Scorpio аватар
  • Вне сайта
  • Мастер
  • Сообщений: 173
  • Спасибо получено: 6
SaretOdin-Sol пишет:
[ [ 1, 200, 200 ], 'frame', 'ME', 'sound', 80, 100 ],
Думаю эта строку.
sound = имя звукового файла, который ты поставишь. Просто переименнуй sound.
И еще. Файл должен лежать в папке МЕ.
а формат?
Администратор запретил публиковать записи гостям.

Re: Как поставить заставку перед главным меню? 13 года 2 мес. назад #39288

  • SaretOdin-Sol
  • SaretOdin-Sol аватар
  • Вне сайта
  • Просветлённый
  • Жизнь - не игра...Хотя кого это колышет?
  • Сообщений: 475
  • Спасибо получено: 77
У меня лично мп3.



Администратор запретил публиковать записи гостям.

Re: Как поставить заставку перед главным меню? 13 года 2 мес. назад #39290

  • Scorpio
  • Scorpio аватар
  • Вне сайта
  • Мастер
  • Сообщений: 173
  • Спасибо получено: 6
SaretOdin-Sol пишет:
У меня лично мп3.
всё понял круто всё работает спасибо
Администратор запретил публиковать записи гостям.

Re: Как поставить заставку перед главным меню? 13 года 2 мес. назад #39291

  • SaretOdin-Sol
  • SaretOdin-Sol аватар
  • Вне сайта
  • Просветлённый
  • Жизнь - не игра...Хотя кого это колышет?
  • Сообщений: 475
  • Спасибо получено: 77
Вот еще. Тоже можешь добавить шоб вступительная заставочка подольше была:P
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/   ◆                  Splash Logo - KGC_TitleDirection                ◆ VX ◆
#_/   ◇                       Last Update: 2008/09/06                         ◇
#_/   ◆                    Translation by Mr. Anonymous                       ◆
#_/   ◆ KGC Site:#_/   ◆ http://f44.aaa.livedoor.jp/~ytomy/                                    ◆
#_/   ◆ Translator's Blog:                                                    ◆
#_/   ◆ http://mraprojects.wordpress.com                                      ◆
#_/----------------------------------------------------------------------------
#_/   This script adds a function to display a splash logo before the title
#_/  screen is displayed. A sample of this effect is provided with the demo 
#_/  this script came packaged in.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
 
#==============================================================================
#                             ★ Customization ★
#==============================================================================
 
module KGC
module TitleDirection
  #                        ◆ Start Title BGM Timing ◆
  # This allows you to adjust when the title screen BGM is played.
  #   0..Before Logo  1..After Logo
  BGM_TIMING = 1
 
  #                 ◆ Show Logo During Testplay (DEBUGGING) ◆
  # This toggle allows you to bypass the logo display when debugging.
  TESTPLAY_SHOW = true
 
  #                         ◆ Splash Logo Image ◆
  #  Here, you may specify the image file you'd like to use as a logo.
  # The image must be in the "Graphics/System" folder.
  # Setting this to nil will display nothing. If set to nil, the Splash Logo 
  #  Sound Effect defined below is also assumed to be nil.
  SPLASH_LOGO_FILE = "Logo"
 
  #                       ◆ Splash Logo Sound Effect ◆
  # Here, you may specify a sound effect to play while the splash logo displays.
  # This can be written two ways. First, you can simply define a filename and
  #  the script automatically assumes to look in the SE folder and assign 
  #  default values for volume and pitch, as such:   
  #     SPLASH_LOGO_SE = "start_logo"
  #  Or class notation, allowing for additional customization, as such:
  #   SPLASH_LOGO_SE = RPG::SE.new("start_logo", 80, 100)
  # Format: ("SoundName", Volume, Pitch)
  SPLASH_LOGO_SE = RPG::SE.new("Magic", 80, 50)
 
  #                           ◆ Logo Splash Style ◆
  #  Here, you may specify an effect for your logo. It's best just to try out
  # each option and see what works for you.
  #   0..Fade  1..Crossing  2..Zoom  3..Splash
  SPLASH_LOGO_TYPE = 3
  end
end
#=============================================================================#
#                          ★ End Customization ★                              #
#=============================================================================#
 
#=================================================#
#                    IMPORT                       #
#=================================================#
 
$imported = {} if $imported == nil
$imported["TitleDirection"] = true
 
#=================================================#
 
#==============================================================================
# □ Sprite_TitleLogo
#------------------------------------------------------------------------------
#   タイトル画面のロゴを扱うクラスです。
#==============================================================================
 
class Sprite_TitleLogo < Sprite
  attr_accessor :effect_no_out  # 消去エフェクトなし
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super
    @effect_type = 0
    @effect_duration = 0
    @effect_sprites = []
    @effect_no_out = false
  end
  #--------------------------------------------------------------------------
  # ● 破棄
  #--------------------------------------------------------------------------
  def dispose
    super
    dispose_effect_sprites
  end
  #--------------------------------------------------------------------------
  # ○ エフェクト用スプライト破棄
  #--------------------------------------------------------------------------
  def dispose_effect_sprites
    @effect_sprites.each { |s| s.dispose }
    @effect_sprites = []
  end
  #--------------------------------------------------------------------------
  # ● Z 座標変更
  #--------------------------------------------------------------------------
  def z=(value)
    super(value)
    @effect_sprites.each { |s| s.z = value }
  end
  #--------------------------------------------------------------------------
  # ○ フェード効果
  #     dx : X 座標
  #     dy : Y 座標
  #     bitmap : 表示画像
  #--------------------------------------------------------------------------
  def effect_fade(dx, dy, bitmap)
    dispose_effect_sprites
    @effect_type = 0
    @effect_duration = 150
    # スプライト作成
    sprite = Sprite.new
    sprite.bitmap = bitmap
    # 表示位置を調整
    sprite.x = dx
    sprite.y = dy
    sprite.ox = bitmap.width / 2
    sprite.oy = bitmap.height / 2
    sprite.opacity = 0
 
    @effect_sprites << sprite
  end
  #--------------------------------------------------------------------------
  # ○ クロス効果
  #--------------------------------------------------------------------------
  def effect_cross(dx, dy, bitmap)
    dispose_effect_sprites
    @effect_type = 1
    @effect_duration = 150
    # スプライト作成
    sprites = [Sprite.new, Sprite.new]
    sprites[0].bitmap = bitmap
    sprites[1].bitmap = bitmap
    # 表示位置を調整
    sprites[0].x = dx - 240
    sprites[1].x = dx + 240
    sprites[0].y = dy
    sprites[1].y = dy
    sprites[0].ox = sprites[1].ox = bitmap.width / 2
    sprites[0].oy = sprites[1].oy = bitmap.height / 2
    sprites[0].opacity = 0
    sprites[1].opacity = 0
 
    @effect_sprites += sprites
  end
  #--------------------------------------------------------------------------
  # ○ ズーム効果
  #--------------------------------------------------------------------------
  def effect_zoom(dx, dy, bitmap)
    dispose_effect_sprites
    @effect_type = 2
    @effect_duration = 150
    # スプライト作成
    sprites = [Sprite.new, Sprite.new]
    sprites[0].bitmap = bitmap
    sprites[1].bitmap = bitmap
    # 初期設定
    sprites[0].x = sprites[1].x = dx
    sprites[0].y = sprites[1].y = dy
    sprites[0].ox = sprites[1].ox = bitmap.width / 2
    sprites[0].oy = sprites[1].oy = bitmap.height / 2
    sprites[0].zoom_x = sprites[0].zoom_y = 0.0
    sprites[1].zoom_x = sprites[1].zoom_y = 6.0
    sprites[0].opacity = sprites[1].opacity = 0
 
    @effect_sprites += sprites
  end
  #--------------------------------------------------------------------------
  # ○ スプラッシュ効果
  #--------------------------------------------------------------------------
  def effect_splash(dx, dy, bitmap)
    dispose_effect_sprites
    @effect_type = 3
    @effect_duration = 150
    # スプライト作成
    sprites = [Sprite.new]
    sprites[0].bitmap = bitmap
    # 初期設定
    sprites[0].ox = bitmap.width >> 1
    sprites[0].oy = bitmap.height >> 1
    sprites[0].x = dx
    sprites[0].y = dy
    sprites[0].opacity = 0
    (1..3).each { |i|
      sprites[i] = Sprite.new
      sprites[i].bitmap = bitmap
      sprites[i].ox = sprites[0].ox
      sprites[i].oy = sprites[0].oy
      sprites[i].x = dx
      sprites[i].y = dy
      sprites[i].opacity = 255
      sprites[i].visible = false
    }
 
    @effect_sprites += sprites
  end
  #--------------------------------------------------------------------------
  # ○ スプラッシュイン効果
  #--------------------------------------------------------------------------
  def effect_splash_in(dx, dy, bitmap)
    dispose_effect_sprites
    @effect_type = 4
    @effect_duration = 41
    # スプライト作成
    sprites = [Sprite.new]
    sprites[0].bitmap = bitmap
    # 初期設定
    sprites[0].ox = bitmap.width >> 1
    sprites[0].oy = bitmap.height >> 1
    sprites[0].x = dx - 160
    sprites[0].y = dy - 160
    sprites[0].opacity = 0
    (1..3).each { |i|
      sprites[i] = Sprite.new
      sprites[i].bitmap = bitmap
      sprites[i].ox = sprites[0].ox
      sprites[i].oy = sprites[0].oy
      sprites[i].x = dx
      sprites[i].y = dy
      sprites[i].opacity = 0
    }
    sprites[1].x += 160
    sprites[1].y -= 160
    sprites[2].x += 160
    sprites[2].y += 160
    sprites[3].x -= 160
    sprites[3].y += 160
 
    @effect_sprites += sprites
  end
  #--------------------------------------------------------------------------
  # ○ エフェクト停止
  #--------------------------------------------------------------------------
  def stop_effect
    dispose_effect_sprites
    @effect_duration = 0
  end
  #--------------------------------------------------------------------------
  # ○ エフェクト実行中判定
  #--------------------------------------------------------------------------
  def effect?
    return @effect_duration > 0
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新
  #--------------------------------------------------------------------------
  def update
    super
 
    if @effect_duration > 0
      update_effect
    end
  end
  #--------------------------------------------------------------------------
  # ○ エフェクト更新
  #--------------------------------------------------------------------------
  def update_effect
    @effect_duration -= 1
    case @effect_type
    when 0
      update_effect_fade
    when 1
      update_effect_cross
    when 2
      update_effect_zoom
    when 3
      update_effect_splash
    when 4
      update_effect_splash_in
    end
  end
  #--------------------------------------------------------------------------
  # ○ エフェクト更新 : フェード
  #--------------------------------------------------------------------------
  def update_effect_fade
    case @effect_duration
    when 100...150
      @effect_sprites[0].opacity += 6
    when 30...100
      # 何もしない
    when 0...30
      unless @effect_no_out
        @effect_sprites[0].opacity -= 10
      end
    end
  end
  #--------------------------------------------------------------------------
  # ○ エフェクト更新 : クロス
  #--------------------------------------------------------------------------
  def update_effect_cross
    case @effect_duration
    when 110...150
      @effect_sprites[0].x += 6
      @effect_sprites[1].x -= 6
      @effect_sprites[0].opacity += 4
      @effect_sprites[1].opacity += 4
    when 30...110
      @effect_sprites[0].opacity = 255
      @effect_sprites[1].visible = false
    when 0...30
      unless @effect_no_out
        @effect_sprites[0].opacity -= 13
      end
    end
  end
  #--------------------------------------------------------------------------
  # ○ エフェクト更新 : ズーム
  #--------------------------------------------------------------------------
  def update_effect_zoom
    case @effect_duration
    when 100...150
      @effect_sprites[0].zoom_x = (@effect_sprites[0].zoom_y += 0.02)
      @effect_sprites[1].zoom_x = (@effect_sprites[1].zoom_y -= 0.1)
      @effect_sprites[0].opacity += 3
      @effect_sprites[1].opacity += 3
    when 30...100
      @effect_sprites[0].opacity = 255
      @effect_sprites[1].visible = false
    when 0...30
      unless @effect_no_out
        @effect_sprites[0].opacity -= 13
      end
    end
  end
  #--------------------------------------------------------------------------
  # ○ エフェクト更新 : スプラッシュ
  #--------------------------------------------------------------------------
  def update_effect_splash
    case @effect_duration
    when 90...150
      @effect_sprites[0].opacity += 5
    when 0...60
      @effect_sprites[0].x -= 2
      @effect_sprites[0].y -= 2
      @effect_sprites[1].x += 2
      @effect_sprites[1].y -= 2
      @effect_sprites[2].x += 2
      @effect_sprites[2].y += 2
      @effect_sprites[3].x -= 2
      @effect_sprites[3].y += 2
      4.times { |j|
        @effect_sprites[j].visible = true
        @effect_sprites[j].opacity -= 5
      }
    end
  end
  #--------------------------------------------------------------------------
  # ○ エフェクト更新 : スプラッシュイン
  #--------------------------------------------------------------------------
  def update_effect_splash_in
    case @effect_duration
    when 1...41
      @effect_sprites[0].x += 2
      @effect_sprites[0].y += 2
      @effect_sprites[1].x -= 2
      @effect_sprites[1].y += 2
      @effect_sprites[2].x -= 2
      @effect_sprites[2].y -= 2
      @effect_sprites[3].x += 2
      @effect_sprites[3].y -= 2
      4.times { |j|
        @effect_sprites[j].opacity += 3
      }
    when 0
      @effect_sprites[0].opacity = 255
      (1..3).each { |i|
        @effect_sprites[i].visible = false
      }
    end
  end
end
 
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
 
#==============================================================================
# ■ Scene_Title
#==============================================================================
 
class Scene_Title < Scene_Base
  #--------------------------------------------------------------------------
  # ● 開始処理
  #--------------------------------------------------------------------------
  alias start_KGC_TitleDirection start
  def start
    show_splash_logo
 
    start_KGC_TitleDirection
  end
  #--------------------------------------------------------------------------
  # ○ スプラッシュロゴ表示
  #--------------------------------------------------------------------------
  def show_splash_logo
    return if $__splash_logo_shown
    return if $TEST && !KGC::TitleDirection::TESTPLAY_SHOW
    return if KGC::TitleDirection::SPLASH_LOGO_FILE == nil
 
    play_title_music if KGC::TitleDirection::BGM_TIMING == 0
 
    # ロゴ表示 SE 演奏
    if KGC::TitleDirection::SPLASH_LOGO_SE != nil
      if KGC::TitleDirection::SPLASH_LOGO_SE.is_a?(RPG::SE)
        KGC::TitleDirection::SPLASH_LOGO_SE.play
      elsif KGC::TitleDirection::SPLASH_LOGO_SE.is_a?(String)
        se = RPG::SE.new(KGC::TitleDirection::SPLASH_LOGO_SE)
        se.play
      end
    end
 
    # エフェクト用スプライト作成
    sprite = Sprite_TitleLogo.new
    bitmap = Cache.system(KGC::TitleDirection::SPLASH_LOGO_FILE)
    dx = Graphics.width / 2
    dy = Graphics.height / 2
 
    # エフェクト準備
    case KGC::TitleDirection::SPLASH_LOGO_TYPE
    when 0
      sprite.effect_fade(dx, dy, bitmap)
    when 1
      sprite.effect_cross(dx, dy, bitmap)
    when 2
      sprite.effect_zoom(dx, dy, bitmap)
    when 3
      sprite.effect_splash(dx, dy, bitmap)
    end
    # エフェクト実行
    Graphics.transition(0)
    while sprite.effect?
      Graphics.update
      Input.update
      sprite.update
      # C ボタンで中止
      if Input.trigger?(Input::C)
        sprite.stop_effect
      end
    end
    # 後始末
    sprite.dispose
    bitmap.dispose
    # トランジション準備
    Graphics.freeze
 
    $__splash_logo_shown = true
  end
end



Администратор запретил публиковать записи гостям.
За этот пост поблагодарили: Scorpio
  • Страница:
  • 1
  • 2
Время создания страницы: 0.251 секунд