diff --git a/CameraTween.js b/CameraTween.js new file mode 100644 index 0000000..84d30a8 --- /dev/null +++ b/CameraTween.js @@ -0,0 +1,27 @@ +#pragma strict + +var pathName : String = "WormLoop"; +var crawlTime : int = 15; +var Loop : boolean = false; +var cameraMove : boolean = false; +var cameraLookTarget : GameObject; + +function Start () { + if (cameraMove == true) { + iTween.MoveTo(gameObject, + iTween.Hash("path",iTweenPath.GetPath(pathName), + "orienttopath", false, + "looktarget", cameraLookTarget.transform, + "axis","x", + "looktime", 3.0, + "lookahead", 0.05f, + "time", crawlTime, + "easetype", "easeInOutSine")); + } +} + +function Update () { + +} + +//"easetype", iTween.EaseType.easeInOutSine causes strange flip at end of loop. \ No newline at end of file diff --git a/IntroSequence.js b/IntroSequence.js new file mode 100644 index 0000000..be08d4e --- /dev/null +++ b/IntroSequence.js @@ -0,0 +1,20 @@ +#pragma strict + +var PlayerObject : GameObject; +var introCamera : GameObject; +var mainCamera : GameObject; + +var UIscriptName : GameObject; +var UIscriptComponent : fallingUITest; + +function Start () { + UIscriptComponent = UIscriptName.GetComponent(fallingUITest); + UIscriptComponent.HideGUI(); + +} + +function EndIntro () { + PlayerObject.active = true; + introCamera.active = false; + mainCamera.active = true; +}