Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # Simple Title Animation RMVXA v1.0
- # © 2012, Companion Wulf
- # RPG Maker Times - http://rpgmakertimes.co.cc/blog
- #
- # Feel free to propagate this script, but please give credit.
- #==============================================================================
- # This script manipulates the title (defined in the Database) and animates it,
- # from the top of the screen to the centre of the screen above the menu.
- #
- #==============================================================================
- # Version History
- #==============================================================================
- # 27-Mar-2012 - Version 1.0
- # * Began/finished script
- #
- #==============================================================================
- # Begin Editable Options
- #==============================================================================
- SPRITE_Y = -160 # Y starting position of title
- SPRITE_Z = 100 # Z index of title
- SPRITE_SPEED = 1 # Speed the title moves down screen
- SPRITE_END_YPOS = 150 # Where the title ends up (Y coordinate)
- SPRITE_FONT = "SF Gushing Meadow" # Title font
- FONT_COLOR = Color.new(200,0,0) # Title font colour
- #==============================================================================
- # End Editable Options
- #==============================================================================
- #==============================================================================
- # Do not edit below unless you're a scripter.
- #==============================================================================
- #==============================================================================
- # ¦ Scene_Base
- #------------------------------------------------------------------------------
- # Aliased method: update
- #==============================================================================
- class Scene_Base
- #--------------------------------------------------------------------------
- # ? Update
- #--------------------------------------------------------------------------
- alias cwscnbs_update update
- def update
- cwscnbs_update
- update_title_anim if @from_title
- end
- end
- #==============================================================================
- # ¦ Scene_Title
- #------------------------------------------------------------------------------
- # Aliased method: start
- # Overwritten method: create_foreground
- # New methods: update_title_anim
- #==============================================================================
- class Scene_Title < Scene_Base
- #--------------------------------------------------------------------------
- # ? Start Processing
- #--------------------------------------------------------------------------
- alias cwscnttl_start start
- def start
- cwscnttl_start
- @from_title = true
- end
- #--------------------------------------------------------------------------
- # ? Create Foreground
- #--------------------------------------------------------------------------
- def create_foreground
- @foreground_sprite = Sprite.new
- @foreground_sprite.bitmap = Bitmap.new(Graphics.width, Graphics.height)
- @foreground_sprite.bitmap.font.color = FONT_COLOR
- @foreground_sprite.bitmap.font.name = SPRITE_FONT
- @foreground_sprite.y = SPRITE_Y #-160
- @foreground_sprite.z = SPRITE_Z #100
- draw_game_title if $data_system.opt_draw_title
- end
- #--------------------------------------------------------------------------
- # ? Update Title Animation
- #--------------------------------------------------------------------------
- def update_title_anim
- @foreground_sprite.y += SPRITE_SPEED unless @foreground_sprite.y == SPRITE_END_YPOS #130
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement