Firstborn/Assets/RPG Creation Kit/Scripts/Looting System/CraftingPoint.cs
Schaken-Mods 959e80cf72 assets upload
assets upload description.
2023-03-28 12:16:30 -05:00

54 lines
1.3 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using RPGCreationKit;
using RPGCreationKit.SaveSystem;
using RPGCreationKit.Player;
using System.Reflection;
using UnityEditor;
namespace RPGCreationKit
{
public class CraftingPoint : MonoBehaviour
{
public bool hasToInitializeInventory = true;
public bool isCrafting;
public string ID;
public string pointName;
public Collider lCollider;
public Animation anim;
public bool isOpened = false;
[Header("Crafting Sounds")]
public AudioClip Using;
[ContextMenu("Regenerate ID")]
public void RegenerateGUIDStr()
{
ID = System.Guid.NewGuid().ToString();
#if UNITY_EDITOR
EditorUtility.SetDirty(this);
#endif
}
public void OpenCloseCrafting() { //not used for anything yet
if (anim == null) {
return;
}
if (!anim.isPlaying) {
if (!isOpened) {
anim.Play("Enter");
isOpened = true;
} else {
anim.Play("Exit");
isOpened = false;
}
}
}
}
}