dice csere, framerate
This commit is contained in:
@@ -107,7 +107,7 @@ public class Dice : MonoBehaviour {
|
||||
jatekmanager.Instance.UpdateGameState(jatekmanager.GameState.Akcio);
|
||||
}else{
|
||||
//ugynok csapat szama
|
||||
ugynok.UgynokSorsolas(movement.jelenlegi_x, movement.jelenlegi_y, valasztottErtek);
|
||||
ugynok.UgynokSorsolas(movement.jelenlegi_x, movement.jelenlegi_y, valasztottErtek);
|
||||
jatekmanager.Instance.UpdateGameState(jatekmanager.GameState.Akcio);
|
||||
}
|
||||
}
|
||||
@@ -118,15 +118,20 @@ public class Dice : MonoBehaviour {
|
||||
|
||||
if(!ugynokDobasErtek)
|
||||
ap.UpdateAkciopont(getValasztottErtek() + upgrade.akcio[upgrade.getAkcioIndex()]);
|
||||
else
|
||||
else{
|
||||
ugynokDobasErtek = false;
|
||||
setLocked(false);
|
||||
}
|
||||
|
||||
dice1btnBtn.interactable = false;
|
||||
dice2btnBtn.interactable = false;
|
||||
|
||||
if(elsoDobas){
|
||||
/*if(elsoDobas){
|
||||
//jatek kezdeskor elso dobas ugynok csapat meghatarozas kezdo helyszinen
|
||||
jatekmanager.Instance.UpdateGameState(jatekmanager.GameState.UgynokValasztas);
|
||||
CallRenderDice(true);
|
||||
elsoDobas = false;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
Debug.Log("valasztott ertek: " + valasztottErtek + " locked status: " + locked);
|
||||
@@ -262,6 +267,8 @@ public class Dice : MonoBehaviour {
|
||||
//ha vegzett mindennel kapcsolja vissza az ertekvalasztast
|
||||
dice1btnBtn.enabled = true;
|
||||
dice2btnBtn.enabled = true;
|
||||
dice1btnBtn.interactable = true;
|
||||
dice2btnBtn.interactable = true;
|
||||
|
||||
if(!ugynokDobas){ //ha ugynok miatt van dobas ne vonjon le
|
||||
ujradobasszamlalo--;
|
||||
|
||||
@@ -105,13 +105,13 @@ public class jatekmanager : MonoBehaviour
|
||||
|
||||
//hatterzene lejatszas
|
||||
audioManager = FindObjectOfType<AudioManager>();
|
||||
audioManager.Play("BackgroundMusic");
|
||||
//audioManager.Play("BackgroundMusic");
|
||||
|
||||
UpdateGameState(GameState.Nev);
|
||||
|
||||
#if !UNITY_EDITOR
|
||||
#if !UNITY_EDITOR
|
||||
test.SetActive(false);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
public void UpdateGameState(GameState newState)
|
||||
@@ -271,10 +271,10 @@ public class jatekmanager : MonoBehaviour
|
||||
|
||||
public void NevValasztasUtan()
|
||||
{
|
||||
if (!nev.text.Equals(""))
|
||||
if (!nev.text.Equals("") && dice.diceResult[0] == 0) //dice result == 0 ne tudjon tobbszori nev beiras utan ujradobni
|
||||
{
|
||||
UpdateGameState(GameState.KorKezdet);
|
||||
//dice.CallRenderDice(true);
|
||||
dice.CallRenderDice(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,8 @@ using UnityEngine;
|
||||
|
||||
public class FrameRateSetter : MonoBehaviour
|
||||
{
|
||||
//mobil miatt volt (30fps) van ertelme? nincs sok mozgas es animacio \\ ha lesz animacio vissza rakhato
|
||||
private void Awake() {
|
||||
Application.targetFrameRate = 60;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ public class MainMenu : MonoBehaviour
|
||||
}
|
||||
|
||||
private void Start() {
|
||||
audioManager.Play("MenuMusic");
|
||||
//audioManager.Play("MenuMusic");
|
||||
}
|
||||
|
||||
public void PlayGame()
|
||||
|
||||
Reference in New Issue
Block a user