public override void OnEnter() { base.OnEnter(); fsm.Visiblility(false); fsm.finger.DisableControl = true; inProcess = false; }
public override void OnEnter() { base.OnEnter(); fsm.deathEffect.transform.position = fsm.transform.position; fsm.deathEffect.gameObject.SetActive(true); GameManager.Instance.sound.PlayInGameClip(fsm.deathClip); fsm.Visiblility(false); timer = 0f; }
public override void OnEnter() { base.OnEnter(); fsm.transform.position = start; fsm.Visiblility(true); timer = 0f; fsm.anim.SetTrigger("triggerSlice"); }
public override void UpdateState() { base.UpdateState(); if (inBackProcess) //while zooming to new level { if (GameManager.Instance.cam.State == CameraBehaviourState.Static) { GameManager.Instance.level.objContainer.gameObject.SetActive(true); fsm.TranslateState(this, fsm.intoScene); return; } } else if (GameManager.Instance.cam.State == CameraBehaviourState.Static) //zoom to distant is complete { if (delay < 0.2f) { delay += Time.deltaTime; return; } fsm.transform.position = Vector3.Lerp(fsm.transform.position, destiny, Time.deltaTime); journeyLine.lineRenderComponent.EndPos = fsm.transform.position; if (Vector3.Distance(fsm.transform.position, destiny) < 0.2f) //Niba act is complete { if (!inBackProcess && Input.GetMouseButtonDown(0)) //press to go next level { GameManager.Instance.cam.State = CameraBehaviourState.To_InGame; GameManager.Instance.level.OnNewLevelLoad(); fsm.transform.position = new Vector3(GameManager.screenWidth / 2f, GameManager.screenWidth / 4f, 0f); GameManager.Instance.journeyLinesContainer.gameObject.SetActive(false); inBackProcess = true; fsm.Visiblility(false); GameManager.Instance.level.objContainer.gameObject.SetActive(false); } } } }