36 lines
821 B
C#
36 lines
821 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Tool_SelectComponent : BaseToolOrDevice
|
|
{
|
|
public override void OnEnter()
|
|
{
|
|
base.OnEnter();
|
|
///高亮
|
|
_highlight.highlighted = true;
|
|
}
|
|
public override void OnDown()
|
|
{
|
|
base.OnDown();
|
|
if (GameManager.RunModelMgr.SceneType == E_SceneType.ToolRoom)//判断场景
|
|
{
|
|
////放入背包
|
|
if (IsClick)
|
|
{
|
|
//工具名称和工具放入工具框
|
|
GameManager.PacksackBagMgr.AddOneToolOrMater(gameObject.name);
|
|
this.gameObject.SetActive(false);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
public override void OnExit()
|
|
{
|
|
base.OnExit();
|
|
///关闭高亮
|
|
_highlight.highlighted = false;
|
|
}
|
|
}
|