1
0

initial commit

This commit is contained in:
LupiNexMedia
2026-04-28 09:32:03 +02:00
commit f84f5c592b
2173 changed files with 376140 additions and 0 deletions
@@ -0,0 +1,26 @@
using UnityEngine;
public class DoorOpener : MonoBehaviour
{
private Animator doorAnimator;
void Start()
{
// Get the Animator component attached to the same GameObject as this script
doorAnimator = GetComponent<Animator>();
}
private void OnTriggerEnter(Collider other)
{
// Check if the object entering the trigger is the player (or another specified object)
if (other.CompareTag("Player")) // Make sure the player GameObject has the tag "Player"
{
if (doorAnimator != null)
{
// Trigger the Door_Open animation
doorAnimator.SetTrigger("Door_Open");
}
}
}
}