Exemplo n.º 1
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        ChronoObject chronoObject = collision.GetComponentInParent <ChronoObject>();

        if (chronoObject != null)
        {
            chronoObject.ChangeTimeState(timeModifier);
        }
    }
Exemplo n.º 2
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     Debug.Log("collision");
     Debug.Log(collision.tag);
     if (collision.CompareTag("chrono"))
     {
         ChronoObject chrono = collision.GetComponentInParent <ChronoObject>();
         chrono.ChangeTimeState(timeModifier);
         Destroy(gameObject);
     }
 }