MOD!
This commit is contained in:
@@ -1,11 +1,8 @@
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.UI;
|
||||
using Sirenix.OdinInspector;
|
||||
using SoulliesFramework.General;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace Continentis.MainGame
|
||||
{
|
||||
@@ -15,7 +12,8 @@ namespace Continentis.MainGame
|
||||
|
||||
public Camera combatCamera;
|
||||
public Camera uiCamera;
|
||||
public DeckPage deckPage;
|
||||
public CombatMainPage combatMainPage;
|
||||
public InformationPage informationPage;
|
||||
public HUDPage hudPage;
|
||||
public ArrowsPage arrowsPage;
|
||||
}
|
||||
@@ -34,12 +32,22 @@ namespace Continentis.MainGame
|
||||
{
|
||||
ManageCharacterViews();
|
||||
}
|
||||
|
||||
public bool IsNoOtherUIPageOpen()
|
||||
{
|
||||
return uiPageList.Count == 1 && uiPageList.Contains(combatMainPage);
|
||||
}
|
||||
}
|
||||
|
||||
public partial class CombatUIManager
|
||||
{
|
||||
private void ManageCharacterViews()
|
||||
{
|
||||
if (!IsNoOtherUIPageOpen())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Ray ray = combatCamera.ScreenPointToRay(Mouse.current.position.ReadValue());
|
||||
|
||||
if (Physics.Raycast(ray, out RaycastHit hit, 2048, LayerMask.GetMask("Combat")))
|
||||
@@ -50,9 +58,17 @@ namespace Continentis.MainGame
|
||||
|
||||
if (Mouse.current.leftButton.wasPressedThisFrame)
|
||||
{
|
||||
selectingCharacterView?.hudContainer.DisableHUD("SelectingDot");
|
||||
selectingCharacterView = hoveringCharacterView;
|
||||
selectingCharacterView.hudContainer.EnableHUD("SelectingDot");
|
||||
if (hoveringCharacterView == selectingCharacterView)
|
||||
{
|
||||
informationPage.characterInformationPanel.Show();
|
||||
informationPage.characterInformationPanel.Initialize(hoveringCharacterView.character);
|
||||
}
|
||||
else
|
||||
{
|
||||
selectingCharacterView?.hudContainer.DisableHUD("SelectingDot");
|
||||
selectingCharacterView = hoveringCharacterView;
|
||||
selectingCharacterView.hudContainer.EnableHUD("SelectingDot");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user