Arena version of Land_Of_Death (KF)

This commit is contained in:
F0rys47
2025-05-30 18:14:48 +02:00
parent 34fb804968
commit 342f85335a
7 changed files with 675153 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 3ac39dab4b05aa540af7a4bbd73b2a5a
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b3e4881967119d54ca5592cf73e2c2e4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,31 @@
using UnityEngine;
public class GateController : MonoBehaviour
{
public Vector3 openOffset = new Vector3(0, 3, 0);
public float openSpeed = 2f;
private Vector3 closedPosition;
private Vector3 targetPosition;
private bool isOpening = false;
void Start()
{
closedPosition = transform.position;
targetPosition = closedPosition;
}
void Update()
{
if (isOpening)
{
transform.position = Vector3.MoveTowards(transform.position, targetPosition, openSpeed * Time.deltaTime);
}
}
public void OpenGate()
{
targetPosition = closedPosition + openOffset;
isOpening = true;
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 3d14f51c2e002824d94d20413bcf42b0

View File

@@ -0,0 +1,22 @@
using UnityEngine;
public class LeverInteraction : MonoBehaviour
{
public GateController gate;
private bool isActivated = false;
void OnMouseDown()
{
if (!isActivated)
{
isActivated = true;
gate.OpenGate();
AnimateLever();
}
}
void AnimateLever()
{
transform.Rotate(-45f, 0f, 0f);
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: e50a6748cf0dce64d9d0ca7a7982889d