Esempio n. 1
0
    private void ActionCompleteEffect()
    {
        Vector3 effectPosition1 = BoundUtils.GetMinMaxFromBoundVector(moveVector, myCollider.bounds, true, +0.2F);

        effectPosition1 += Vector3.down * Utils.PixelToWorldunits(4);
        Vector3 effectPosition2 = BoundUtils.GetMinMaxFromBoundVector(moveVector, myCollider.bounds, false, -0.2F);

        effectPosition2 += Vector3.down * Utils.PixelToWorldunits(4);
        InstantiateEffect(dustEffect, effectPosition1, BoundUtils.GetEffectRotation(moveVector, false));
        InstantiateEffect(dustEffect, effectPosition2, BoundUtils.GetEffectRotation(moveVector, false));

        actionCompleteEffectPlayed = true;
    }
    private void ActionCompleteEffect()
    {
        if (shakeCam)
        {
            CameraFollow.GetInstance().ShakeSmall();
        }
        Vector3 effectPosition1 = BoundUtils.GetMinMaxFromBoundVector(moveVector, myCollider.bounds, true, +0.2F);
        Vector3 effectPosition2 = BoundUtils.GetMinMaxFromBoundVector(moveVector, myCollider.bounds, false, -0.2F);

        InstantiateEffect(dustEffect, effectPosition1, BoundUtils.GetEffectRotation(moveVector, false));
        InstantiateEffect(dustEffect, effectPosition2, BoundUtils.GetEffectRotation(moveVector, false));

        if (moveVector.y > 0 || moveVector.x != 0)
        {
            Vector3 dustEffectPosition1 = BoundUtils.GetMinMaxFromBoundVector(moveVector, myCollider.bounds, false, +0.2F);
            InstantiateEffect(dustDownEffect, dustEffectPosition1);
            if (moveVector.y > 0)
            {
                Vector3 dustEffectPosition2 = BoundUtils.GetMinMaxFromBoundVector(moveVector, myCollider.bounds, true, +0.2F);
                InstantiateEffect(dustDownEffect, dustEffectPosition2);
            }
        }
    }