Пример #1
0
 public void OnPointerUp(PointerEventData eventData)
 {
     if (_Holding)
     {
         _Holding = false;
         _BtnRelease.Invoke();
     }
 }
Пример #2
0
 // 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);
 }
Пример #3
0
 void Update()
 {
     if (OnTouchDown())
     {
         Debug.Log("タップ");
     }
     else
     {
         OnRelesed.Invoke();
     }
 }
Пример #4
0
    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();
    }
Пример #5
0
 protected void OnReleased()
 {
     ReleaseEvent?.Invoke(this, EventArgs.Empty);
 }
Пример #6
0
 protected void Release()
 {
     ReleaseEvent?.Invoke((T)this);
 }
Пример #7
0
        public async void ExecuteNonQueryAsync(MySqlCommand command)
        {
            await command.ExecuteNonQueryAsync();

            ReleaseEvent?.Invoke((T)this);
        }
Пример #8
0
 public void OnRelease(Android.Views.Keycode primaryCode)
 {
     ReleaseEvent?.Invoke(primaryCode);
 }