formatting

This commit is contained in:
klemek
2020-12-19 17:21:06 +01:00
parent 63e8f2c5f6
commit 205a663e07
56 changed files with 1690 additions and 1297 deletions
+18 -18
View File
@@ -6,20 +6,20 @@ using UnityEngine.EventSystems;
namespace UntitledLogicGame.UI
{
public class UIDelete : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
public class UIDelete : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
#region Unity Properties
public SVGImage closedImage;
public SVGImage openImage;
public SVGImage openImage;
#endregion
#endregion
#region Public Properties
#region Public Properties
#endregion
#endregion
#region Private Properties
#region Private Properties
private SVGImage Image
{
@@ -31,23 +31,23 @@ namespace UntitledLogicGame.UI
}
}
private SVGImage _image;
private SVGImage _image;
#endregion
#endregion
#region Unity Methods
#region Unity Methods
public void OnPointerEnter(PointerEventData eventData)
{
public void OnPointerEnter(PointerEventData eventData)
{
Image.sprite = openImage.sprite;
PointerManager.Instance.DeleteOnRelease = true;
}
PointerManager.Instance.DeleteOnRelease = true;
}
public void OnPointerExit(PointerEventData eventData)
{
public void OnPointerExit(PointerEventData eventData)
{
Image.sprite = closedImage.sprite;
PointerManager.Instance.DeleteOnRelease = false;
}
PointerManager.Instance.DeleteOnRelease = false;
}
private void OnEnable()
{
+8 -8
View File
@@ -34,18 +34,18 @@ namespace UntitledLogicGame.UI
#region Private Properties
#endregion
#endregion
#region Unity Methods
#region Unity Methods
#endregion
#endregion
#region Public Methods
#region Public Methods
#endregion
#endregion
#region Private Methods
#region Private Methods
#endregion
}
#endregion
}
}
+32 -32
View File
@@ -7,16 +7,16 @@ using UntitledLogicGame.Workspace.Gates;
namespace UntitledLogicGame.UI
{
public class UIManager : MonoBehaviour
{
#region Unity Properties
public class UIManager : MonoBehaviour
{
#region Unity Properties
[Header("Components")]
public GameObject GateBar;
public GameObject MovingBar;
[Header("Components")]
public GameObject GateBar;
public GameObject MovingBar;
[Header("Prefabs")]
public UIGate UIGatePrefab;
[Header("Prefabs")]
public UIGate UIGatePrefab;
public UIFolder UIFolderPrefab;
#endregion
@@ -33,11 +33,11 @@ namespace UntitledLogicGame.UI
}
}
#endregion
#endregion
#region Private Properties
#region Private Properties
private bool _lastMouseInteracting;
private bool _lastMouseInteracting;
private GateCategory _gateBarState;
private Dictionary<GateCategory, GameObject> _gateBarSateList;
@@ -46,35 +46,35 @@ namespace UntitledLogicGame.UI
#region Unity Methods
private IEnumerator Start()
{
yield return new WaitUntil(() => GameManager.Instance != null);
{
yield return new WaitUntil(() => GameManager.Instance != null);
CreateGateBar();
UpdateUI();
}
private void FixedUpdate()
{
UpdateUI();
private void FixedUpdate()
{
UpdateUI();
}
#endregion
#endregion
#region Public Methods
#region Public Methods
#endregion
#endregion
#region Private Methods
#region Private Methods
private void UpdateUI()
{
if (PointerManager.Instance.Interacting != _lastMouseInteracting)
{
//TODO animate go down
GateBar.SetActive(!PointerManager.Instance.Interacting);
MovingBar.SetActive(PointerManager.Instance.MovingObject);
_lastMouseInteracting = PointerManager.Instance.Interacting;
}
}
private void UpdateUI()
{
if (PointerManager.Instance.Interacting != _lastMouseInteracting)
{
//TODO animate go down
GateBar.SetActive(!PointerManager.Instance.Interacting);
MovingBar.SetActive(PointerManager.Instance.MovingObject);
_lastMouseInteracting = PointerManager.Instance.Interacting;
}
}
private void CreateGateBar()
{
@@ -144,6 +144,6 @@ namespace UntitledLogicGame.UI
_gateBarSateList[category].SetActive(category == GateBarState);
}
#endregion
}
#endregion
}
}
+1 -1
View File
@@ -8,7 +8,7 @@ using UnityEngine.EventSystems;
namespace UntitledLogicGame.UI
{
public class UIToolbarButton : MonoBehaviour, IPointerDownHandler
public class UIToolbarButton : MonoBehaviour, IPointerDownHandler
{
#region Unity Properties