void createOllyModel() { GameObject olly = Instantiate(ollyModel, ollyModel.transform.position, Quaternion.identity) as GameObject; NF_OllyAnimations ollyAnim = (NF_OllyAnimations)olly.GetComponent <NF_OllyAnimations>(); ollyAnim.ollyStates = NF_OllyStates.olly_idle; ollyAnim.ollyPeakingOut(); CancelInvoke("createOllyModel"); Invoke("createOllyModel", ollyCreationTime); }
void playIntroAnimation() { GameObject icky = GameObject.Find("Icky_Model"); NF_IckyAnimations ickyAnim = (NF_IckyAnimations)icky.GetComponent <NF_IckyAnimations>(); ickyAnim.IckyIntroAnimation(); GameObject olly = Instantiate(ollyModel, ollyModel.transform.position, Quaternion.identity) as GameObject; olly.transform.position = new Vector3(icky.transform.position.x - 200, icky.transform.position.y + 50, 750); NF_OllyAnimations ollyAnim = (NF_OllyAnimations)olly.GetComponent <NF_OllyAnimations>(); ollyAnim.ollyTweenSequence(-650.0f, 0.0f, NF_OllyStates.olly_walking); }