GQ_Communicate/GQ_TongXin/Assets/Adam/Scripts/UPosItem.cs

44 lines
1010 B
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;
//============================================================
//支持中文文件使用UTF-8编码
//@author #AUTHOR#
//@create #CREATEDATE#
//@company #COMPANY#
//
//@description:
//============================================================
public class UPosItem : MonoBehaviour
{
/// <summary>
/// 是否被占用
/// </summary>
public bool isOccupied = false;
public int ID;
public SpriteRenderer instruct;
[ContextMenu("Set")]
public void SetValue()
{
//instruct = Instantiate(Resources.Load<SpriteRenderer>("Adam/Instruct"), transform);
//DestroyImmediate(transform.GetChild(0).gameObject);
}
private void Start()
{
ID = int.Parse(gameObject.name);
}
/// <summary>
/// 设置颜色
/// </summary>
/// <param name="color"></param>
public void SetInstructColor(Color color)
{
instruct.color = color;
}
}