void Start() { _uiManager = FindObjectOfType <UIManager>(); shakingCamera = FindObjectOfType <ProCamera2DShake>(); transisiCamera = FindObjectOfType <ProCamera2DTransitionsFX>(); DamageTextManager = FindObjectOfType <UltimateTextDamageManager>(); for (int i = 0; i < hitTrigger.Length; i++) { _hitTrigger.Push(hitTrigger[i]); } }
// Use this for initialization void Start() { shaker = GetComponent <ProCamera2DShake>(); duration = 2.0f; strength = new Vector2(2, 2); vibrato = 10; randomness = 0.1f; initialAngle = -1; rotation = default(Vector3); smoothness = 0.1f; }
private void OnCollisionEnter2D(Collision2D collision) { if (shaker == null) { shaker = ProCamera2D.Instance.GetComponent <ProCamera2DShake>(); } if (collision.relativeVelocity.magnitude > velocityShakeThreshold) { AudioSource.PlayClipAtPoint(impactSingle, transform.position); AudioSource.PlayClipAtPoint(impactAudios.GetRandom(), transform.position); StartCoroutine(ImpactCoroutine(collision.relativeVelocity)); } }
private void Awake() { ProCamera2D = GetComponent <ProCamera2D>(); ProCamera2DShake = GetComponent <ProCamera2DShake>(); }
private void OnValidate() { NumericBoundaries = GetComponent <ProCamera2DNumericBoundaries>(); prcShake = GetComponent <ProCamera2DShake>(); procam = GetComponent <ProCamera2D>(); }