[ruby]#-------------------------------------------------------------------------------
# Viewport_Waffen1
#-------------------------------------------------------------------------------
class Viewport_Waffen1 < Viewport
def initialize()
@viewport1 =
Viewport.new(320, 240, 640, 480)
grafiken_laden
end
#-----------------------------------------------------------------------------
#Grafiken einblenden
#-----------------------------------------------------------------------------
def grafiken_laden
# Hintergrund
@BG =
Sprite.new@BG.bitmap = RPG::Cache.picture("W-M-BG") #öffnet das bild
@BG.x = 178 #x coordinate
@BG.y = 82 #y coordinate
# Charanzeige
@C =
Sprite.new@C.bitmap = RPG::Cache.picture("WP-C_1") #öffnet das bild
@C.x = 412 - (@C.bitmap.width / 2) #x coordinate
@C.y = 91 - (@C.bitmap.height / 2) #y coordinate
# Auswahl 1
@B1 =
Sprite.new@B1.bitmap = RPG::Cache.picture("W1-B1_A") #öffnet das bild
@B1.x = 240 - (@B1.bitmap.width / 2) #x coordinate
@B1.y = 162 - (@B1.bitmap.height / 2) #y coordinate
# Auswahl 2
@B2 =
Sprite.new@B2.bitmap = RPG::Cache.picture("W1-B2_nA") #öffnet das bild
@B2.x = 240 - (@B2.bitmap.width / 2) #x coordinate
@B2.y = 250 - (@B2.bitmap.height / 2) #y coordinate
# Auswahl 3
@B3 =
Sprite.new@B3.bitmap = RPG::Cache.picture("W1-B3_nA") #öffnet das bild
@B3.x = 240 - (@B3.bitmap.width / 2) #x coordinate
@B3.y = 338 - (@B3.bitmap.height / 2) #y coordinate
# Auswahl 4
@B4 =
Sprite.new@B4.bitmap = RPG::Cache.picture("W1-B4_nA") #öffnet das bild
@B4.x = 240 - (@B4.bitmap.width / 2) #x coordinate
@B4.y = 426 - (@B4.bitmap.height / 2) #y coordinate
end
def grafikupdate
case $waffe
when 0 then
@B1.bitmap = RPG::Cache.picture("W1-B1_A")
@B2.bitmap = RPG::Cache.picture("W1-B2_nA")
@B4.bitmap = RPG::Cache.picture("W1-B4_nA")
when 1 then
@B1.bitmap = RPG::Cache.picture("W1-B1_nA")
@B2.bitmap = RPG::Cache.picture("W1-B2_A")
@B3.bitmap = RPG::Cache.picture("W1-B3_nA")
when 2 then
@B2.bitmap = RPG::Cache.picture("W1-B2_nA")
@B3.bitmap = RPG::Cache.picture("W1-B3_A")
@B4.bitmap = RPG::Cache.picture("W1-B4_nA")
when 3 then
@B1.bitmap = RPG::Cache.picture("W1-B1_nA")
@B3.bitmap = RPG::Cache.picture("W1-B3_nA")
@B4.bitmap = RPG::Cache.picture("W1-B4_A")
end
end
def waffe
end
end