/Scripts/displayCutScene.js
JavaScript | 65 lines | 63 code | 2 blank | 0 comment | 5 complexity | b0d44a63c12d8b69d6877a55be6f7955 MD5 | raw file
1var sceneNum = -1; 2var showCutScene = false; 3var scene1 : Texture; 4var scene2 : Texture; 5var scene3 : Texture; 6var scene4 : Texture; 7var scene5 : Texture; 8var scene6 : Texture; 9var scene7 : Texture; 10var scene8 : Texture; 11var scene9 : Texture; 12 13function Update () 14{ 15 if (Input.GetKeyDown(KeyCode.Return) && showCutScene) 16 { 17 if (sceneNum > 0 && sceneNum < 3) 18 { 19 sceneNum++; 20 } 21 else 22 { 23 showCutScene = false; 24 GameObject.Find("Movement").GetComponent("Tutorial").moveshow = true; 25 } 26 } 27} 28 29function OnGUI() 30{ 31 if (showCutScene) 32 { 33 switch(sceneNum) 34 { 35 case 1: 36 GUI.Box(Rect(0,0,Screen.width, Screen.height), scene1); 37 break; 38 case 2: 39 GUI.Box(Rect(0,0,Screen.width, Screen.height), scene2); 40 break; 41 case 3: 42 GUI.Box(Rect(0,0,Screen.width, Screen.height), scene3); 43 break; 44 case 4: 45 GUI.Box(Rect(0,0,Screen.width, Screen.height), scene4); 46 break; 47 case 5: 48 GUI.Box(Rect(0,0,Screen.width, Screen.height), scene5); 49 break; 50 case 6: 51 GUI.Box(Rect(0,0,Screen.width, Screen.height), scene6); 52 break; 53 case 7: 54 GUI.Box(Rect(0,0,Screen.width, Screen.height), scene7); 55 break; 56 case 8: 57 GUI.Box(Rect(0,0,Screen.width, Screen.height), scene8); 58 break; 59 case 9: 60 GUI.Box(Rect(0,0,Screen.width, Screen.height), scene9); 61 break; 62 default: break; 63 } 64 } 65}