53 lines
1.0 KiB
C#
53 lines
1.0 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using AibisDream;
|
|
using System.Drawing;
|
|
|
|
public class CrowBarSocket : MonoBehaviour, ISocket
|
|
{
|
|
// Start is called before the first frame update
|
|
public bool IsAvailable { get; set; } = true;
|
|
public Vector2 InsertionPoint => transform.position;
|
|
public GameObject visual;
|
|
|
|
private YarnOption _option;
|
|
|
|
public YarnOption Option
|
|
{
|
|
set => _option = value;
|
|
}
|
|
private void Awake()
|
|
{
|
|
visual.SetActive(false);
|
|
}
|
|
|
|
public void InsertPlug()
|
|
{
|
|
visual.SetActive(true);
|
|
}
|
|
|
|
public void RemovePlug()
|
|
{
|
|
visual.SetActive(false);
|
|
}
|
|
public void DisableSocket()
|
|
{
|
|
gameObject.SetActive(false);
|
|
}
|
|
public void EnableSocket()
|
|
{
|
|
gameObject.SetActive(true);
|
|
}
|
|
|
|
public Vector2 GetPosition()
|
|
{
|
|
return transform.position;
|
|
}
|
|
public void Completed()
|
|
{
|
|
_option?.SelectOption();
|
|
IsAvailable=false;
|
|
}
|
|
}
|