Add initial game systems and input handling for player interactions

This commit is contained in:
2025-12-09 22:20:38 +01:00
commit 5e0db113aa
182 changed files with 70557 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
using System;
using Core;
using UnityEngine;
namespace Presentation
{
public class Present : MonoBehaviour
{
[SerializeField] private int points = 1;
private PresentSpawner _spawner;
public void Configure(PresentSpawner spawner)
{
_spawner = spawner;
}
private void OnCollisionEnter2D(Collision2D other)
{
if (other.gameObject.CompareTag("Ground"))
{
GameEvents.ReportPresentDropped();
_spawner.ReturnToPool(this);
}
if (other.gameObject.CompareTag("Sleigh"))
{
GameEvents.ReportPresentCaught(points);
_spawner.ReturnToPool(this);
}
}
}
}