Skip to content

Commit

Permalink
Merge pull request #109 from pknu-wap/feature/Battle_VFX
Browse files Browse the repository at this point in the history
Feature/battle vfx
  • Loading branch information
miniron-v authored Jun 6, 2024
2 parents fe4b47f + 238011e commit def4dc6
Show file tree
Hide file tree
Showing 20 changed files with 117,320 additions and 15,747 deletions.
31,512 changes: 16,292 additions & 15,220 deletions Assets/01. Scenes/KDG/Battle VFX.unity

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Assets/01. Scenes/KDG/Battle VFX.unity.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Assets/02. Scripts/Battle/Cards/Card SO/Capture.asset
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ MonoBehaviour:
target: 1
amount: 0
turnCount: 2
effectPrefeb: {fileID: 0}
effectPrefeb: {fileID: 5688369868303141963, guid: 2aea219a0297be045917372e0c19f84e, type: 3}
cost: 3
2 changes: 1 addition & 1 deletion Assets/02. Scripts/Battle/Cards/Card SO/Shield.asset
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ MonoBehaviour:
target: 0
amount: 5
turnCount: 0
effectPrefeb: {fileID: 3675006101537835259, guid: 2e5ad2beaf55e9f4b9c3ebc4a7a2d823, type: 3}
effectPrefeb: {fileID: 599542041415541494, guid: 4e1c92e5f8f548d448d7de72aacbe3d8, type: 3}
cost: 1
2 changes: 1 addition & 1 deletion Assets/02. Scripts/Battle/Cards/Card SO/Stinger.asset
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ MonoBehaviour:
target: 1
amount: 5
turnCount: 0
effectPrefeb: {fileID: 974780746110677456, guid: 4e92b19f1b631424ebacceaa2e68abeb, type: 3}
effectPrefeb: {fileID: 974780746110677456, guid: 15629367e0df1a444b54d0e1dfad4c0e, type: 3}
- type: 6
target: 1
amount: 2
Expand Down
39 changes: 35 additions & 4 deletions Assets/02. Scripts/Battle/UI/StatePanelOpener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,40 @@

public class StatePanelOpener : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
// 스테이터스 패널
[SerializeField] GameObject statePanel;
[SerializeField] Image statePanelImage;

// 타겟록
GameObject targetLock;
Image illust;

// 캔버스
[SerializeField] protected Canvas uiCanvas;

// 마우스 이벤트 블로커
public GameObject mouseEventBlocker;

// [SerializeField] Image statePanelImage;

private void Awake()
{
statePanel = transform.parent.GetChild(0).gameObject;
statePanelImage = statePanel.GetComponent<Image>();
uiCanvas = transform.parent.GetComponent<Canvas>();
mouseEventBlocker = GameObject.Find("Mouse Event Blocker");

// 스테이터스 패널
statePanel = transform.parent.GetChild(0).gameObject;
// statePanelImage = statePanel.GetComponent<Image>();

statePanel.SetActive(false);

uiCanvas = transform.parent.GetComponent<Canvas>();
targetLock = transform.parent.parent.GetChild(0).GetChild(2).gameObject;
illust = transform.parent.parent.GetChild(0).GetChild(0).GetComponent<Image>();
float width = illust.rectTransform.sizeDelta.x;
float height = illust.rectTransform.sizeDelta.y;

targetLock.SetActive(false);

mouseEventBlocker = GameObject.Find("Mouse Event Blocker");
}

public void OnPointerEnter(PointerEventData eventData)
Expand All @@ -39,6 +60,13 @@ public void OnPointerEnter(PointerEventData eventData)
// 패널을 활성화 시킨다.
statePanel.SetActive(true);
}

// 타겟록
if (CardArrow.Instance.gameObject.activeSelf)
{
uiCanvas.sortingOrder = 10;
targetLock.SetActive(true);
}
}

public void OnPointerExit(PointerEventData eventData)
Expand All @@ -55,5 +83,8 @@ public void OnPointerExit(PointerEventData eventData)
uiCanvas.sortingOrder = 0;
// 패널을 비활성화 시킨다.
statePanel.SetActive(false);

// 타겟록
targetLock.SetActive(false);
}
}
2 changes: 1 addition & 1 deletion Assets/03. Prefebs/Battle/Cards/CardBack.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Transform:
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 650, y: -300, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalScale: {x: 2.5, y: 2.5, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
Expand Down
Loading

0 comments on commit def4dc6

Please sign in to comment.