31 lines
766 B
C#
31 lines
766 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class MainUIBtnManager : MonoBehaviour
|
|
{
|
|
public void OnPointEnter()
|
|
{
|
|
var controller = transform.parent.Find("Description").GetComponent<Animator>();
|
|
if (gameObject.name.Equals("Driver"))
|
|
{
|
|
controller.Play("MainUIDriverBtn");
|
|
}
|
|
else if (gameObject.name.Equals("CoDriver"))
|
|
{
|
|
controller.Play("MainUICoDriverBtn");
|
|
}
|
|
else
|
|
{
|
|
controller.Play("MainUIInfo");
|
|
}
|
|
}
|
|
|
|
public void OnPointExit()
|
|
{
|
|
var controller = transform.parent.Find("Description").GetComponent<Animator>();
|
|
controller.Play("MainUIInfo");
|
|
}
|
|
}
|