959e80cf72
assets upload description.
54 lines
1.3 KiB
C#
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;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |