home *** CD-ROM | disk | FTP | other *** search
/ ring.yamanashi.ac.jp/pub/pc/freem/action/ / action.zip / panhumu121.zip / panhumu121 / game / script / logo.dat < prev    next >
Text File  |  2006-04-05  |  1KB  |  74 lines

  1.  
  2. //Åëè·ë╗è╓Éö
  3. function OnInit()
  4. {
  5.     new("isPushButton1",1);
  6.     new("time",0);
  7.     new("maxtime",0);
  8.     new("mode",0);
  9.  
  10.     new("size",0);
  11.     new("alpha",0);
  12.     new("rad",0);
  13.     new("blackout",-1);
  14.  
  15.     LoadTexure("data\opening\rakuda.bmp",0);
  16. }
  17.  
  18. function OnProc()
  19. {
  20.     if(GetKeyData("isButton1") == 1){
  21.         if(isPushButton1 <= 0){
  22.             if(mode<1){
  23.                 mode = 1;
  24.             }
  25.             else{
  26.                 SetData("next","char","1");
  27.             }
  28.         }
  29.         isPushButton1 = 1;
  30.     }
  31.     else{
  32.         isPushButton1 = 0;
  33.     }
  34.  
  35.     time += 1;
  36.     rad = 0.0;
  37.     switch(mode){
  38.         case 0:
  39.             maxtime = 120;
  40.             alpha = 0.25 + time/maxtime*0.75;
  41.             rad = (1-time/maxtime)*360*2;
  42.             size = 256+(1-alpha)*256*2;
  43.             if(time>=maxtime){
  44.                 time = 0;
  45.                 mode = 1;
  46.             }
  47.         break;
  48.         case 1:
  49.             maxtime = 120;
  50.             alpha = 1;
  51.             size = 256;
  52.             if(time>=maxtime){
  53.                 time = 0;
  54.                 mode = 99;
  55.             }
  56.         break;
  57.         case 99:
  58.             maxtime = 60;
  59.             blackout = (time/maxtime);
  60.             size = 256;
  61.             if(time>=maxtime){
  62.                 time = maxtime;
  63.                 SetData("next","char","1");
  64.             }
  65.         break;
  66.     }
  67.  
  68.     DrawTexure(9,320,240,650,500,0.0,0,0,256,256,1,1,1,1,0.5,0.5,0);
  69.     DrawTexure(0,320,240,size,size,rad,0,0,256,256,1,1,1,alpha,0.5,0.5,1);
  70.     if(blackout>=0){
  71.         DrawTexure(9,320,240,650,500,0.0,0,0,256,256,0,0,0,blackout,0.5,0.5,1);
  72.     }
  73. }
  74.