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)); }
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()); } }
public void ShakeInOut(ShakeType shakeType) { ShakeNode shakeNode = GetShakeNode(shakeType); ShakeIn(shakeNode.ShakeInData, () => ShakeOut(shakeNode.ShakeOutData)); }