Initial commit

This commit is contained in:
Thorbjoern
2025-05-26 00:46:28 +02:00
commit e5bca03433
3896 changed files with 1434297 additions and 0 deletions
@@ -0,0 +1,72 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace SojaExiles
{
public class opencloseDoor : MonoBehaviour
{
public Animator openandclose;
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");
openandclose.Play("Opening");
open = true;
yield return new WaitForSeconds(.5f);
}
IEnumerator closing()
{
print("you are closing the door");
openandclose.Play("Closing");
open = false;
yield return new WaitForSeconds(.5f);
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1e8192f35a44301488ec0f072d9a16fe
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,72 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace SojaExiles
{
public class opencloseDoor1 : MonoBehaviour
{
public Animator openandclose1;
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");
openandclose1.Play("Opening 1");
open = true;
yield return new WaitForSeconds(.5f);
}
IEnumerator closing()
{
print("you are closing the door");
openandclose1.Play("Closing 1");
open = false;
yield return new WaitForSeconds(.5f);
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4b5e0617227fa4743be84f23d9e5cb42
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,72 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace SojaExiles
{
public class opencloseStallDoor : MonoBehaviour
{
public Animator openandclose;
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");
openandclose.Play("OpeningStall");
open = true;
yield return new WaitForSeconds(.5f);
}
IEnumerator closing()
{
print("you are closing the door");
openandclose.Play("ClosingStall");
open = false;
yield return new WaitForSeconds(.5f);
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b697b9be3c8d9534ebd171d2b41d6f4f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: