Merge branch 'master' into harc

This commit is contained in:
playmaker1210
2023-04-19 10:34:33 +02:00
committed by GitHub
5 changed files with 140 additions and 167 deletions

View File

@@ -9206,6 +9206,7 @@ GameObject:
- component: {fileID: 401176109}
- component: {fileID: 401176108}
- component: {fileID: 401176107}
- component: {fileID: 401176110}
m_Layer: 5
m_Name: TestGomb
m_TagString: Untagged
@@ -9328,6 +9329,18 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 401176105}
m_CullTransparentMesh: 1
--- !u!225 &401176110
CanvasGroup:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 401176105}
m_Enabled: 1
m_Alpha: 1
m_Interactable: 1
m_BlocksRaycasts: 1
m_IgnoreParentGroups: 0
--- !u!1 &410263759
GameObject:
m_ObjectHideFlags: 0

View File

@@ -24,12 +24,12 @@ public class AspectRatioHandler : MonoBehaviour
if(aspectRatio == 1.78 || aspectRatio == 2.33){
if(Application.platform == RuntimePlatform.OSXPlayer)
mainCamera.orthographicSize = 13f; //mac aspect ratio fix???
mainCamera.orthographicSize = 11.5f; //mac aspect ratio fix???
else
mainCamera.orthographicSize = 10.4f; //16:9, 21:9
}else if(aspectRatio == 1.6){
if(Application.platform == RuntimePlatform.OSXPlayer)
mainCamera.orthographicSize = 13f; //mac aspect ratio fix???
mainCamera.orthographicSize = 11.5f; //mac aspect ratio fix???
else
mainCamera.orthographicSize = 11.43f; //16:9, 21:9 //16:10 11.43f
}else if(aspectRatio == 1.33){

View File

@@ -77,7 +77,7 @@ public class jatekmanager : MonoBehaviour
private void Awake()
{
Instance = this;
Instance = this;
mainCanvas.SetActive(false); //helyszin sorsolas animacio miatt
helyszinCanvas.SetActive(false);
@@ -104,10 +104,10 @@ public class jatekmanager : MonoBehaviour
audioManager.Play("BackgroundMusic");
UpdateGameState(GameState.Nev);
#if !UNITY_EDITOR
#if !UNITY_EDITOR
test.SetActive(false);
#endif
#endif
}
public void UpdateGameState(GameState newState)
@@ -160,7 +160,8 @@ public class jatekmanager : MonoBehaviour
//double click
public void Resume(){
public void Resume()
{
pauseMenuUI.SetActive(false);
Time.timeScale = 1f; //normal ido visszainditasa
GameIsPlaying = true;
@@ -168,7 +169,8 @@ public class jatekmanager : MonoBehaviour
Instance.UpdateGameState(previousGameState); //elozo statere menjen vissza
}
public void Pause(){
public void Pause()
{
pauseMenuUI.SetActive(true);
//ido megallitasa hogy megalljon a jatek
Time.timeScale = 0f;
@@ -178,7 +180,8 @@ public class jatekmanager : MonoBehaviour
Instance.UpdateGameState(jatekmanager.GameState.Pause);
}
public void Quit(){
public void Quit()
{
SceneManager.LoadScene("MainMenu");
}
@@ -244,7 +247,8 @@ public class jatekmanager : MonoBehaviour
Debug.Log((upgrade.getUjradobasIndex() + 1) + " ; ennyi dobásod van összesen");
}
private async void HandleUgynokValasztas(){
private async void HandleUgynokValasztas()
{
//kapcsolja ki addig a mezoket amig nem valasztott ugynokcsapat szamot
movement.oneone_Collider.gameObject.SetActive(false);
movement.onetwo_Collider.gameObject.SetActive(false);
@@ -260,14 +264,17 @@ public class jatekmanager : MonoBehaviour
movement.threefour_Collider.gameObject.SetActive(false);
}
public void NevValasztasUtan(){
if(!nev.text.Equals("")){
public void NevValasztasUtan()
{
if (!nev.text.Equals(""))
{
UpdateGameState(GameState.KorKezdet);
//dice.CallRenderDice(true);
}
}
}
private async void HandleUgynokNev(){
private async void HandleUgynokNev()
{
movement.oneone_Collider.gameObject.SetActive(false);
movement.onetwo_Collider.gameObject.SetActive(false);
movement.onethree_Collider.gameObject.SetActive(false);
@@ -293,7 +300,7 @@ public class jatekmanager : MonoBehaviour
helyszinaktivalasBtn.gameObject.SetActive(false);
harc.SetActive(false);
//test.SetActive(false);
rolldice.SetActive(false);
rolldice.SetActive(false);
}
@@ -355,7 +362,8 @@ public class jatekmanager : MonoBehaviour
JatekosVesztett();
}
private void Update() {
private void Update()
{
/*if(jatekosvesztett){
SceneManager.LoadScene("JatekosVesztett");
}
@@ -363,11 +371,15 @@ public class jatekmanager : MonoBehaviour
SceneManager.LoadScene("JatekosNyert");
}*/
if(Input.GetKeyDown(KeyCode.Escape)){
if(GameIsPlaying){
if (Input.GetKeyDown(KeyCode.Escape))
{
if (GameIsPlaying)
{
Pause();
Debug.Log("Game is paused");
}else{
}
else
{
Resume();
Debug.Log("Game is playing");
}
@@ -434,7 +446,7 @@ public class jatekmanager : MonoBehaviour
if (oneone[0].text.Equals("X") && oneone[1].text.Equals("X") && oneone[2].text.Equals("X"))
{
jatekosnyert = true;
}
}
if (movement.jelenlegi_x == 1 && movement.jelenlegi_y == 2)
@@ -516,7 +528,8 @@ public class jatekmanager : MonoBehaviour
}
}
if(jatekosnyert){
if (jatekosnyert)
{
vegpontozas.pontkiiras();
SceneManager.LoadScene("JatekosNyert");
}
@@ -526,7 +539,7 @@ public class jatekmanager : MonoBehaviour
}
}
public void JatekosVesztett()
{
Debug.Log("Játékos vesztésének vizsgálata.");
@@ -793,14 +806,15 @@ public class jatekmanager : MonoBehaviour
}
}
if(jatekosvesztett){
if (jatekosvesztett)
{
vegpontozas.pontkiiras();
SceneManager.LoadScene("JatekosVesztett");
}
else
{
Debug.Log("Jelenleg itt állsz: " + movement.jelenlegi_x + ". sor, " + movement.jelenlegi_y + ". oszlop" );
Debug.Log("Jelenleg itt állsz: " + movement.jelenlegi_x + ". sor, " + movement.jelenlegi_y + ". oszlop");
Debug.Log("A játékos nem vesztett ebben a körben.");
}
}
}
}
}

File diff suppressed because one or more lines are too long