34 lines
738 B
C#
34 lines
738 B
C#
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using UnityEngine;
|
|||
|
|
|||
|
public class ColorChanger : MonoBehaviour
|
|||
|
{
|
|||
|
public Material NormalMat;
|
|||
|
public Material HighlightMat;
|
|||
|
|
|||
|
// Start is called before the first frame update
|
|||
|
void Start()
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
// Update is called once per frame
|
|||
|
void Update()
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
public void ShowHovering()
|
|||
|
{
|
|||
|
//gameObject.GetComponent<Renderer>().material.EnableKeyword("_EMISSION");
|
|||
|
gameObject.GetComponent<Renderer>().material = HighlightMat;
|
|||
|
}
|
|||
|
|
|||
|
public void EndHovering()
|
|||
|
{
|
|||
|
//gameObject.GetComponent<Renderer>().material.DisableKeyword("_EMISSION");
|
|||
|
gameObject.GetComponent<Renderer>().material = NormalMat;
|
|||
|
}
|
|||
|
}
|