using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ToolBase : MonoBehaviour
{
public FlowsBase 流程脚本;
public string 物品名称;
public 物品分类 物品分类;
public 物品状态 物品状态;
//public bool 是否高亮;
///
/// 悬浮时距屏幕的距离
///
public float tooldis;
// public bool 鼠标放上去是否高亮;
public bool 交互完成;
private bool 赋分完成;
#region
private Vector3 orignPos, orignRot;
public Vector3 inHandPos, inHandRot;
// public bool isNotInfinet = false;
#endregion
// Start is called before the first frame update
protected virtual void Start()
{
orignPos = transform.position;
orignRot = transform.eulerAngles;
}
protected virtual void Update()
{
if (交互完成 == true&&赋分完成==false)
{
流程脚本.交互完成计数 += 1;
赋分完成 = true;
}
}
protected virtual void OnMouseEnter()
{
}
protected virtual void OnMouseExit()
{
}
protected virtual void OnMouseDown()
{
}
public virtual void 工具携带()
{
if (物品分类 == 物品分类.工具 && 物品状态 == 物品状态.携带中)
{
gameObject.SetActive(false);
foreach (GameObject obj in UnityEngine.Object.FindObjectsOfType(typeof(GameObject)))//遍历场景中的所有物体
{
if (obj.GetComponent() != null)
{
obj.GetComponent().tool_Objects_Base.Add(obj.GetComponent());
}
}
}
}
///
/// 当拿到手中
///
public virtual void OnBeginUse()
{
}
///
/// 当结束使用
///
public virtual void OnFinishUse()
{
}
///
/// 自定义预留接口
///
public virtual void next()
{
}
}