Neue Räume und Assets hinzugefügt. Alles verkackt und wieder repariert.

This commit is contained in:
Thorbjoern
2025-07-08 20:08:27 +02:00
parent 28cd11c683
commit 5a72292374
2385 changed files with 863054 additions and 20344 deletions
@@ -0,0 +1,56 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TableFlipR: MonoBehaviour {
public Animator FlipR;
public bool open;
public Transform Player;
void Start (){
open = false;
}
void OnMouseOver (){
{
if (Player) {
float dist = Vector3.Distance (Player.position, transform.position);
if (dist < 15) {
if (open == false) {
if (Input.GetMouseButtonDown (0)) {
StartCoroutine (opening ());
}
} else {
if (open == true) {
if (Input.GetMouseButtonDown (0)) {
StartCoroutine (closing ());
}
}
}
}
}
}
}
IEnumerator opening(){
print ("you are opening the door");
FlipR.Play ("Rup");
open = true;
yield return new WaitForSeconds (.5f);
}
IEnumerator closing(){
print ("you are closing the door");
FlipR.Play ("Rdown");
open = false;
yield return new WaitForSeconds (.5f);
}
}