#==============================================================================
# Autor: MiDas Mike
# Tłumaczenie i poprawki: Ayene
#
www.ultimateam.pl
#==============================================================================
# Umieść skrypt nad Main
#==============================================================================
# By wywołać napisy wpisz:
# $scene = Scene_Credits.new
#==============================================================================
# Skrypt wyświetla napisy końcowe (tzw. Credits)
#==============================================================================
# KONFIGURACJA
# Czcionka
CREDITS_FONT = "Times New Roman"
# Wielkość czcionki
CREDITS_SIZE = 24
# Kolor konturu
CREDITS_OUTLINE = Color.new(0,0,127, 255)
# Kolor cienia
CREDITS_SHADOW = Color.new(0,0,0, 100)
# Kolor wypełnienia
CREDITS_FILL = Color.new(255,255,255, 255)
# Nazwa obrazka, który ma się wyświetlać w tle
CREDITS_BACK = "title"
#==============================================================================
class Scene_Credits
# Początek edycji tekstu
# poniżej wpisz tekst, który ma się wyświetlać
CREDIT=<<_END_ # <- nie usuwaj tego
Tytuł Gry
~ Reżyser ~
Ayene
---------------
~ Skrypty ~
Ayene
---------------
~ Grafika ~
Ayene
---------------
~ Dźwięk i muzyka ~
Ayene
---------------
~ Mapy ~
Ayene
---------------
~ Fabuła ~
Ayene
---------------
~ Testerzy Beta ~
Ayene
---------------
~ Szczególne podziękowania ~
Dziękuję Twórcy niniejszego skryptu :P
---------------
~ Strona wsparcia ~
http://www.ultimateam.pl
---------------
_END_
# Koniec edycji
#==============================================================================
def main
@sprite = Sprite.new
@backgroundList = [CREDITS_BACK]
@backgroundGameFrameCount = 0
@backgroundG_BFrameCount = 3.4
@sprite.bitmap = Cache.system(@backgroundList[0])
credit_lines = CREDIT.split(/\n/)
credit_bitmap = Bitmap.new(640,32 * credit_lines.size)
credit_lines.each_index do |i|
line = credit_lines[i]
credit_bitmap.font.name = CREDITS_FONT
credit_bitmap.font.size = CREDITS_SIZE
x = 0
credit_bitmap.font.color = CREDITS_OUTLINE
credit_bitmap.draw_text(0 + 1,i * 32 + 1,640,32,line,1)
credit_bitmap.draw_text(0 - 1,i * 32 + 1,640,32,line,1)
credit_bitmap.draw_text(0 + 1,i * 32 - 1,640,32,line,1)
credit_bitmap.draw_text(0 - 1,i * 32 - 1,640,32,line,1)
credit_bitmap.font.color = CREDITS_SHADOW
credit_bitmap.draw_text(0,i * 32 + 8,640,32,line,1)
credit_bitmap.font.color = CREDITS_FILL
credit_bitmap.draw_text(0,i * 32,640,32,line,1)
end
@credit_sprite = Sprite.new(Viewport.new(0,25,640,380))
@credit_sprite.bitmap = credit_bitmap
@credit_sprite.z = 9998
@credit_sprite.oy = -430
@frame_index = 0
@last_flag = false
Audio.me_stop
Audio.bgs_stop
Audio.se_stop
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@sprite.dispose
@credit_sprite.dispose
end
def last?
return (@frame_index >= @credit_sprite.bitmap.height + 480)
end
def last
if not @last_flag
@last_flag = true
@last_count = 0
else
@last_count += 1
end
if @last_count >= 300
$scene = Scene_Map.new
end
end
def cancel?
if Input.trigger?(Input::C)
$scene = Scene_Title.new
return true
end
if Input.trigger?(Input::B)
$scene = Scene_Title.new
return true
end
return false
end
def update
@backgroundGameFrameCount = @backgroundGameFrameCount + 1
if @backgroundGameFrameCount >= @backgroundG_BFrameCount
@backgroundGameFrameCount = 0
@backgroundList = @backgroundList << @backgroundList[0]
@backgroundList.delete_at(0)
@sprite.bitmap = Cache.system(@backgroundList[0])
end
return if cancel?
last if last?
@credit_sprite.oy += 1
end
end