private void Awake() { m_AreaCoroutine = CoroutineHelper.CreateSingleCoroutine(); m_CircleArea = GetComponentInChildren <PostProcess_ScanArea>(); m_CircleAreaCamera = m_CircleArea.GetComponent <Camera>(); TouchInputManager.Instance.SwitchToDualStretch().Init(OnTouchCheck, OnPressCheck); UIT_TouchConsole.InitDefaultCommands(); foreach (var postEffects in GetComponentsInChildren <APostProcessBase>()) { UIT_TouchConsole.NewPage(postEffects.GetType().Name); UIT_TouchConsole.InitSerializeCommands(postEffects, effect => effect.OnValidate()); } }
public void StartDepthScanCircle(Vector3 origin, float radius = 20, float duration = 1.5f) { if (m_ScanCoroutine == null) { m_ScanCoroutine = CoroutineHelper.CreateSingleCoroutine(); } m_ScanCoroutine.Stop(); enabled = true; m_EffectData.m_Origin = origin; m_ScanCoroutine.Start(TIEnumerators.ChangeValueTo((float value) => { m_EffectData.m_Elapse = radius * value; OnValidate(); }, 0, 1, duration, () => { enabled = false; })); }