36 lines
748 B
C#
36 lines
748 B
C#
using QuickOutline;
|
|
using UnityEngine;
|
|
[RequireComponent(typeof(Outline))]
|
|
public class Target : MonoBehaviour
|
|
{
|
|
Outline outline;
|
|
public void Init()
|
|
{
|
|
outline = GetComponent<Outline>();
|
|
gameObject.layer = LayerMask.NameToLayer("Target");
|
|
Hide();
|
|
}
|
|
public void Show()
|
|
{
|
|
gameObject.SetActive(true);
|
|
UnFocus();
|
|
}
|
|
public void Hide()
|
|
{
|
|
gameObject.SetActive(false);
|
|
}
|
|
public void UnFocus()
|
|
{
|
|
outline.OutlineColor = new Color(0,1,0);
|
|
}
|
|
public void Focus()
|
|
{
|
|
outline.OutlineColor = new Color(1,1,0);
|
|
}
|
|
public void Execute()
|
|
{
|
|
//todo
|
|
Debug.Log(name+" Success");
|
|
}
|
|
}
|