37 lines
663 B
C#
37 lines
663 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Hover : MonoBehaviour
|
|
{
|
|
|
|
Material material;
|
|
Color color;
|
|
Outline outline;
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
material = GetComponent<Renderer>().material;
|
|
color = material.color;
|
|
outline = gameObject.GetComponent<Outline>();
|
|
outline.enabled = false;
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
public void HoverStart()
|
|
{
|
|
outline.enabled = true;
|
|
}
|
|
|
|
public void HoverEnd()
|
|
{
|
|
outline.enabled = false;
|
|
}
|
|
}
|