コード例 #1
0
 public override void Exit()
 {
     base.Exit();
     dagger.ResetPhysics();
     dagger.item.mainCollisionHandler.OnCollisionStartEvent -= CollisionEvent;
     whooshEffect.End();
     dagger.DeleteJoint();
     dagger.ResetDaggerCollisions();
 }
コード例 #2
0
        protected IEnumerator BubbleCoroutine(float duration)
        {
            bubbleActive = true;
            StopCapture();
            EffectInstance bubbleEffect = null;

            if (bubbleEffectData != null)
            {
                bubbleEffect = bubbleEffectData.Spawn(captureTrigger.transform.position, Quaternion.identity, null, null, true, Array.Empty <Type>());
                bubbleEffect.SetIntensity(0f);
                bubbleEffect.Play(0);
            }
            yield return(new WaitForFixedUpdate());

            StartCapture(0f);
            captureTrigger.transform.SetParent(null);
            float startTime = Time.time;

            while (Time.time - startTime < duration)
            {
                if (!captureTrigger)
                {
                    yield break;
                }
                float num = bubbleScaleCurveOverTime.Evaluate((Time.time - startTime) / duration);
                captureTrigger.SetRadius(num * bubbleEffectMaxScale * 0.5f);
                if (bubbleEffect != null)
                {
                    bubbleEffect.SetIntensity(num);
                }
                yield return(null);
            }
            if (bubbleEffect != null)
            {
                bubbleEffect.End(false, -1f);
            }
            StopCapture();
            bubbleActive = false;
            yield break;
        }
コード例 #3
0
 private void OnDestroy()
 {
     _ragdollPart.rb.isKinematic = false;
     _ragdollGripEffect.End();
     StopAllCoroutines();
 }
コード例 #4
0
 private void OnDisable()
 {
     effectInstance.End();
     loaded = false;
 }