示例#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);
 }