24 lines
510 B
C#
24 lines
510 B
C#
using UnityEngine;
|
|
|
|
namespace InterfaceOff
|
|
{
|
|
public class MovingWindow : WindowBase
|
|
{
|
|
private int m_Health = 5;
|
|
|
|
public override void OnWindowInstantiation()
|
|
{
|
|
Components.WindowImage.color = Color.red;
|
|
}
|
|
|
|
public override void OnWindowClicked()
|
|
{
|
|
/* Decreases health and destroys if at 0 */
|
|
m_Health--;
|
|
if (m_Health <= 0)
|
|
{
|
|
Destroy(gameObject);
|
|
}
|
|
}
|
|
}
|
|
} |