public void OnPointerUp(PointerEventData eventData) { if (_Holding) { _Holding = false; _BtnRelease.Invoke(); } }
// TODO: stop invoking OnRelease when it's already released public void Release(GlSyncPoint token = null) { if (_glSyncToken != null) { _glSyncToken.Dispose(); } _glSyncToken = token; OnRelease.Invoke(this); }
void Update() { if (OnTouchDown()) { Debug.Log("タップ"); } else { OnRelesed.Invoke(); } }
private IEnumerator ProjectRoutine() { int reCacluateCount = 1; float lastSpeed = 0f; for (float i = 0f; i < ShootingTime; i += Time.deltaTime * Time.timeScale * _Speed) { if (i >= reCacluateCount * 0.5f) { Vector2 nowPosition = _Target.position; Vector2 between = (nowPosition - _LastTargetPoint); reCacluateCount++; __PointD += between; _LastTargetPoint = nowPosition; } Vector3 caculatedCurve = CaculateCurve(Mathf.Min(1f, i / ShootingTime)); lastSpeed = (caculatedCurve - transform.localPosition).magnitude; transform.localPosition = caculatedCurve; if (_ProjectBreak) { break; } yield return(null); } Vector3 dir = (__PointD - __PointC).normalized; while (!_ProjectBreak) { transform.localPosition += dir * lastSpeed; yield return(null); } ReleaseEvent?.Invoke(this); MainCamera.Instance.CameraShake(0.2f, 0.15f); _ReleaseEffect.Play(); _Collider.enabled = false; _Renderer.enabled = false; SoundManager.Instance.Play(_DestroySoundEffect); _PathEffect.Stop(); }
protected void OnReleased() { ReleaseEvent?.Invoke(this, EventArgs.Empty); }
protected void Release() { ReleaseEvent?.Invoke((T)this); }
public async void ExecuteNonQueryAsync(MySqlCommand command) { await command.ExecuteNonQueryAsync(); ReleaseEvent?.Invoke((T)this); }
public void OnRelease(Android.Views.Keycode primaryCode) { ReleaseEvent?.Invoke(primaryCode); }