赞 | 2 |
VIP | 109 |
好人卡 | 208 |
积分 | 4 |
经验 | 22037 |
最后登录 | 2024-11-11 |
在线时间 | 1198 小时 |
Lv2.观梦者 虚構歪曲
- 梦石
- 0
- 星屑
- 364
- 在线时间
- 1198 小时
- 注册时间
- 2010-12-18
- 帖子
- 3928
|
- # Scene : Splash
- # Usage : To show a logo in game.
- # Author : Tamashii
- # Copyright (c) 2011, Tamashii / DLM Studio.
- class Scene_Splash
- # Main processing
- def main
- if $BTEST
- battle_test
- return
- end
- @bg = Sprite.new
- @bg.bitmap = Bitmap.new(640, 480)
- @bg.bitmap.fill_rect(0, 0, 640, 480, Color.new(255, 255, 255))
- @bg.bitmap.font.color = Color.new(0, 0, 0)
- @bg.bitmap.font.name = ["Arial"]
- @bg.bitmap.draw_text(0, 32, 640, 32, "It's a tale told by :", 1)
- @bg.opacity = 0
- @sprite = Sprite.new
- @sprite.bitmap = Bitmap.new("Graphics/Pictures/logo")
- @sprite.opacity = 0
- @fadeout = false
- @frame_count = 0
- Graphics.transition
- loop do
- Graphics.update
- Input.update
- update
- if $scene != self
- break
- end
- end
- Graphics.freeze
- @sprite.bitmap.dispose
- @sprite.dispose
- @bg.bitmap.dispose
- @bg.dispose
- end
- # Update frame
- def update
- if Input.trigger?(Input::A) or Input.trigger?(Input::B) or Input.trigger?(Input::C)
- $scene = Scene_Title.new
- return
- end
- unless @fadeout
- if @bg.opacity < 255
- @bg.opacity += 10
- return
- end
- if @sprite.opacity < 255
- @sprite.opacity += 10
- return
- end
- @frame_count += 1
- if (@frame_count = 40)
- @fadeout = true
- end
- return
- end
- if @sprite.opacity > 0
- @sprite.opacity -= 10
- return
- end
- if @bg.opacity > 0
- @bg.opacity -= 10
- return
- end
- $scene = Scene_Title.new
- end
- # Battle test
- def battle_test
- # Loading database for battle test
- $data_actors = load_data("Data/BT_Actors.rxdata")
- $data_classes = load_data("Data/BT_Classes.rxdata")
- $data_skills = load_data("Data/BT_Skills.rxdata")
- $data_items = load_data("Data/BT_Items.rxdata")
- $data_weapons = load_data("Data/BT_Weapons.rxdata")
- $data_armors = load_data("Data/BT_Armors.rxdata")
- $data_enemies = load_data("Data/BT_Enemies.rxdata")
- $data_troops = load_data("Data/BT_Troops.rxdata")
- $data_states = load_data("Data/BT_States.rxdata")
- $data_animations = load_data("Data/BT_Animations.rxdata")
- $data_tilesets = load_data("Data/BT_Tilesets.rxdata")
- $data_common_events = load_data("Data/BT_CommonEvents.rxdata")
- $data_system = load_data("Data/BT_System.rxdata")
- # reset game timer counter
- Graphics.frame_count = 0
- # anylize game objects
- $game_temp = Game_Temp.new
- $game_system = Game_System.new
- $game_switches = Game_Switches.new
- $game_variables = Game_Variables.new
- $game_self_switches = Game_SelfSwitches.new
- $game_screen = Game_Screen.new
- $game_actors = Game_Actors.new
- $game_party = Game_Party.new
- $game_troop = Game_Troop.new
- $game_map = Game_Map.new
- $game_player = Game_Player.new
- # setup parties used to battle test
- $game_party.setup_battle_test_members
- # setup troop ID, can escape mark, battle background.
- $game_temp.battle_troop_id = $data_system.test_troop_id
- $game_temp.battle_can_escape = true
- $game_map.battleback_name = $data_system.battleback_name
- # play battle start SE
- $game_system.se_play($data_system.battle_start_se)
- # play battle BGM
- $game_system.bgm_play($game_system.battle_bgm)
- # move to battle scene
- $scene = Scene_Battle.new
- end
- end
复制代码 |
|