login wip, before adding g login

This commit is contained in:
2023-02-17 15:12:08 +05:30
parent 0305a891e4
commit a2c0383433
7 changed files with 5265 additions and 158 deletions

View File

@@ -199,7 +199,7 @@ public class GameManager : MonoBehaviour
public void UpdateUI(){
if(Score != _tempScore){
LeanTween.scale(ScoreTxt.gameObject, ScoreTxt.transform.localScale * 1.5f * (Score - _tempScore), 0.5f).setEasePunch();
LeanTween.scale(ScoreTxt.gameObject, ScoreTxt.transform.localScale * 1.5f , 0.5f).setEasePunch();
_tempScore = Score;
}

View File

@@ -4,6 +4,19 @@ using UnityEngine;
public class MainMenu : MonoBehaviour
{
public GameObject MainMenuPanel;
public GameObject SettingsPanel;
public float transitionTime;
public LeanTweenType transitionEffect;
private Vector2 defaultCenter;
void Awake(){
defaultCenter = MainMenuPanel.transform.position;
SettingsPanel.transform.position = MainMenuPanel.transform.position - new Vector3(3000,0);
SettingsPanel.SetActive(true);
}
public void Leave(){
Application.Quit();
}
@@ -11,4 +24,15 @@ public class MainMenu : MonoBehaviour
void Start(){
// MessageBox.ShowMessage("Welcome to Infinite Golf 2D.\nThis is a slow paced 2d endless golf game, All the levels are proceduraly generated and you will be rewarded for putting the ball in every and each hole.\n\nGood Luck","Welcome");
}
public void SettingsPage(){
LeanTween.moveX(MainMenuPanel, 3000, transitionTime).setEase(transitionEffect);
LeanTween.moveX(SettingsPanel, defaultCenter.x, transitionTime).setEase(transitionEffect);
}
public void MainPage(){
LeanTween.moveX(MainMenuPanel, defaultCenter.x, transitionTime).setEase(transitionEffect);
LeanTween.moveX(SettingsPanel, -3000, transitionTime).setEase(transitionEffect);
}
}