/Scripts/displayCutScene.js
http://acid-and-base.googlecode.com/ · JavaScript · 65 lines · 63 code · 2 blank · 0 comment · 5 complexity · b0d44a63c12d8b69d6877a55be6f7955 MD5 · raw file
- var sceneNum = -1;
- var showCutScene = false;
- var scene1 : Texture;
- var scene2 : Texture;
- var scene3 : Texture;
- var scene4 : Texture;
- var scene5 : Texture;
- var scene6 : Texture;
- var scene7 : Texture;
- var scene8 : Texture;
- var scene9 : Texture;
- function Update ()
- {
- if (Input.GetKeyDown(KeyCode.Return) && showCutScene)
- {
- if (sceneNum > 0 && sceneNum < 3)
- {
- sceneNum++;
- }
- else
- {
- showCutScene = false;
- GameObject.Find("Movement").GetComponent("Tutorial").moveshow = true;
- }
- }
- }
- function OnGUI()
- {
- if (showCutScene)
- {
- switch(sceneNum)
- {
- case 1:
- GUI.Box(Rect(0,0,Screen.width, Screen.height), scene1);
- break;
- case 2:
- GUI.Box(Rect(0,0,Screen.width, Screen.height), scene2);
- break;
- case 3:
- GUI.Box(Rect(0,0,Screen.width, Screen.height), scene3);
- break;
- case 4:
- GUI.Box(Rect(0,0,Screen.width, Screen.height), scene4);
- break;
- case 5:
- GUI.Box(Rect(0,0,Screen.width, Screen.height), scene5);
- break;
- case 6:
- GUI.Box(Rect(0,0,Screen.width, Screen.height), scene6);
- break;
- case 7:
- GUI.Box(Rect(0,0,Screen.width, Screen.height), scene7);
- break;
- case 8:
- GUI.Box(Rect(0,0,Screen.width, Screen.height), scene8);
- break;
- case 9:
- GUI.Box(Rect(0,0,Screen.width, Screen.height), scene9);
- break;
- default: break;
- }
- }
- }