Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //////////////////////
- //CREATION EVENT
- //////////////////////
- //Timer for animations
- timer=0
- //Activation variables
- init[0]=false
- init[1]=false
- //Deactivation variables
- deactivate[0]=false
- //Set window init size
- winW=640
- winH=480
- //Load video
- videoFile="video.mp4"
- video=video_open(videoFile)
- video_enable_loop(false)
- //Resize surface
- surface_resize(application_surface,winW,winH)
- //////////////////////
- //STEP EVENT
- //////////////////////
- if keyboard_check_pressed(ord("R"))
- {
- game_restart()
- }
- window_set_size(winW,winH)
- surface_resize(application_surface,winW,winH)
- window_center()
- //Animation of window
- timer++
- if timer>10 and init[0]=false
- {
- init[0]=true
- }
- if init[0]=true and winH>360 and deactivate[0]=false
- {
- winH--
- }
- if timer>60*3
- {
- init[1]=true
- deactivate[0]=true
- }
- if init[1]=true
- {
- if winH<540
- {
- winH+=1.1
- }
- if winW<960
- {
- winW+=2
- }
- }
- if timer>60*6
- {
- winW=960
- winH=540
- }
- //////////////////////
- //DRAW GUI EVENT
- //////////////////////
- //Test sprite
- draw_sprite(sprGuide,0,winW/2,winH/2)
- //Video
- var _videoData=video_draw();
- var _videoStatus=_videoData[0];
- if (_videoStatus==0)
- {
- var vidWid=960 /2
- var vidHei=540 /2
- draw_surface(_videoData[1],(winW/2)-vidWid,(winH/2)-vidHei)
- }
- //Debug
- draw_set_color(c_black)
- draw_text(10,100,"H "+string(winH))
- draw_text(10,130,"W "+string(winW))
- draw_text(10,160,"Placeholder video loaded: "+string(videoFile))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement