void Start() { //playIntroAnimation(); if (PlayerPrefs.GetInt("isIntro_AnimationDone") != 1) { changeBackground = false; playIntroAnimation(); } else { changeBackground = true; GameObject vine = GameObject.Find("Vine"); NF_VineAnimations vineAnim = (NF_VineAnimations)vine.GetComponent <NF_VineAnimations>(); vineAnim.destroyVine(); GameObject icky = GameObject.Find("Icky_Model"); NF_IckyAnimations ickyAnim = (NF_IckyAnimations)icky.GetComponent <NF_IckyAnimations>(); ickyAnim.setIckyPosition(); ickyAnim.setInitialStateOfIcky(); //load question now getAllComponentsRef(); getInitialSetupFromDM(); } }
void ollyStretchSequence(float yPos) { GameObject vine = GameObject.Find("Vine"); NF_VineAnimations vineAnim = (NF_VineAnimations)vine.GetComponent <NF_VineAnimations>(); vineAnim.animateVineUpwards(); createAnimations(); Vector3 pos = transform.position; pos.y = yPos; currentFrame = 0; iTween.MoveTo(gameObject, iTween.Hash("position", pos, "time", 30.0f / 50.0f, "onComplete", "loadGameControllerInitializer", "oncompletetarget", gameObject, "oncompleteparams", this.gameObject, "easetype", iTween.EaseType.linear)); }