Exemplo n.º 1
0
    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]);
        }
    }
Exemplo n.º 2
0
    // 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;
    }
Exemplo n.º 3
0
 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));
     }
 }
Exemplo n.º 4
0
 private void Awake()
 {
     ProCamera2D      = GetComponent <ProCamera2D>();
     ProCamera2DShake = GetComponent <ProCamera2DShake>();
 }
Exemplo n.º 5
0
 private void OnValidate()
 {
     NumericBoundaries = GetComponent <ProCamera2DNumericBoundaries>();
     prcShake          = GetComponent <ProCamera2DShake>();
     procam            = GetComponent <ProCamera2D>();
 }