25 lines
684 B
C#
25 lines
684 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class SpaceshipDoor : Interactable
|
|
{
|
|
bool IsOpen = false;
|
|
public override void Interact()
|
|
{
|
|
if (!IsOpen)
|
|
{
|
|
Vector3 currentRotation = transform.eulerAngles;
|
|
currentRotation.z += 115;
|
|
transform.eulerAngles = currentRotation;
|
|
IsOpen = true;
|
|
}
|
|
else
|
|
{
|
|
Vector3 currentRotation = transform.eulerAngles;
|
|
currentRotation.z -= 115;
|
|
transform.eulerAngles = currentRotation;
|
|
IsOpen = false;
|
|
}
|
|
}
|
|
}
|