E_ElecCompetition/Electrical_inspectionCompet.../Assets/Adam/Scripts/ToolModelClick.cs

72 lines
1.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
//============================================================
//支持中文文件使用UTF-8编码
//@author #AUTHOR#
//@create #CREATEDATE#
//@company #COMPANY#
//
//@description:
//============================================================
public enum Attribute
{
/// <summary>
/// 默认
/// </summary>
defaultModel,
/// <summary>
/// 安全工器具
/// </summary>
SafetyToolsAndInstruments,
/// <summary>
/// 工器具
/// </summary>
ToolsAndInstruments
}
public enum RightAndWrong
{
/// <summary>
/// 默认
/// </summary>
defaultModel,
/// <summary>
/// 对
/// </summary>
right,
/// <summary>
/// 错
/// </summary>
wrong
}
public class ToolModelClick : MonoBehaviour
{
public Attribute attribute = Attribute.defaultModel;
public RightAndWrong rightAndWrong = RightAndWrong.defaultModel;
private void OnMouseEnter()
{
}
private void OnMouseDown()
{
if (EventSystem.current.IsPointerOverGameObject())
return;
ToolsItemManager.Instance.CreatToolItem(gameObject);
Destroy(gameObject);
}
private void OnMouseExit()
{
}
}