void HidePopcornAndPresents() { popcornTextureHeight = Screen.height / 2f - popcornTextureHeight / 1.5f; control = StatusIntroControl.HIDE_POPCORN_AND_PRESENTS; CancelInvoke("HidePopcornAndPresents"); }
void Update() { if (control == StatusIntroControl.SHOW_POPCORN) { StartCoroutine(ColorShifter()); if (popcornTexture.width > popcornTextureWidth && popcornTexture.height > popcornTextureHeight) { popcornTextureWidth += Time.deltaTime * speedToPopcorn; popcornTextureHeight += Time.deltaTime * speedToPopcorn * magicNumber; } else { control = StatusIntroControl.SHOW_PRESENTS; } } else if (control == StatusIntroControl.SHOW_PRESENTS) { if (textPresentsHeight > (Screen.height / 1.3f - textPresentsSize.y / 2f)) { textPresentsHeight -= Time.deltaTime * speedToTextPresents; } else { Invoke("HidePopcornAndPresents", 2.5f); } } else if (control == StatusIntroControl.HIDE_POPCORN_AND_PRESENTS) { if (popcornTextureHeight > -popcornTexture.height) { popcornTextureHeight -= Time.deltaTime * speedToTextPresents; textPresentsHeight += Time.deltaTime * speedToTextPresents / 2; } else { Invoke("ShowSPJAM", 0.5f); } } else if (control == StatusIntroControl.SHOW_SPJAM) { if (textInAssociationWithHeight < Screen.height / 2 - gameJamTexture.height / 2f) { textInAssociationWithHeight += Time.deltaTime * speedToTextInAssociationWith; } else { Invoke("HideSPJAM", 2.5f); } } else if (control == StatusIntroControl.HIDE_SPJAM) { if (textInAssociationWithHeight > -textInAssociationWithSize.y) { textInAssociationWithHeight -= Time.deltaTime * speedToTextInAssociationWith; } else { Invoke("ShowTitle", 1.5f); } } else if (control == StatusIntroControl.SHOW_TITLE) { //if (titleTextHeight > -titleTextSize.y) //{ // titleTextHeight -= Time.deltaTime * speedToTitleText; //} //else //{ Invoke("ToWaiting", 1f); //} //StartCoroutine(ColorTitle()); } else if (control == StatusIntroControl.WAITING) { soundObject.GetComponent <SoundManager>().control = SoundControl.OUT; Invoke("ShowMenu", 3.5f); } else if (control == StatusIntroControl.SHOW_MENU) { AutoFade.LoadLevel("Menu", 1.5f, 1.5f, Color.black); } }
void ToWaiting() { control = StatusIntroControl.WAITING; CancelInvoke("ToWaiting"); }
void ShowTitle() { //titleGUIText.enabled = true; control = StatusIntroControl.SHOW_TITLE; CancelInvoke("ShowTitle"); }
void ShowMenu() { control = StatusIntroControl.SHOW_MENU; CancelInvoke("ShowMenu"); }
void HideSPJAM() { control = StatusIntroControl.HIDE_SPJAM; CancelInvoke("HideSPJAM"); }
void ShowSPJAM() { control = StatusIntroControl.SHOW_SPJAM; CancelInvoke("ShowSPJAM"); }