Added basic bouncing
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using UnityEngine;
|
||||
using TreeEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace InterfaceOff
|
||||
@@ -6,5 +7,14 @@ namespace InterfaceOff
|
||||
public class WindowComponents : MonoBehaviour
|
||||
{
|
||||
[field: SerializeField] public Image WindowImage { get; private set; }
|
||||
[field: SerializeField] public RectTransform Transform { get; private set; }
|
||||
|
||||
public Rect Rect => new
|
||||
(
|
||||
Transform.position.x - Transform.rect.width / 2,
|
||||
Transform.position.y - Transform.rect.height / 2,
|
||||
Transform.rect.width,
|
||||
Transform.rect.height
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user