Ejemplo n.º 1
0
    private ShakeNode GetShakeNode(ShakeType shakeType)
    {
        ShakeNode shakeNode = shakeNodes.Find(x => x.ShakeType == shakeType);

        if (shakeNode == null)
        {
            Debug.Log("No shake node exists with ShakeType " + shakeType.ToString() + " exists.");
        }
        return(shakeNodes.Find(x => x.ShakeType == shakeType));
    }
Ejemplo n.º 2
0
    public void ShakeOut(ShakeType shakeType, Action onShakeOutCompleted = null)
    {
        StopShake();

        ShakeNode shakeNode = GetShakeNode(shakeType);

        moveShakeStrengthCoroutine = StartCoroutine(MoveShakeStrength(shakeNode.ShakeOutData, onShakeOutCompleted));
        if (shakeCoroutine == null)
        {
            shakeCoroutine = StartCoroutine(Shake());
        }
    }
Ejemplo n.º 3
0
    public void ShakeInOut(ShakeType shakeType)
    {
        ShakeNode shakeNode = GetShakeNode(shakeType);

        ShakeIn(shakeNode.ShakeInData, () => ShakeOut(shakeNode.ShakeOutData));
    }