rev, v0.3

This commit is contained in:
2026-02-03 02:35:27 +05:30
parent aedb4f0e96
commit 803e186bcc
16 changed files with 647 additions and 17 deletions
+15
View File
@@ -10,6 +10,21 @@ public class Goal : MonoBehaviour
Ball ball = collision.gameObject.GetComponent<Ball>();
Debug.Log(ball.name);
GameManager.instance.OnGoal(team);
}else if(collision.gameObject.CompareTag("Puck")){
Debug.Log("Puck goal", gameObject);
Puck puck = collision.gameObject.GetComponent<Puck>();
Debug.Log(puck.name);
puck.ScheduleReset();
}
}
void OnTriggerExit2D(Collider2D collision)
{
if(collision.gameObject.CompareTag("Puck")){
Debug.Log("Puck exit goal", gameObject);
Puck puck = collision.gameObject.GetComponent<Puck>();
Debug.Log(puck.name);
puck.UnscheduleReset();
}
}
}