(cherry picked from commit 0cc9ddba16)

# Conflicts:
#	3d Prototyp/Assets/Models/Consumables/Bottle.meta
#	3d Prototyp/Assets/Scenes/GameJamScene.unity
This commit is contained in:
Simon Lübeß
2024-04-07 15:46:17 +02:00
parent 5fb4c2d282
commit 0606b1936d
32 changed files with 2657 additions and 440 deletions

View File

@ -0,0 +1,26 @@
using UnityEngine;
namespace Interaction
{
public class CoffeePlace : MonoBehaviour
{
[SerializeField]
private BoxCollider _boxCollider;
public bool IsFree()
{
Collider[] colliders = Physics.OverlapBox(_boxCollider.bounds.center, _boxCollider.bounds.extents);
foreach (Collider c in colliders)
{
// Solbald ein Collider eines Rigidbodies im Weg ist sagen wir, dass wir nichts spawnen können
if (!c.isTrigger && c.attachedRigidbody)
{
return false;
}
}
return true;
}
}
}