38 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			38 lines
		
	
	
		
			1.1 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();
 | |
|         Vector3 pos = Camera.main.WorldToScreenPoint(transform.position);
 | |
|         GameManager.UIMgr.toolTips.ShowTips(gameObject.name, pos);
 | |
|         ///¸ßÁÁ
 | |
|         if (GameManager.RunModelMgr.ModeType != E_ModeType.Study)
 | |
|         {
 | |
|             _highlight.SetHighlighted(true);
 | |
|         }
 | |
|     }
 | |
|     public override void OnDown()
 | |
|     {
 | |
|         base.OnDown();
 | |
|         if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(itemInfo.toolName, true) == 0)
 | |
|         {
 | |
|             GameManager.PacksackBagMgr.AddOneToolOrMater(itemInfo);
 | |
|             GameManager.UIMgr.toolTips.HideTips();
 | |
|             Destroy(gameObject);
 | |
|         }
 | |
|     }
 | |
| 
 | |
|     public override void OnExit()
 | |
|     {
 | |
|         GameManager.UIMgr.toolTips.HideTips();
 | |
|         base.OnExit();
 | |
|         if (GameManager.RunModelMgr.ModeType != E_ModeType.Study)
 | |
|             _highlight.SetHighlighted(false);
 | |
|     }
 | |
| }
 |