Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Introcredits
- @@images = []
- class Image
- def initialize(name, id)
- @id = id
- @finished = false
- @start = rand(120)-60
- $game_screen.pictures[@id].show(name, 0, @start, 0, 100, 100, 0, 0)
- $game_screen.pictures[@id].move(40, 0, 0, 0, 100, 100, 255, 0)
- @wait = 121
- end
- def update
- @wait -= 1
- if @wait == 101
- $game_screen.pictures[@id].move(80, 0, -@start, 0, 100, 100, 0, 0)
- elsif @wait <= 0
- $game_screen.pictures[@id].erase
- @finished = true
- end
- end
- def finished?
- return @finished
- end
- end
- def self.update
- del = []
- @@images.each { |img|
- img.update
- del.push(img) if img.finished?
- }
- @@images -= del
- end
- def self.show_pic(name, id)
- @@images.push(Image.new(name, id))
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement