Esempio n. 1
0
 public void EndSwing()
 {
     if (currentEffect != null)
     {
         currentEffect.EndSwishEffect();
         currentEffect = null;
     }
 }
Esempio n. 2
0
    public void EndTrail()
    {
        CachedRigidbody2D.collisionDetectionMode = CollisionDetectionMode2D.Discrete;

        if (current_swishEffect != null)
        {
            current_swishEffect.EndSwishEffect();
            current_swishEffect = null;
        }
    }
Esempio n. 3
0
    public void BeginSwing()
    {
        if (currentEffect != null)
        {
            currentEffect.EndSwishEffect();
        }

        SwishEffect effect = GameObject.Instantiate(prefab_swishEffect) as SwishEffect;

        effect.CachedLineRenderer.SetWidth(swishStartWidth, swishEndWidth);

        effect.CachedTransform.SetParent(swish_Bind);
        effect.CachedTransform.localPosition = Vector3.zero;

        effect.SetColor(swishColorStart, swishColorEnd);
        effect.BeginSwishEffect();

        currentEffect = effect;
    }
Esempio n. 4
0
    public void BeginTrail()
    {
        CachedRigidbody2D.collisionDetectionMode = CollisionDetectionMode2D.Continuous;

        bounceCount = 0;

        if (current_swishEffect != null)
        {
            StopAllCoroutines();
            current_swishEffect.EndSwishEffect();
            current_swishEffect = null;
        }

        current_swishEffect = GameObject.Instantiate(prefab_swishEffect) as SwishEffect;

        current_swishEffect.CachedTransform.SetParent(CachedTransform);
        current_swishEffect.CachedTransform.localPosition = Vector3.zero;

        current_swishEffect.CachedLineRenderer.SetWidth(swishStartWidth, swishEndWidth);

        current_swishEffect.BeginSwishEffect();

        StartCoroutine(WaitToKillSwish());
    }