Code: |
#============================================================================== # ■ Scene_Vs_Bar # Pokemon Script Project - Zohran # 02/12/2012 #----------------------------------------------------------------------------- # Scène à ne pas modifier de préférence, sauf si vous savez ce que vous faites #----------------------------------------------------------------------------- class Scene_Vs_Bar def initialize(face, reverse) @face = face @reverse = reverse end def main @spriteset = Spriteset_Map.new @interface = Interface_Echap.new @cadre_joueur = Sprite.new @cadre_joueur.bitmap = Bitmap.new("Graphics/VS Bar/Contour") @cadre_joueur.x = -288 @cadre_joueur.y = 13 + 192/2 - 75/2 @cadre_joueur.z = 5000 @cadre_ennemi = Sprite.new @cadre_ennemi.bitmap = Bitmap.new("Graphics/VS Bar/Contour") @cadre_ennemi.x = 288 @cadre_ennemi.y = 13 + 192/2 - 75/2 @cadre_ennemi.z = 5000 @vs = Sprite.new @vs.bitmap = Bitmap.new("Graphics/VS Bar/VS") @vs.x = 288/2 - 64/2 @vs.y = 13 + 192/2 + 54/4 @vs.visible = false @vs.z = 6000 @joueur = Sprite.new @joueur.bitmap = Bitmap.new("Graphics/VS Bar/Joueur") @joueur.x = -288 @joueur.y = 13 + 192/2 - 75/2 +7 @joueur.z = 5001 @ennemi = Sprite.new @ennemi.bitmap = Bitmap.new("Graphics/VS Bar/Ennemi") @ennemi.x = 288*2 - @ennemi.bitmap.width @ennemi.y = 13 + 192/2 - 75/2 +7 @ennemi.z = 5001 @viewport_joueur = Viewport.new(13, 13 + 192/2 - 75/2 + 7, @joueur.bitmap.width, 63) @viewport_joueur.z = 5002 @action_joueur = Plane.new(@viewport_joueur) @action_joueur.bitmap = Bitmap.new("Graphics/VS Bar/Action") @action_joueur.visible = false @action_joueur.z = 5002 @viewport_ennemi = Viewport.new(288 - 13 - @ennemi.bitmap.width, 13 + 192/2 - 75/2 + 7, @ennemi.bitmap.width, 63) @viewport_ennemi.z = 5002 @action_ennemi = Plane.new(@viewport_ennemi) @action_ennemi.bitmap = Bitmap.new("Graphics/VS Bar/Action") @action_ennemi.visible = false @action_ennemi.z = 5002 @visage_joueur = Sprite.new if $game_variables[11] == 2 @visage_joueur.bitmap = Bitmap.new("Graphics/VS Bar/Héros Fille") else @visage_joueur.bitmap = Bitmap.new("Graphics/VS Bar/Héros Garçon") end @visage_joueur.x = -288 @visage_joueur.y = 13 + 192/2 - 75/2 + 7 @visage_joueur.z = 5003 @visage_ennemi = Sprite.new @visage_ennemi.bitmap = Bitmap.new("Graphics/VS Bar/" + @face) @visage_ennemi.x = 288*2 - @visage_ennemi.bitmap.width @visage_ennemi.y = 13 + 192/2 - 75/2 + 7 @visage_ennemi.color = Color.new(0, 0, 0, 255) @visage_ennemi.z = 5003 @visage_ennemi.mirror = @reverse Graphics.transition loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze @spriteset.dispose @interface.dispose @cadre_joueur.dispose if @cadre_joueur != nil @cadre_ennemi.dispose if @cadre_ennemi != nil @vs.dispose if @vs != nil @joueur.dispose if @joueur != nil @ennemi.dispose if @ennemi != nil @action_joueur.dispose if @action_joueur != nil @action_ennemi.dispose if @action_ennemi != nil @visage_joueur.dispose if @visage_joueur != nil @visage_ennemi.dispose if @visage_ennemi != nil end def update loop do @cadre_joueur.x += 8 @cadre_ennemi.x -= 8 @joueur.x += 16 @ennemi.x -= 16 Graphics.update if @joueur.x >= 13 @joueur.x = 13 @ennemi.x = 288 - 13 - @ennemi.bitmap.width Graphics.update break end end Audio.se_play("Audio/SE/VS Choc") loop do @visage_joueur.x += 8 @visage_ennemi.x -= 8 Graphics.update if @visage_joueur.x >= 13 @visage_joueur.x = 13 @visage_ennemi.x = 288 - 13 - @visage_ennemi.bitmap.width @visage_ennemi.color = Color.new(255, 255, 255, 0) Graphics.update break end end @vs.visible = true @action_joueur.visible = true @action_ennemi.visible = true Audio.se_play("Audio/SE/VS") i = 0 i1 = 0 loop do i += 1 i1 += 1 if i == 8 i = 0 end @action_joueur.ox -= 10 @action_ennemi.ox += 10 if i == 1 @vs.x += 1 end if i == 2 @vs.y += 1 end if i == 3 @vs.x -= 1 end if i == 4 @vs.y -= 1 end if i == 5 @vs.x -= 1 end if i == 6 @vs.y -= 1 end if i == 7 @vs.x += 1 end if i == 8 @vs.y += 1 end Graphics.update if i1 >= 100 @vs.x = 288/2 - 64/2 @vs.y = 13 + 192/2 + 54/4 Graphics.update break end end i = 0 loop do i += 1 @vs.x -= 32 @vs.y -= 20 @vs.zoom_x += 1 @vs.zoom_y += 1 Graphics.update if i >= 70 Graphics.update @fin = true break end end $scene = Scene_Map.new end end |
Doc Emmett Brown a écrit: |
Le script que tu proposes est pour quelle version de PSP ? Parce que tu ne l'as pas précisé ^^ |
Frosties a écrit: |
A noter:Les images raccourcis ne fonctionnent pas. |
Zohran a écrit: |
PSP DS et PSP 5G |
Code: |
[code] [/code] |
Code: |
[code] [/code] |