LobbyUI 슬라이드 구조 적용
This commit is contained in:
@@ -50,11 +50,10 @@ namespace TON
|
||||
|
||||
// TODO : Custom Order After System Load
|
||||
// UIManager.Show<IngameUI>(UIList.IngameUI);
|
||||
UIManager.Show<LobbyUI>(UIList.LobbyUI);
|
||||
// UIManager.Show<ControllerUI>(UIList.ControllerUI);
|
||||
UIManager.Show<IngameOptionUI>(UIList.IngameOptionUI);
|
||||
// UIManager.Show<LobbyUI>(UIList.LobbyUI);
|
||||
UIManager.Show<ControllerUI>(UIList.ControllerUI);
|
||||
// UIManager.Show<IngameOptionUI>(UIList.IngameOptionUI);
|
||||
// UIManager.Show<CharaterSelectUI>(UIList.CharaterSelectUI);
|
||||
|
||||
// UIManager.Show<TitleUI>(UIList.TitleUI);
|
||||
}
|
||||
}
|
||||
|
||||
50
Gameton-06/Assets/Gameton/Scripts/UI/SwipeController.cs
Normal file
50
Gameton-06/Assets/Gameton/Scripts/UI/SwipeController.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace TON
|
||||
{
|
||||
public class SwipeController : MonoBehaviour
|
||||
{
|
||||
[SerializeField] int maxPage;
|
||||
|
||||
[SerializeField] int currentPage;
|
||||
[SerializeField] Vector2 targetPos;
|
||||
[SerializeField] Vector2 pageStep;
|
||||
[SerializeField] RectTransform levelPagesRect;
|
||||
[SerializeField] float tweenTime;
|
||||
[SerializeField] LeanTweenType tweenType;
|
||||
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
currentPage = 1;
|
||||
targetPos = levelPagesRect.localPosition;
|
||||
}
|
||||
|
||||
public void Next()
|
||||
{
|
||||
if (currentPage < maxPage)
|
||||
{
|
||||
currentPage++;
|
||||
targetPos += pageStep;
|
||||
MovePage();
|
||||
}
|
||||
}
|
||||
|
||||
public void Previous()
|
||||
{
|
||||
if (currentPage > 1)
|
||||
{
|
||||
currentPage--;
|
||||
targetPos -= pageStep;
|
||||
MovePage();
|
||||
}
|
||||
}
|
||||
|
||||
public void MovePage()
|
||||
{
|
||||
levelPagesRect.LeanMoveLocal(targetPos, tweenTime).setEase(tweenType);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Gameton-06/Assets/Gameton/Scripts/UI/SwipeController.cs.meta
Normal file
11
Gameton-06/Assets/Gameton/Scripts/UI/SwipeController.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2f2a180c175deed42b216234359be860
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -29,6 +29,7 @@ namespace TON
|
||||
// select 요소는 나중에 인게임 화면으로 바로 전환
|
||||
PlayerPrefs.SetInt("SelectedPlayerIndex", 0);
|
||||
PlayerDataManager.Singleton.SetCurrentUserData();
|
||||
HeartDataManager.Singleton.SetCurrentUserHeart();
|
||||
Main.Singleton?.ChangeScene(SceneType.Lobby);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user