31 lines
805 B
C#
31 lines
805 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class FloorButtonVisualizer : MonoBehaviour
|
|
{
|
|
public Sprite InactiveSprite;
|
|
public Sprite ActiveSprite;
|
|
public bool ActiveState;
|
|
private Image buttonImage;
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
buttonImage = gameObject.GetComponent<Image>();
|
|
}
|
|
|
|
public void Activate()
|
|
{
|
|
this.ActiveState = true;
|
|
buttonImage.sprite = ActiveSprite;
|
|
//Debug.Log("Floorbutton of " + gameObject.name + " activated");
|
|
}
|
|
public void Deactivate()
|
|
{
|
|
this.ActiveState = false;
|
|
buttonImage.sprite = InactiveSprite;
|
|
//Debug.Log("Floorbutton of " + gameObject.name + " deactivated");
|
|
}
|
|
}
|