[Feat] 유저 급수에 따라 승급 패널 띄우기
This commit is contained in:
parent
5f0d90c2e9
commit
d28f6895ea
File diff suppressed because it is too large
Load Diff
@ -166,10 +166,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2532369505352383474}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 100}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 702.5, y: -50}
|
||||
m_SizeDelta: {x: 125, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4118141943411122106
|
||||
CanvasRenderer:
|
||||
@ -316,9 +316,9 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1065495919059481877}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 390, y: -15}
|
||||
m_SizeDelta: {x: 200, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2865020893960896922
|
||||
@ -1094,10 +1094,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2532369505352383474}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 100}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 77.5, y: -50}
|
||||
m_SizeDelta: {x: 125, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5540636528606084608
|
||||
CanvasRenderer:
|
||||
@ -2243,10 +2243,10 @@ RectTransform:
|
||||
- {fileID: 4506565100980209622}
|
||||
m_Father: {fileID: 7025881484517604341}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 100}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 400, y: -90}
|
||||
m_SizeDelta: {x: 780, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1607360410943952194
|
||||
MonoBehaviour:
|
||||
@ -2511,10 +2511,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 7025881484517604341}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 30}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 400, y: -155}
|
||||
m_SizeDelta: {x: 780, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4690489332913556376
|
||||
CanvasRenderer:
|
||||
@ -2720,9 +2720,9 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1065495919059481877}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 650, y: -15}
|
||||
m_SizeDelta: {x: 200, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &98188793375981500
|
||||
@ -3181,13 +3181,14 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 7025881484517604341}
|
||||
- component: {fileID: 6603728901104767907}
|
||||
- component: {fileID: 4097404266106883313}
|
||||
m_Layer: 5
|
||||
m_Name: Three Rating Points
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &7025881484517604341
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -3205,10 +3206,10 @@ RectTransform:
|
||||
- {fileID: 8367018354737301970}
|
||||
m_Father: {fileID: 6614054331963984893}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 170}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 400, y: -100}
|
||||
m_SizeDelta: {x: 800, y: 170}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &6603728901104767907
|
||||
MonoBehaviour:
|
||||
@ -3236,6 +3237,20 @@ MonoBehaviour:
|
||||
m_ChildScaleWidth: 0
|
||||
m_ChildScaleHeight: 0
|
||||
m_ReverseArrangement: 0
|
||||
--- !u!114 &4097404266106883313
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5303711059361404208}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0b0154ccfd0151245b4888c822e22bea, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
minusImages: {fileID: 0}
|
||||
plusImage: {fileID: 0}
|
||||
--- !u!1 &5488162415224679620
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -3268,10 +3283,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2532369505352383474}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 100}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 452.5, y: -50}
|
||||
m_SizeDelta: {x: 125, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2816448748075330268
|
||||
CanvasRenderer:
|
||||
@ -3477,10 +3492,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2532369505352383474}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 100}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 327.5, y: -50}
|
||||
m_SizeDelta: {x: 125, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2221118145455996476
|
||||
CanvasRenderer:
|
||||
@ -4179,10 +4194,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2532369505352383474}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 100}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 577.5, y: -50}
|
||||
m_SizeDelta: {x: 125, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6020501535534368628
|
||||
CanvasRenderer:
|
||||
@ -4254,10 +4269,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2532369505352383474}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 100}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 202.5, y: -50}
|
||||
m_SizeDelta: {x: 125, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4324549767182199001
|
||||
CanvasRenderer:
|
||||
@ -4478,13 +4493,9 @@ MonoBehaviour:
|
||||
messageText: {fileID: 1412307801878878688}
|
||||
getPointsText: {fileID: 1412307801878878688}
|
||||
scoreText: {fileID: 0}
|
||||
threePointsImages:
|
||||
- {fileID: 490814496775071743}
|
||||
- {fileID: 2976326593234339023}
|
||||
- {fileID: 3346465087422167722}
|
||||
- {fileID: 3011541220676174156}
|
||||
- {fileID: 5706681935747923223}
|
||||
- {fileID: 4395784248025309626}
|
||||
threePointsIndicator: {fileID: 5303711059361404208}
|
||||
fivePointsIndicator: {fileID: 4543248751749844579}
|
||||
tenPointsIndicator: {fileID: 3584043391917752041}
|
||||
--- !u!1 &7399893248753920001
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -4744,10 +4755,10 @@ RectTransform:
|
||||
- {fileID: 7641647916440417850}
|
||||
m_Father: {fileID: 7025881484517604341}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 40}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 400, y: -20}
|
||||
m_SizeDelta: {x: 780, y: 40}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &2375162444386614812
|
||||
MonoBehaviour:
|
||||
@ -5261,9 +5272,9 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1065495919059481877}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 130, y: -15}
|
||||
m_SizeDelta: {x: 200, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &458574496621589569
|
||||
|
@ -0,0 +1,15 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class RatingPointsController : MonoBehaviour
|
||||
{
|
||||
[SerializeField] Image[] minusImages;
|
||||
[SerializeField] Image[] plusImage;
|
||||
|
||||
private Color32 _minusColor = new Color32(255, 0, 0, 255);
|
||||
private Color32 _plusColor = new Color32(34, 87, 255, 255);
|
||||
private Color32 _defaultColor = new Color32(176, 176, 176, 255);
|
||||
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0b0154ccfd0151245b4888c822e22bea
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -188,6 +188,16 @@ public class PanelManager : MonoBehaviour
|
||||
GameManager.Instance.panelManager.OpenShopPanel(shopItems);
|
||||
}
|
||||
|
||||
//승급 패널 생성
|
||||
public void OpenRatingPanel()
|
||||
{
|
||||
if (_canvas != null)
|
||||
{
|
||||
var replayPanelObject = GetPanel("Rating Panel");
|
||||
replayPanelObject.GetComponent<RatingPanelController>().Show();
|
||||
}
|
||||
}
|
||||
|
||||
//코인 패널 코인 갱신
|
||||
public void UpdateCoinsPanelUI(int coinsChanged)
|
||||
{
|
||||
@ -203,7 +213,7 @@ public class PanelManager : MonoBehaviour
|
||||
Debug.Log("코인 패널이 null 입니다.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void RemoveCoinsPanelUI(Action onComplete)
|
||||
{
|
||||
NetworkManager.Instance.DeductCoins((i) =>
|
||||
|
@ -9,37 +9,38 @@ public class RatingPanelController : ConfirmPanelController
|
||||
{
|
||||
[SerializeField] private TMP_Text getPointsText;
|
||||
[SerializeField] private TMP_Text scoreText;
|
||||
[SerializeField] Image[] threePointsImages;
|
||||
[SerializeField] private GameObject threePointsIndicator;
|
||||
[SerializeField] private GameObject fivePointsIndicator;
|
||||
[SerializeField] private GameObject tenPointsIndicator;
|
||||
|
||||
private bool _isWin;
|
||||
private int _requiredPoints;
|
||||
private int _currentPoints;
|
||||
private int _myRating;
|
||||
|
||||
private Color32 _minusColor = new Color32(255, 0, 0, 255);
|
||||
private Color32 _plusColor = new Color32(34, 87, 255, 255);
|
||||
private Color32 _defaultColor = new Color32(176, 176, 176, 255);
|
||||
|
||||
/// <summary>
|
||||
/// 텍스트 초기화, 승급포인트 계산
|
||||
/// </summary>
|
||||
/// <param name="isWin"></param>
|
||||
public void InitRatingPanel(bool isWin)
|
||||
{
|
||||
//network에 스코어 요청
|
||||
_isWin = isWin;
|
||||
_myRating= UserManager.Instance.Rating;
|
||||
if (_myRating >= 10 && _myRating <= 18) {// 10~18급은 3점 필요
|
||||
|
||||
threePointsIndicator.gameObject.SetActive(true);
|
||||
} else if (_myRating >= 5 && _myRating <= 9) {// 5~9급은 5점 필요
|
||||
|
||||
fivePointsIndicator.gameObject.SetActive(true);
|
||||
} else if (_myRating >= 1 && _myRating <= 4) {// 1~4급은 10점 필요
|
||||
|
||||
tenPointsIndicator.gameObject.SetActive(true);
|
||||
tenPointsIndicator.GetComponent<RatingPointsController>();
|
||||
}
|
||||
|
||||
string win = _isWin ? "승리" : "패배";
|
||||
string get = _isWin ? "얻었습니다." : "잃었습니다.";
|
||||
|
||||
getPointsText.text = $"게임에서 {win}했습니다.\n{Constants.RAING_POINTS} 승급 포인트를 {get}";
|
||||
|
||||
//TODO: network에 스코어 요청
|
||||
}
|
||||
|
||||
void Start()
|
||||
|
Loading…
x
Reference in New Issue
Block a user