Added a new moving window type

This commit is contained in:
Pasha Bibko
2026-01-13 11:16:16 +00:00
parent eae7b615d6
commit e235c9e440
9 changed files with 78 additions and 21 deletions

View File

@@ -0,0 +1,25 @@
using UnityEngine;
namespace InterfaceOff
{
public class MovingWindow : WindowBase
{
private int m_Health = 5;
public override void OnWindowInstantiation()
{
Components.WindowImage.color = Color.red;
Velocity = new Vector3(100, 100, 0);
}
public override void OnWindowClicked()
{
/* Decreases health and destroys if at 0 */
m_Health--;
if (m_Health <= 0)
{
Destroy(gameObject);
}
}
}
}