private void InLockInterrupt(YukataAction.AnimeAction act) { if (act == YukataAction.AnimeAction.Damaged) { NextState (State.Noop); } cur.isUpdateCommon = false; }
IEnumerator Start() { bool isReady = false; uiInputControl.OnCharacterSelected += (index) => { yukataIndex = index; isReady = true; }; yield return new WaitUntil (() => isReady); FieldManager.Instance.Initilize (); yukataList.ForEach (y => y.gameObject.SetActive (false)); yukataList [yukataIndex].gameObject.SetActive(true); yukataAction = yukataList [yukataIndex].action; elasticTouch.handler.OnUpdate += OnTouchUpdate; elasticTouch.handler.OnChain += OnChainAction; elasticTouch.handler.OnHold += OnHoldction; elasticTouch.handler.OnRelease += OnReleaseAction; elasticTouch.handler.OnFlicked += OnFlickSlide; uiCameraControl.OnCameraChanged += OnCameraChanged; uiCameraControl.OnCameraForwardUpdate = cameraOperator.ForwardUpdateImmediate; cameraOperator.OnModeChanged += uiCameraControl.UpdateCameraButtons; uiInputControl.OnControlEvent += OnControl; yukataAction.InLockAction += LockAction; yukataAction.OutLockAction += UnlockAction; yukataAction.OnSetTarget = cameraOperator.SetEnemyTarget; yukataAction.DeadHandler += OnGameOver; cameraOperator.SetPlayerTarget (yukataAction.transform); yield return null; uiCameraControl.OnCameraChangeButtonClicked ((int)ElasticCameraOperator.Mode.PlayerTargeting); yukataAction.HpChangeHander += uiHpGauge.SetRate; yukataAction.MpChangeHander += uiMpGauge.SetRate; yukataAction.ForceHpUpdate (); // initialization }
private void LockAction(YukataAction.AnimeAction act) { elasticTouch.SetActive (false); }
private void UnlockAction(YukataAction.AnimeAction act) { elasticTouch.SetActive (true); }
private void OutLockInterrupt(YukataAction.AnimeAction act) { if (act == YukataAction.AnimeAction.Damaged) { NextState (State.Search); } cur.isUpdateCommon = true; }