public void GoToClickState() { if (!isClicked) { isClicked = true; currentState = clickedState; } }
public void DialogLayout(TextStates textState) { StartCoroutine(fadeIn(3f, 0.8f)); Time.timeScale = 0f; StartCoroutine(MonologueStart(textState)); if (monologeEnd) { Time.timeScale = 1f; StartCoroutine(fadeOut(3f)); } }
public IEnumerator MonologueStart(TextStates textStates, float lenght = 5f) { textManager.currentState = textStates; while (lenght >= 0) { yield return(null); lenght -= Time.deltaTime; } monologeEnd = true; textManager.currentState = TextStates.NoText; }
public void GoToAfterClickState() { CallTransition(); currentState = afterClickState; if (disableOnClick) { this.gameObject.SetActive(false); } else { isClicked = false; } CheckNextState(); }
public void LevelContorl(string enemytag) { if (targetsHit >= numberOfTargets && enemytag == "Enemy") { GameManager.Instance.level1Finished = true; textState = TextStates.level1Finished; LoadText(); } else if (targetsHit >= numberOfTargets && enemytag == "EnemyMovable") { GameManager.Instance.level2Finished = true; textState = TextStates.level2Finished; LoadText(); } }
// Use this for initialization void Start() { text.text = ""; currentState = TextStates.NoText; }
public void ResetText() { this.gameObject.SetActive(true); isClicked = false; currentState = initialState; }
private void Awake() { currentState = TextStates.nothing; }