-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:[#117] UI뽑기기능- 뽑기에 성공, 실패 시 뜨는 모달을 만들었습니다.
- Loading branch information
1 parent
3171b2e
commit 7ea2202
Showing
149 changed files
with
4,636 additions
and
7,568 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using UnityEngine.UI; | ||
using TMPro; | ||
|
||
public class GatchaModalUI : MonoBehaviour | ||
{ | ||
private static GatchaModalUI _instance = null; | ||
public static GatchaModalUI instance | ||
{ | ||
get | ||
{ | ||
if (_instance == null) | ||
{ | ||
var obj = GameObject.FindObjectOfType<GatchaModalUI>(); | ||
if (obj != null) | ||
{ | ||
_instance = obj; | ||
} | ||
else | ||
{ | ||
_instance = new GameObject("GatchaModalUI").AddComponent<GatchaModalUI>(); | ||
} | ||
} | ||
return _instance; | ||
} | ||
} | ||
public Image mainImage; | ||
public TextMeshProUGUI characterName; | ||
public TextMeshProUGUI rank; | ||
|
||
void OnDisable() | ||
{ | ||
// 모달 끌 때 갓챠 UI의 골드를 갱신해준다. | ||
GatchaUI.instance.Initialize(DataManager.instance.userInfo); | ||
} | ||
|
||
public void Initialize(Myplamon info) | ||
{ | ||
mainImage.sprite = Resources.Load<Sprite>("Character/Main/" + info.pladex.id.ToString()) as Sprite; | ||
characterName.text = info.pladex.name; | ||
rank.text = "Rank - " + info.pladex.rank; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
unity/NextPlace/Assets/02. Scripts/UI/GatchaModalUI.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using UnityEngine.UI; | ||
using TMPro; | ||
|
||
public class GatchaUI : MonoBehaviour | ||
{ | ||
private static GatchaUI _instance = null; | ||
public static GatchaUI instance | ||
{ | ||
get | ||
{ | ||
if (_instance == null) | ||
{ | ||
var obj = GameObject.FindObjectOfType<GatchaUI>(); | ||
if (obj != null) | ||
{ | ||
_instance = obj; | ||
} | ||
else | ||
{ | ||
_instance = new GameObject("GatchaUI").AddComponent<GatchaUI>(); | ||
} | ||
} | ||
return _instance; | ||
} | ||
} | ||
|
||
public TextMeshProUGUI goldText; | ||
|
||
void OnEnable() | ||
{ | ||
Initialize(DataManager.instance.userInfo); | ||
} | ||
|
||
public void Initialize(UserInfoDataJson info) | ||
{ | ||
goldText.text = info.gold.ToString(); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
132 changes: 132 additions & 0 deletions
132
unity/NextPlace/Assets/04. Images/Buttons/GatchaBtn.png.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.