50 lines
1.3 KiB
C#
50 lines
1.3 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Sirenix.OdinInspector;
|
|
using UnityEngine;
|
|
|
|
public class Tool_SelectComponent : BaseToolOrDevice
|
|
{
|
|
public override void OnEnter()
|
|
{
|
|
base.OnEnter();
|
|
GameManager.UIMgr.ShowPanel<ItemTips>(E_UI_Layer.System, (panel) =>
|
|
{
|
|
panel.Init(gameObject.name);
|
|
});
|
|
///高亮
|
|
_highlight.highlighted = true;
|
|
}
|
|
public override void OnDown()
|
|
{
|
|
base.OnDown();
|
|
////放入背包
|
|
//工具名称和工具放入工具框
|
|
|
|
if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(itemInfo.triggerID, true) == 0)
|
|
{
|
|
GameManager.PacksackBagMgr.AddOneToolOrMater(itemInfo);
|
|
_highlight.highlighted = false;
|
|
gameObject.SetActive(false);
|
|
GameManager.UIMgr.HidePanel<ItemTips>();//提示面板
|
|
}
|
|
}
|
|
|
|
public override void OnExit()
|
|
{
|
|
///关闭高亮
|
|
base.OnExit();
|
|
_highlight.highlighted = false;
|
|
GameManager.UIMgr.HidePanel<ItemTips>();//提示面板
|
|
}
|
|
|
|
[Button]
|
|
public void TestAddOne()
|
|
{
|
|
GameManager.PacksackBagMgr.AddOneToolOrMater(itemInfo);
|
|
_highlight.highlighted = false;
|
|
gameObject.SetActive(false);
|
|
GameManager.UIMgr.HidePanel<ItemTips>();//提示面板
|
|
}
|
|
}
|