mirror of
https://github.com/ConjureETS/DeathBook.git
synced 2026-03-24 12:30:59 +00:00
45 lines
843 B
C#
45 lines
843 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
|
|
[RequireComponent(typeof(Collider))]
|
|
public class PersonTest : MonoBehaviour
|
|
{
|
|
// Temporary, for test
|
|
private List<FriendshipLink> _links;
|
|
private bool _highlighted = false;
|
|
|
|
void Awake()
|
|
{
|
|
_links = new List<FriendshipLink>();
|
|
}
|
|
|
|
public void AddLink(FriendshipLink link)
|
|
{
|
|
_links.Add(link);
|
|
}
|
|
|
|
void OnMouseOver()
|
|
{
|
|
if (!_highlighted)
|
|
{
|
|
_highlighted = true;
|
|
|
|
foreach (FriendshipLink link in _links)
|
|
{
|
|
link.Highlight(true, 1f);
|
|
}
|
|
}
|
|
}
|
|
|
|
void OnMouseExit()
|
|
{
|
|
_highlighted = false;
|
|
|
|
foreach (FriendshipLink link in _links)
|
|
{
|
|
link.Highlight(false, 1f);
|
|
}
|
|
}
|
|
}
|