设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1604|回复: 0
打印 上一主题 下一主题

[已经过期] rpg中 这脚本怎么链接开始游戏?

[复制链接]

Lv1.梦旅人

梦石
0
星屑
240
在线时间
0 小时
注册时间
2010-2-17
帖子
4
跳转到指定楼层
1
发表于 2010-2-21 09:07:51 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
  1. begin
  2.   patch = Win32API.new("1024patch.dll", "start", "p", "i")
  3. rescue RuntimeError
  4.   raise ""
  5. end
  6. if (ret = patch.call("Game")) < 0
  7.   raise ""
  8. end

  9. module RPG
  10.   module Cache
  11.     def self.logo(filename)
  12.       self.load_bitmap("Graphics/Logo/", filename)
  13.     end
  14.   end
  15. end  

  16. class Sprite < ::Sprite
  17.   attr_accessor :透明度
  18.   def initialize(viewport = nil)
  19.     super(viewport)
  20.     @透明度 = :无
  21.   end  
  22. end  

  23. class NS_Ani < RPG::Sprite
  24.   def initialize
  25.     @v = Viewport.new(0,0,1024,768)
  26.     @v.z = 10
  27.     super(@v)
  28.     self.z = 15
  29.     self.bitmap = Bitmap.new(16,16)
  30.     self.ox,self.oy = 8,8
  31.     update
  32.   end
  33.   def ani(x,y,id)
  34.     self.x,self.y = x,y
  35.     animation = $data_animations[id]
  36.     animation(animation, false)
  37.     id = 0
  38.   end  
  39.   def dispose
  40.     super
  41.     @v.dispose
  42.   end  
  43.   def update
  44.     super
  45.   end
  46. end

  47. class Scene_Logo
  48.   def main
  49.     $data_animations    = load_data("Data/Animations.rxdata")
  50.    
  51.     @anis = []
  52.     10.times{@anis << NS_Ani.new}
  53.     @ani_con = []
  54.     10.times{@ani_con << false}
  55.     # 计数
  56.     @count = 0
  57.     # 步骤
  58.     @phase = 0
  59.     # 移动标记
  60.     @move = true
  61.     # 主画面开始标记
  62.     @logo_start = false
  63.     # 移动步骤
  64.     @update_01_phase = 0
  65.     # 等待帧
  66.     @wait = 0
  67.     #
  68.     @frames = [200,100]
  69.     # number
  70.     @number = 0
  71.     # menu_step
  72.     @menu_step = 0
  73.     # aspeed
  74.     @aspeed = 0
  75.     # 装载
  76.     load_bitmap
  77.     set_sprite
  78.     Graphics.transition(80)
  79.     # 主循环
  80.     loop do
  81.       # 刷新游戏画面
  82.       Graphics.update
  83.       # 刷新输入信息
  84.       Input.update
  85.       # 刷新画面
  86.       update
  87.       # 如果画面被切换就中断循环
  88.       if $scene != self
  89.         break
  90.       end
  91.     end
  92.     # 装备过渡
  93.     Graphics.freeze
  94.   end  
  95.   
  96.   def load_bitmap
  97.     @bitmap_black   = RPG::Cache.logo("black.jpg")
  98.     @bitmap_t1      = RPG::Cache.logo("字.png")
  99.     @bitmap_bg_land = RPG::Cache.logo("bg_land.jpg")
  100.     @bitmap_bg_sky  = RPG::Cache.logo("bg_sky.png")
  101.     @bitmap_bg_ff   = RPG::Cache.logo("bg_ff.png")
  102.    
  103.     @people1    = RPG::Cache.logo("1.png")
  104.     @people1max = RPG::Cache.logo("2.png")

  105.     @people2    = RPG::Cache.logo("未标题-1.png")
  106.     @people2max = RPG::Cache.logo("未标题-2.png")
  107.    
  108.     @people3    = RPG::Cache.logo("未标题-3.png")
  109.     @people3max = RPG::Cache.logo("未标题-4.png")
  110.    
  111.     @peoplemax  = RPG::Cache.logo("c2.png")
  112.    
  113.     @evl        = RPG::Cache.logo("c.png")
  114.    
  115.     @white      = RPG::Cache.logo("white.png")
  116.    
  117.     @bitmap_t2  = RPG::Cache.logo("logo.png")
  118.    
  119.     @bitmap_yun1 = RPG::Cache.logo("yun1.png")
  120.     @bitmap_yun2 = RPG::Cache.logo("yun2.png")
  121.     @bitmap_yun2 = RPG::Cache.logo("yun3.png")
  122.    
  123.     @bitmap_light1 = RPG::Cache.logo("line1.png")
  124.     @bitmap_light2 = RPG::Cache.logo("line2.png")
  125.     @bitmap_light3 = RPG::Cache.logo("line3.png")

  126.   end  
  127.   
  128.   def set_sprite

  129.     @s1 = Sprite.new
  130.     @s1.bitmap = @bitmap_black
  131.     @s1.z = 5
  132.    
  133.     @s2 = Sprite.new
  134.     @s2.bitmap = @bitmap_black.clone
  135.     @s2.z = 5
  136.     @s2.y = 384
  137.    
  138.     @s3 = Sprite.new
  139.     @s3.bitmap = @bitmap_t1
  140.     @s3.x,@s3.y,@s3.z = 400,768/[email protected]/2+7,6

  141.     @s_b1 = Sprite.new
  142.     @s_b1.bitmap = @bitmap_bg_land
  143.     @s_b1.x,@s_b1.y,@s_b1.z = 0,768-@s_b1.bitmap.height,0

  144.   end  

  145.   def update
  146.     update_count
  147.     update_move if @move
  148.     update_move_bg if @move_bg != nil
  149.     @anis.each{|n|
  150.       n.update if n.effect?
  151.     }
  152.     case @phase
  153.     when 0   
  154.       update_01
  155.     when 1
  156.       update_02
  157.     when 2
  158.       update_03
  159.     when 3
  160.       update_04
  161.     when 4  
  162.       update_05
  163.     when 5
  164.       update_06
  165.     when 6  
  166.       update_07
  167.     when 7
  168.       update_08
  169.     when 8  
  170.       update_09
  171.     when 9
  172.       update_10
  173.     when 10
  174.       update_11
  175.     when 11  
  176.       update_12
  177.     when 12
  178.       update_13
  179.     end  

  180.   end  

  181.   def update_move
  182.     if @logo_start == true
  183.       @s_b1.x -= 1 if Graphics.frame_count % 2 == 0
  184.     else
  185.       @s_b1.x -= 1
  186.     end
  187.     @s_b1.x = 0 if @s_b1.x == -@s_b1.bitmap.width + 1024
  188.   end
  189.   
  190.   def update_move_bg
  191.     @move_bg.x -= 1 if Graphics.frame_count % 5 == 0
  192.     if @move_bg.x == -(1341)
  193.       @move_bg.x = 0
  194.     end  
  195.   end  
  196.   
  197.   
  198.   def update_count
  199.     if Graphics.frame_count >= 400
  200.       Graphics.frame_reset
  201.       Graphics.frame_count = 0
  202.     end
  203.     @count += 1
  204.     @wait -= 1 if @wait > 0
  205.   end  
  206.   
  207.   def update_01
  208.     case @update_01_phase
  209.     when 0
  210.       @s1.y -= 1
  211.       @s2.y += 1
  212.     when 1
  213.       
  214.     when 2
  215.       @s1.y -= 3
  216.       @s2.y += 3
  217.     end  
  218.    
  219.     if @s1.y == -70
  220.       @update_01_phase = 1
  221.       @phase = 1
  222.     end  
  223.       
  224.   end  
  225.   
  226.   def update_02
  227.     淡出(@s3) if @wait == 0
  228.   end  
  229.   
  230.   def update_03
  231.     淡入(@s3) if @wait == 0
  232.   end  
  233.   
  234.   def update_04
  235.     淡出(@s3) if @wait == 0
  236.     if @wait> 0
  237.       @peple_bg.x -= 1
  238.       @peple_bg.opacity -= 2.5 if @wait < 80
  239.     end  
  240.   end  
  241.   
  242.   def update_05
  243.     淡入(@s3) if @wait == 0
  244.   end  
  245.   
  246.   def update_06
  247.     淡出(@s3) if @wait == 0
  248.     if @wait > 0
  249.       @peple_bg.x += 1
  250.       @peple_bg.opacity -= 2.5 if @wait < 80
  251.     end  
  252.   end  
  253.   
  254.   def update_07
  255.     淡入(@s3) if @wait == 0
  256.   end  
  257.   
  258.   def update_08
  259.     淡出(@s3) if @wait == 0
  260.     if @wait> 0
  261.       @peple_bg.x -= 1
  262.       @peple_bg.opacity -= 2.5 if @wait < 80
  263.     end  
  264.   end  
  265.   
  266.   def update_09
  267.     # 交替图片
  268.     if @s3.x <= -1800
  269.       @s3.bitmap = RPG::Cache.logo("ani01/mc1.png")
  270.       @number = 1
  271.       @s3.x = -350
  272.       @phase += 1
  273.       @wait = 100
  274.     end  
  275.       
  276.     @s3.x -= 10
  277.     if @wait < 100
  278.       @peple_bg.x += 10
  279.     end  
  280.   end
  281.    
  282.   def update_10
  283.     if @number < 14
  284.       @number += 1 if Graphics.frame_count % 2 == 0
  285.       @s3.bitmap = RPG::Cache.logo("ani01/mc"[email protected]_s+".png")
  286.       #if @number == 13
  287.         #Audio.se_play("Audio/SE/se01.WAV")
  288.       #end  
  289.     end

  290.     if @s1.y <= -400
  291.       @s3.bitmap.clear
  292.       @s3.bitmap = @white
  293.       @s3.x,@s3.y = -100,0
  294.       @s3.opacity = 0
  295.       @透明度 = :上升

  296.       # 建立菜单
  297.       @menu_a = Sprite.new
  298.       @menu_a.bitmap = RPG::Cache.logo("menu_a.png")
  299.       @menu_a.x,@menu_a.y,@menu_a.z = 1024,300,7
  300.       @menu_a.opacity = 0
  301.       
  302.       @menu_b = Sprite.new
  303.       @menu_b.bitmap = RPG::Cache.logo("menu_b.png")
  304.       @menu_b.x,@menu_b.y,@menu_b.z = 1024+100,380,7
  305.       @menu_b.opacity = 0
  306.       
  307.       @menu_c = Sprite.new
  308.       @menu_c.bitmap = RPG::Cache.logo("menu_c.png")
  309.       @menu_c.x,@menu_c.y,@menu_c.z = 1024+200,460,7
  310.       @menu_c.opacity = 0

  311.       @menu_d = Sprite.new
  312.       @menu_d.bitmap = RPG::Cache.logo("menu_d.png")
  313.       @menu_d.x,@menu_d.y,@menu_d.z = 1024+300,540,7
  314.       @menu_d.opacity = 0
  315.       
  316.       
  317.       @phase += 1
  318.     end  
  319.    
  320.     case @wait
  321.     when 81..100
  322.       @s3.x += @number + 10
  323.     when 60  
  324.       @s3.x += @number + 20
  325.       @s3.bitmap = RPG::Cache.logo("ani01/mc15.png")

  326.       
  327.       @s_b2 = Sprite.new
  328.       @s_b2.bitmap = @bitmap_bg_sky
  329.       @s_b2.x,@s_b2.y,@s_b2.z = 0,0,1
  330.    
  331.       @s_b3 = Sprite.new
  332.       @s_b3.bitmap = @bitmap_bg_ff
  333.       @s_b3.x,@s_b3.y,@s_b3.z = 0,150,2
  334.       
  335.       # 播放拉开声效
  336.       # Audio.se_play("Audio/SE/se08.WAV")
  337.       
  338.     when 61..80
  339.     else
  340.       @s3.x += @number + 30
  341.       @s1.y -= 6
  342.       @s2.y += 6
  343.     end  
  344.   end  
  345.   
  346.   def update_11
  347.     if @透明度 == :上升
  348.       @s3.opacity += 5
  349.     end
  350.     if @透明度 == :下降
  351.       if @wait == 0
  352.         @s3.opacity -= 5
  353.       end
  354.       if @s3.opacity == 0
  355.         Audio.se_play("Audio/SE/se08.WAV")
  356.         @s3.bitmap = @bitmap_t2
  357.         @s3.x,@s3.y = 280,50
  358.         @s3.opacity = 0
  359.         @phase += 1
  360.       end  
  361.     end
  362.     if @s3.opacity == 255 and @透明度 == :上升
  363.       @wait = 30
  364.       @透明度 = :下降
  365.       @logo_start = true
  366.       # 停止移動
  367.       @move = false
  368.       # 移动背景
  369.       @move_bg = Sprite.new
  370.       @move_bg.bitmap = RPG::Cache.logo("bg_move.png")
  371.       @move_bg.z = 5
  372.     end
  373.   end
  374.   
  375.   def update_12
  376.     @s3.opacity += 5 if @s3.opacity < 255
  377.     if @s3.opacity == 255
  378.       @phase += 1
  379.       @count = 0

  380.       @l1 = Sprite.new
  381.       @l1.bitmap = @bitmap_light1
  382.       @l2 = Sprite.new
  383.       @l2.bitmap = @bitmap_light2
  384.       @l3 = Sprite.new
  385.       @l3.bitmap = @bitmap_light3
  386.       
  387.       @l1.z,@l2.z,@l3.z = 20,20,20
  388.       @l1.opacity,@l2.opacity,@l3.opacity = 0,0,0   
  389.       
  390.       @yun1 = Sprite.new
  391.       @yun1.bitmap = @bitmap_yun1
  392.       @yun2 = Sprite.new
  393.       @yun2.bitmap = @bitmap_yun2
  394.       @yun3 = Sprite.new
  395.       @yun3.bitmap = @bitmap_yun3
  396.       
  397.       @yun1.z,@yun2.z,@yun3.z = 19,19,19
  398.       @yun1.x,@yun1.y = 1024,0
  399.       @yun2.x,@yun2.y = 1700,0
  400.       @yun3.x,@yun3.y = 2200,0

  401.       #Audio.bgm_play("Audio/BGM/music.mp3",100)
  402.       
  403.       @menu_step = 1
  404.       
  405.     end  
  406.   end
  407.    
  408.   def update_13
  409.     update_light
  410.     update_yun
  411.     update_menu

  412.     case @count
  413.     when 1
  414.       #Audio.se_play("Audio/SE/se08.WAV")
  415.       @anis[7].ani(200,400,990)
  416.     when 30
  417.       @anis[8].ani(200,600,988)
  418.     #when 120
  419.       #$@anis[9].ani(200,400,989)
  420.     end  

  421.     if !@anis[7].effect? and @ani_con[7] == false
  422.       @anis[7].ani(430,680,999)
  423.       @ani_con[7] = true
  424.     end
  425.     if !@anis[8].effect? and @ani_con[8] == false and @count >= 30
  426.       @anis[8].ani(770,600,987)
  427.       @ani_con[8] = true
  428.     end
  429. =begin
  430.     if !@anis[9].effect? and @ani_con[9] == false and @count >= 120
  431.       @anis[9].ani(820,240,989)
  432.       @ani_con[9] = true
  433.     end
  434. =end
  435.   end
  436.   
  437.   def update_light
  438.     case @count
  439.     when 20
  440.       @l1.透明度 = :上升
  441.       @l1.x = -200+rand(300)
  442.     when 125
  443.       @l2.透明度 = :上升
  444.       @l2.x = 100+rand(300)
  445.     when 250  
  446.       @l3.透明度 = :上升
  447.       @l3.x = 400+rand(300)
  448.     end

  449.    
  450.     if @l1.透明度 == :上升
  451.       @l1.opacity += 2
  452.       #@l1.x += 0.1
  453.     end
  454.     if @l2.透明度 == :上升
  455.       @l2.opacity += 2
  456.       #@l2.x += 0.1
  457.     end
  458.     if @l3.透明度 == :上升
  459.       @l3.opacity += 2
  460.       #@l3.x += 0.1
  461.     end
  462.    
  463.     if @l1.透明度 == :下降
  464.       @l1.opacity -= 2
  465.       #@l1.x += 0.1
  466.     end
  467.     if @l2.透明度 == :下降
  468.       @l2.opacity -= 2
  469.       #@l2.x += 0.1
  470.     end
  471.     if @l3.透明度 == :下降
  472.       @l3.opacity -= 2
  473.       #@l3.x += 0.1
  474.     end
  475.    
  476.     if @l1.opacity == 255
  477.       @l1.透明度 = :下降
  478.     end
  479.     if @l2.opacity == 255
  480.       @l2.透明度 = :下降
  481.     end
  482.     if @l3.opacity == 255
  483.       @l3.透明度 = :下降
  484.     end
  485.    
  486.     if @l1.opacity == 0 and @count > 250
  487.       @l1.透明度 = :上升
  488.       @l1.x = -200+rand(300)
  489.     end  
  490.     if @l2.opacity == 0 and @count > 250
  491.       @l2.透明度 = :上升
  492.       @l2.x = 100+rand(300)
  493.     end  
  494.     if @l3.opacity == 0 and @count > 250
  495.       @l3.透明度 = :上升
  496.       @l3.x = 400+rand(300)
  497.     end  
  498.    
  499.    
  500.    
  501.   end  
  502.   
  503.   def update_yun
  504.     if Graphics.frame_count % 3 == 0
  505.       @yun1.x -= 1
  506.       @yun2.x -= 1
  507.       @yun3.x -= 1
  508.     end

  509.     @yun1.x = 1024 if @yun1.x <= -700
  510.     @yun2.x = 1700 if @yun1.x <= -800
  511.     @yun3.x = 2200 if @yun1.x <= -600
  512.    
  513.   end
  514.   
  515.   def 淡出(obj)
  516.     if obj.opacity == 0
  517.       case @phase
  518.       when 1
  519.         @wait = 120
  520.         @s3.bitmap = @people1
  521.         @s3.x,@s3.y = 80,200
  522.       when 3
  523.         @wait = 60
  524.         @s3.bitmap = @people2
  525.         @s3.x,@s3.y = 580,200
  526.       when 5  
  527.         @wait = 60
  528.         @s3.bitmap = @people3
  529.         @s3.x,@s3.y = 80,200
  530.       when 7  
  531.         # 左右交替图片
  532.         @wait = 200
  533.         @s3.bitmap =  @peoplemax
  534.         @s3.x,@s3.y = 1024,200
  535.         @s3.opacity = 255
  536.         
  537.         @peple_bg.bitmap = @evl
  538.         @peple_bg.x,@peple_bg.y = -800,339
  539.         @peple_bg.opacity = 255
  540.         
  541.         #Audio.se_play("Audio/SE/se05.wav")
  542.         
  543.       end  
  544.       @phase += 1
  545.     else
  546.       obj.opacity -= 5 if obj.opacity > 0
  547.     end
  548.   end  
  549.   
  550.   def update_menu
  551.     if @menu_step != 0
  552.       @aspeed += 1 if @aspeed <= 30
  553.     end  
  554.    
  555.     case @menu_step
  556.     when 0
  557.       
  558.       
  559.     when 1
  560.       if @menu_a.opacity != 255
  561.         @menu_a.opacity += 5
  562.       end
  563.       
  564.       if @menu_a.x <= 730 and @menu_a.x > 700
  565.         Audio.se_play("Audio/SE/se03.WAV")
  566.       end  
  567.       
  568.       if @menu_a.x <= 700
  569.         @menu_a.x = 700
  570.         if @menu_a.opacity != 255
  571.           @menu_a.opacity += 2
  572.         else
  573.           @menu_step += 1
  574.         end  
  575.       else
  576.         @menu_a.x -= @aspeed
  577.       end  
  578.     when 2
  579.       if @menu_b.opacity != 255
  580.         @menu_b.opacity += 5
  581.       end
  582.       if @menu_b.x <= 730 and @menu_b.x > 700
  583.         Audio.se_play("Audio/SE/se03.WAV")
  584.       end  
  585.       if @menu_b.x <= 700
  586.         @menu_b.x = 700
  587.         @menu_step += 1
  588.       else
  589.         @menu_b.x -= @aspeed
  590.       end  
  591.     when 3
  592.       if @menu_c.opacity != 255
  593.         @menu_c.opacity += 5
  594.       end
  595.       if @menu_c.x <= 730 and @menu_c.x > 700
  596.         Audio.se_play("Audio/SE/se03.WAV")
  597.       end  
  598.       if @menu_c.x <= 700
  599.         @menu_c.x = 700
  600.         @menu_step += 1
  601.       else
  602.         @menu_c.x -= @aspeed
  603.       end
  604.     when 4  
  605.       if @menu_d.opacity != 255
  606.         @menu_d.opacity += 5
  607.       end
  608.       if @menu_d.x <= 730 and @menu_d.x > 700
  609.         Audio.se_play("Audio/SE/se03.WAV")
  610.       end  
  611.       if @menu_d.x <= 700
  612.         @menu_d.x = 700
  613.         @menu_step += 1
  614.         Graphics.frame_reset
  615.         Graphics.frame_count = 0
  616.         @wait = 60
  617.         @random = [60+rand(40),100+rand(40),140+rand(40),180+rand(40),220+rand(40),260+rand(40)]
  618.         @command_index = 0
  619.       else
  620.         @menu_d.x -= @aspeed
  621.       end
  622.     when 5  
  623.       Audio.bgm_play("Audio/BGM/music.mp3",100) if @wait == 1
  624.       update_ani
  625.       update_command
  626.       case @command_index
  627.       when 0
  628.         @menu_a.opacity < 255 ? @menu_a.opacity += 5 : @menu_a.opacity = 255
  629.         @menu_b.opacity > 100 ? @menu_b.opacity -= 5 : @menu_b.opacity = 100
  630.         @menu_c.opacity > 100 ? @menu_c.opacity -= 5 : @menu_c.opacity = 100
  631.         @menu_d.opacity > 100 ? @menu_d.opacity -= 5 : @menu_d.opacity = 100
  632.         
  633.         @menu_a.x > 650 ? @menu_a.x -= 4 : @menu_a.x = 650
  634.         @menu_b.x < 700 ? @menu_b.x += 4 : @menu_b.x = 700
  635.         @menu_c.x < 700 ? @menu_c.x += 4 : @menu_c.x = 700
  636.         @menu_d.x < 700 ? @menu_d.x += 4 : @menu_d.x = 700
  637.         
  638.       when 1
  639.         @menu_b.opacity < 255 ? @menu_b.opacity += 5 : @menu_b.opacity = 255
  640.         @menu_a.opacity > 100 ? @menu_a.opacity -= 5 : @menu_a.opacity = 100
  641.         @menu_c.opacity > 100 ? @menu_c.opacity -= 5 : @menu_c.opacity = 100
  642.         @menu_d.opacity > 100 ? @menu_d.opacity -= 5 : @menu_d.opacity = 100
  643.         
  644.         @menu_b.x > 650 ? @menu_b.x -= 4 : @menu_b.x = 650
  645.         @menu_a.x < 700 ? @menu_a.x += 4 : @menu_a.x = 700
  646.         @menu_c.x < 700 ? @menu_c.x += 4 : @menu_c.x = 700
  647.         @menu_d.x < 700 ? @menu_d.x += 4 : @menu_d.x = 700
  648.         
  649.       when 2
  650.         @menu_c.opacity < 255 ? @menu_c.opacity += 5 : @menu_c.opacity = 255
  651.         @menu_a.opacity > 100 ? @menu_a.opacity -= 5 : @menu_a.opacity = 100
  652.         @menu_b.opacity > 100 ? @menu_b.opacity -= 5 : @menu_b.opacity = 100
  653.         @menu_d.opacity > 100 ? @menu_d.opacity -= 5 : @menu_d.opacity = 100
  654.         
  655.         @menu_c.x > 650 ? @menu_c.x -= 4 : @menu_c.x = 650
  656.         @menu_b.x < 700 ? @menu_b.x += 4 : @menu_b.x = 700
  657.         @menu_a.x < 700 ? @menu_a.x += 4 : @menu_a.x = 700
  658.         @menu_d.x < 700 ? @menu_d.x += 4 : @menu_d.x = 700
  659.         
  660.       when 3
  661.         @menu_d.opacity < 255 ? @menu_d.opacity += 5 : @menu_d.opacity = 255
  662.         @menu_a.opacity > 100 ? @menu_a.opacity -= 5 : @menu_a.opacity = 100
  663.         @menu_b.opacity > 100 ? @menu_b.opacity -= 5 : @menu_b.opacity = 100
  664.         @menu_c.opacity > 100 ? @menu_c.opacity -= 5 : @menu_c.opacity = 100
  665.         
  666.         @menu_d.x > 650 ? @menu_d.x -= 4 : @menu_d.x = 650
  667.         @menu_b.x < 700 ? @menu_b.x += 4 : @menu_b.x = 700
  668.         @menu_c.x < 700 ? @menu_c.x += 4 : @menu_c.x = 700
  669.         @menu_a.x < 700 ? @menu_a.x += 4 : @menu_a.x = 700
  670.       end  
  671.     end  
  672.   end  
  673.   
  674.   def update_command
  675.     @command_index = 3 if @command_index == -1  
  676.     @command_index = 0 if @command_index == 4  
  677.     if Input.repeat?(Input::UP)
  678.       @command_index -= 1# if @command_index != 0
  679.       Audio.se_play("Audio/SE/se03.WAV")
  680.       return
  681.     end
  682.     if Input.repeat?(Input::DOWN)
  683.       @command_index += 1# if @command_index != 3
  684.       Audio.se_play("Audio/SE/se03.WAV")
  685.       return
  686.     end
  687.    
  688.     if Input.trigger?(Input::C)
  689.       if @thelastpic.nil?
  690.         @thelastpic = Sprite.new
  691.         @thelastpic.bitmap = RPG::Cache.logo("msg2.png")
  692.         @thelastpic.opacity = 0
  693.         @thelastpic.z = 99
  694.       end
  695.       begin
  696.         Graphics.update
  697.         @thelastpic.opacity += 5
  698.       end until @thelastpic.opacity == 255
  699.       
  700.       sleep 3
  701.       
  702.       begin
  703.         Graphics.update
  704.         @thelastpic.opacity -= 5
  705.       end until @thelastpic.opacity == 0
  706.       return
  707.     end
  708.   end
  709.   
  710.   def update_ani
  711.     case Graphics.frame_count
  712.     when 0
  713.       @random = [60+rand(40),100+rand(40),140+rand(40),180+rand(40),220+rand(40),260+rand(40)]
  714.     when @random[0]
  715.       @ani_con[7] = false
  716.       @anis[7].ani(200,400,990)
  717.     when @random[1]
  718.       @ani_con[8] = false
  719.       @anis[8].ani(200,600,988)
  720.     when @random[2]
  721.       @ani_con[9] = false
  722.       @anis[9].ani(200,400,989)
  723.     when @random[3]
  724.       @ani_con[5] = false
  725.       @anis[5].ani(200,400,991)
  726.       
  727.     when @random[4]
  728.       @ani_con[4] = false
  729.       @anis[4].ani(200,400,993)
  730.     when @random[5]
  731.       @ani_con[6] = false
  732.       @anis[6].ani(0,400,995)
  733.       
  734.     end  

  735.     if !@anis[7].effect? and @ani_con[7] == false and Graphics.frame_count >= @random[0]
  736.       @anis[7].ani(430,680,999)
  737.       @ani_con[7] = true
  738.     end
  739.     if !@anis[8].effect? and @ani_con[8] == false and Graphics.frame_count >= @random[1]
  740.       @anis[8].ani(770,600,987)
  741.       @ani_con[8] = true
  742.     end
  743.     if !@anis[9].effect? and @ani_con[9] == false and Graphics.frame_count >= @random[2]
  744.       @anis[9].ani(800,232,989)
  745.       @ani_con[9] = true
  746.     end
  747.     if !@anis[5].effect? and @ani_con[5] == false and Graphics.frame_count >= @random[3]
  748.       @anis[5].ani(700,640,992)
  749.       @ani_con[5] = true
  750.     end
  751.     if !@anis[4].effect? and @ani_con[4] == false and Graphics.frame_count >= @random[4]
  752.       @anis[4].ani(820,410,994)
  753.       @ani_con[4] = true
  754.     end
  755.     if !@anis[6].effect? and @ani_con[6] == false and Graphics.frame_count >= @random[5]
  756.       @anis[6].ani(640,400,996)
  757.       @ani_con[6] = true
  758.     end
  759.    
  760.   end  
  761.   
  762.   def 淡入(obj)
  763.     if obj.opacity == 255
  764.       case @phase
  765.       when 2
  766.         @wait = 100
  767.         @peple_bg = Sprite.new
  768.         @peple_bg.bitmap = @people1max
  769.         @peple_bg.x,@peple_bg.y,@peple_bg.z = 300,-98,7
  770.         @peple_bg.opacity = 255
  771.       when 4
  772.         @wait = 100
  773.         @peple_bg.bitmap = @people2max
  774.         @peple_bg.x = 0
  775.         @peple_bg.opacity = 255
  776.       when 6  
  777.         @wait = 100
  778.         @peple_bg.bitmap = @people3max
  779.         @peple_bg.x = 300
  780.         @peple_bg.opacity = 255
  781.       end  
  782.       @phase += 1
  783.     else
  784.       obj.opacity += 5 if obj.opacity < 255
  785.     end
  786.   end  
  787.   

  788. end

复制代码
怎么让这脚本按新游戏图标进入游戏?要修改哪方面?
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-5-22 16:33

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表