Test Animací - fail
This commit is contained in:
16
3D blobici/Assets/Prefabs/Scripts/CreateEntrances.cs
Normal file
16
3D blobici/Assets/Prefabs/Scripts/CreateEntrances.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class CreateEntrances : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private GameObject wallNorth;
|
||||
[SerializeField] private GameObject wallSouth;
|
||||
[SerializeField] private GameObject wallEast;
|
||||
[SerializeField] private GameObject wallWest;
|
||||
public void SetEntrances(bool northOpen, bool southOpen, bool eastOpen, bool westOpen)
|
||||
{
|
||||
wallNorth.SetActive(!northOpen);
|
||||
wallSouth.SetActive(!southOpen);
|
||||
wallEast.SetActive(!eastOpen);
|
||||
wallWest.SetActive(!westOpen);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0e34ab1157d346043ae8c82fb96ea423
|
||||
13
3D blobici/Assets/Prefabs/Scripts/DoorController.cs
Normal file
13
3D blobici/Assets/Prefabs/Scripts/DoorController.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class DoorController : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Animator doorLAnimator;
|
||||
[SerializeField] private Animator doorRAnimator;
|
||||
|
||||
public void OpenDoor()
|
||||
{
|
||||
doorLAnimator.SetTrigger("Open");
|
||||
doorRAnimator.SetTrigger("Open");
|
||||
}
|
||||
}
|
||||
2
3D blobici/Assets/Prefabs/Scripts/DoorController.cs.meta
Normal file
2
3D blobici/Assets/Prefabs/Scripts/DoorController.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 32247197df65c234298196b8068b3344
|
||||
Reference in New Issue
Block a user