dice csere, framerate

This commit is contained in:
2023-04-20 14:48:38 +02:00
parent a8b1605179
commit e63cb46c38
7 changed files with 36 additions and 92 deletions

View File

@@ -4743,6 +4743,7 @@ MonoBehaviour:
diceResult: 0000000000000000
ujertek:
valasztottErtek: 0
locked: 0
adrenalinMegerosites: 0
adrenalinHasznalat: {fileID: 274472943}
confirm: {fileID: 1617719567}
@@ -4764,6 +4765,7 @@ MonoBehaviour:
dobott: 0
dobottEgyszer: 0
ujradobasszamlalo: 0
ugynokDobasErtek: 0
--- !u!114 &197904222
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -43233,8 +43235,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -231.38, y: 91}
m_SizeDelta: {x: 262.751, y: 62.216}
m_AnchoredPosition: {x: 42.41, y: 91}
m_SizeDelta: {x: 810.33, y: 62.22}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1667766886
MonoBehaviour:
@@ -43265,8 +43267,8 @@ MonoBehaviour:
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
rgba: 4278190335
m_fontColor: {r: 1, g: 0, b: 0, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:

View File

@@ -4161,7 +4161,6 @@ GameObject:
- component: {fileID: 1386328419}
- component: {fileID: 1386328418}
- component: {fileID: 1386328422}
- component: {fileID: 1386328426}
- component: {fileID: 1386328425}
- component: {fileID: 1386328423}
- component: {fileID: 1386328417}
@@ -4301,18 +4300,6 @@ MonoBehaviour:
OptionsMenu: {fileID: 1274410647}
CreditsMenuObj: {fileID: 1071490289}
VideoButton: {fileID: 500113175}
--- !u!114 &1386328426
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1386328416}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b0fa93b33fed1ce42a3e77548b03decc, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &1386328427
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -4331,6 +4318,7 @@ MonoBehaviour:
clip: {fileID: 8300000, guid: 0b3a32694c5ed5f4fad733a3945a4249, type: 3}
volume: 1
pitch: 1
loop: 0
source: {fileID: 0}
outputMixer: {fileID: -8278190956376925970, guid: 833dc20f7f9e5b244a756827a43d874d, type: 2}
--- !u!1 &1421471717

View File

@@ -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--;

View File

@@ -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);
}
}

View File

@@ -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;
}
}
}

View File

@@ -17,7 +17,7 @@ public class MainMenu : MonoBehaviour
}
private void Start() {
audioManager.Play("MenuMusic");
//audioManager.Play("MenuMusic");
}
public void PlayGame()

File diff suppressed because one or more lines are too long