void OnTriggerEnter2D(Collider2D other) { if (other.name == "Player") { //sfx.PlaySfx (Ding); // normal Running if (!isEnd) { theTextbox.currentLine = startLine; hasActivated = true; theTextbox.ReloadScript(theText, isEnd); if (endLine != 0) { theTextbox.endAtLine = endLine; } if (endLine == 0) { theTextbox.endAtLine = theTextbox.textLines.Length - 1; } } if (isEnd) { align.SetAlign(); theTextbox.ReloadScript(theText, isEnd); } if (UseFader) { fader.IsFaded = false; theTextbox.useFader = true; } else { theTextbox.useFader = false; } if (DestroyWhenActivated) { Destroy(gameObject); } if (FreezePlayer) { endlessPlayer.MovementFreeze(); endlessPlayer.CanMove = false; } if (Monster != null) { Monster.SetActive(true); } } }
void OnTriggerEnter2D(Collider2D other) { if (other.name == "Player") { align.SetAlign(); if (!PlayerData.IsKiller) { theTextbox.currentLine = GoodStart; theTextbox.endAtLine = GoodEnd; } if (PlayerData.IsKiller) { theTextbox.currentLine = BadStart; theTextbox.endAtLine = BadEnd; Set = true; } } }
void OnTriggerEnter2D(Collider2D other) { if (other.name == "Player") { sfx.PlaySfx(Ding); // normal Running if (!isEnd) { theTextbox.currentLine = startLine; theTextbox.ReloadScript(theText, isEnd); hasActivated = true; if (endLine > 0 || IgnoreEndLine) { theTextbox.endAtLine = endLine; } if (endLine == 0 && !IgnoreEndLine) { theTextbox.endAtLine = theTextbox.textLines.Length - 1; } } if (isEnd) { Scene CheckScene = SceneManager.GetActiveScene(); if (CheckScene.name == "Tutorial_Calculation_Portion") { align.SetAlign(); print("AlignmentSet"); } theTextbox.ReloadScript(theText, isEnd); theTextbox.currentLine = startLine; theTextbox.FixEndLine(); } if (UseFader) { fader.IsFaded = false; theTextbox.useFader = true; } else { theTextbox.useFader = false; } if (DestroyWhenActivated) { gameObject.SetActive(false); } if (FreezePlayer) { playerController.MovementFreeze(); playerController.CanMove = false; } if (Monster != null) { Monster.SetActive(true); } } }
void OnTriggerEnter2D(Collider2D other) { if (other.name == "Player") { // normal Running if (!isEnd) { theTextbox.currentLine = startLine; hasActivated = true; theTextbox.ReloadScript(theText, isEnd); if (endLine != 0) { theTextbox.endAtLine = endLine; } if (endLine == 0) { theTextbox.endAtLine = theTextbox.textLines.Length - 1; } } if (isEnd) { align.SetAlign(); theTextbox.ReloadScript(theText, isEnd); if (!PlayerData.IsKiller) { theTextbox.currentLine = GoodStart; theTextbox.endAtLine = GoodEnd; } if (PlayerData.IsKiller) { theTextbox.currentLine = BadStart; theTextbox.endAtLine = BadEnd; } } if (UseFader) { fader.IsFaded = false; theTextbox.useFader = true; } else { theTextbox.useFader = false; } if (DestroyWhenActivated) { Destroy(gameObject); } if (FreezePlayer) { playerController.MovementFreeze(); playerController.CanMove = false; } } }