This commit is contained in:
2023-04-20 13:28:45 +02:00
parent f4ec722d41
commit a8b1605179
13 changed files with 1779 additions and 2543 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -23,7 +23,7 @@ public class Dice : MonoBehaviour {
public int[] diceResult = { 0, 0 };
public List<int> ujertek = new List<int>();
public int valasztottErtek; //a jatekos altal valasztott dobott ertek helye
private bool locked = false; //ne lehessen ujra kivalasztani a masikat ha mar tortent egy valasztas
[SerializeField] private bool locked = false; //ne lehessen ujra kivalasztani a masikat ha mar tortent egy valasztas
public bool adrenalinMegerosites = false;
public GameObject adrenalinHasznalat;
public Button confirm;
@@ -41,7 +41,7 @@ public class Dice : MonoBehaviour {
public bool dobottEgyszer = false; //tudjon ujra dobni vagy nem
public int ujradobasszamlalo;
private bool ugynokDobasErtek = false; //ertek valasztashoz hogy tudja az ugynok csapat miatt lett meghivva
[SerializeField] private bool ugynokDobasErtek = false; //ertek valasztashoz hogy tudja az ugynok csapat miatt lett meghivva
private bool elsoDobas = true;
private void Awake() {
upgrade = FindObjectOfType<Upgrade>();
@@ -95,7 +95,6 @@ public class Dice : MonoBehaviour {
}else{
//ugynok csapat szama
ugynok.UgynokSorsolas(movement.jelenlegi_x, movement.jelenlegi_y, valasztottErtek);
//-1 energia
energiasav.csokkenEnergia(1);
@@ -108,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);
}
}
@@ -119,6 +118,8 @@ public class Dice : MonoBehaviour {
if(!ugynokDobasErtek)
ap.UpdateAkciopont(getValasztottErtek() + upgrade.akcio[upgrade.getAkcioIndex()]);
else
ugynokDobasErtek = false;
if(elsoDobas){
//jatek kezdeskor elso dobas ugynok csapat meghatarozas kezdo helyszinen

View File

@@ -11,6 +11,7 @@ public class Kezdohelyszin : MonoBehaviour
public TMP_Text eredmenyText;
public Button nextButton;
private float time;
private int random;
private Dice dice;
@@ -18,6 +19,12 @@ public class Kezdohelyszin : MonoBehaviour
private void Awake() {
dice = FindObjectOfType<Dice>();
nextButton.interactable = false;
#if !UNITY_EDITOR
time = 4f;
#else
time = 5f;
#endif
}
public void KezdoHelyszinSorsolas(int x, int y, string helynev){
@@ -28,7 +35,7 @@ public class Kezdohelyszin : MonoBehaviour
}
private IEnumerator waitForDiceAnimation(string helynev){
yield return new WaitForSeconds(5f);
yield return new WaitForSeconds(time);
eredmenyText.text = "A kezdőhelyszíned: " + helynev;
nextButton.interactable = true;

View File

@@ -27,33 +27,28 @@ public class TurnManager : MonoBehaviour
public void nextTurn() {
dice.setLocked(false);
dice.dobottEgyszer = false;
akciopont.resetAkciopont();
energia.csokkenEnergia(upgrade.energia[upgrade.getEnergiaIndex()]);
energia.granatAktivalva = false; //ha aktivalva lett a granat a korben deaktivalja
turnCounter++;
dice.hely1.sprite = null;
dice.hely2.sprite = null;
dice.ujradobasszamlalo = upgrade.ujradobas[upgrade.getUjradobasIndex()] + 1;
dice.diceResult = new int[2];
Debug.Log("ujradobasszamlalo: " + dice.ujradobasszamlalo);
akciopont.resetAkciopont();
energia.csokkenEnergia(upgrade.energia[upgrade.getEnergiaIndex()]);
energia.granatAktivalva = false; //ha aktivalva lett a granat a korben deaktivalja
turnCounter++;
jatekmanager.vanertelme = true;
jatekmanager.JatekosVesztett();
jatekmanager.JatekosNyert();
if (jatekmanager.jatekosnyert == false && jatekmanager.jatekosvesztett == false)
{
jatekmanager.Instance.UpdateGameState(jatekmanager.GameState.KorKezdet); //a jatekmanager atvalt a korkezdet eventre
Debug.Log("kovetkezo kor " + turnCounter);
}
}
}
/*
if (energiavesztese > 29)
{
jatekmanager.Instance.UpdateGameState(GameState.Vesztett); //a jatekmanager atvalt a vesztett eventre
}
*/
}

View File

@@ -75,6 +75,10 @@ public class jatekmanager : MonoBehaviour
public GameObject palyaSprite;
public GameObject playerSprite;
public GameObject eredmenyPanel;
public TMP_Text eredmenyText;
public TMP_Text pontszam;
private void Awake()
{
Instance = this;
@@ -217,6 +221,7 @@ public class jatekmanager : MonoBehaviour
nyomozas.SetActive(false);
hackeles.SetActive(false);
helyszinaktivalasBtn.gameObject.SetActive(false);
harc.SetActive(false);
//test.SetActive(false);
//ha ugynok state-el vegezne kapcsoljon vissza mindent
@@ -530,8 +535,11 @@ public class jatekmanager : MonoBehaviour
if (jatekosnyert)
{
vegpontozas.pontkiiras();
SceneManager.LoadScene("JatekosNyert");
//vegpontozas.pontkiiras();
//SceneManager.LoadScene("JatekosNyert");
eredmenyText.text = "Nyertél";
pontszam.text = "Pontszámod: " + vegpontozas.OsszpontSzamalas().ToString();
eredmenyPanel.SetActive(true);
}
else
{
@@ -808,8 +816,11 @@ public class jatekmanager : MonoBehaviour
if (jatekosvesztett)
{
vegpontozas.pontkiiras();
SceneManager.LoadScene("JatekosVesztett");
//vegpontozas.pontkiiras();
//SceneManager.LoadScene("JatekosVesztett");
eredmenyText.text = "Vesztettél";
pontszam.text = "Pontszámod: " + vegpontozas.OsszpontSzamalas().ToString();
eredmenyPanel.SetActive(true);
}
else
{

View File

@@ -170,7 +170,7 @@ public class movement : MonoBehaviour
eromulepes1.SetActive(true);
eromulepes1.GetComponent<TMP_Text>().text = moveCounter.ToString();
jelenlegi_x = 1;
jelenlegi_y = 1;
jelenlegi_y = 1;
kezdohelyszin.KezdoHelyszinSorsolas(jelenlegi_x, jelenlegi_y, "Erőmű");
}
@@ -382,7 +382,7 @@ public class movement : MonoBehaviour
eromulepes1.SetActive(true);
moveCounter++;
eromulepes1.GetComponent<TMP_Text>().text = moveCounter.ToString();
}
}
}
@@ -827,7 +827,6 @@ public class movement : MonoBehaviour
}
// Update is called once per frame
public void Update()
{
tavolsag = math.abs(tavolsag);

File diff suppressed because one or more lines are too long

View File

@@ -11,10 +11,10 @@ EditorBuildSettings:
- enabled: 1
path: Assets/Scenes/Jatek.unity
guid: 2cda990e2423bbf4892e6590ba056729
- enabled: 1
- enabled: 0
path: Assets/Scenes/JatekosNyert.unity
guid: a108b4cd028a15b2ea25558d17a38712
- enabled: 1
- enabled: 0
path: Assets/Scenes/JatekosVesztett.unity
guid: d535560266fd1da128ac0ee38d7f347a
m_configObjects: {}

View File

@@ -1,46 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!162 &1
EditorUserSettings:
m_ObjectHideFlags: 0
serializedVersion: 4
m_ConfigSettings:
RecentlyUsedSceneGuid-0:
value: 0200045e07010a5f5d5c542341765d4213164a7f797d7e347c7e1c60bab7656a
flags: 0
RecentlyUsedSceneGuid-1:
value: 07040753500359095b580a2641275e41444f19297c2d2363752d4a35b1b46339
flags: 0
RecentlyUsedSceneGuid-2:
value: 57500d5456505f0b5d085f2714255944104f1d797d717e3278711f61b3e6626d
flags: 0
RecentlyUsedSceneGuid-3:
value: 515250075c0c595e5f5a5e71122159444e4e4a2f7a7d7f602f284d66b4b76661
flags: 0
UnityRemoteCompression:
value: 29617121
flags: 0
UnityRemoteDevice:
value: 530104565d04580b405e5c7244770b43464749097d70766108
flags: 0
UnityRemoteResolution:
value: 275e4308165c135e
flags: 0
vcSharedLogLevel:
value: 0d5e400f0650
flags: 0
m_VCAutomaticAdd: 1
m_VCDebugCom: 0
m_VCDebugCmd: 0
m_VCDebugOut: 0
m_SemanticMergeMode: 2
m_DesiredImportWorkerCount: 3
m_StandbyImportWorkerCount: 2
m_IdleImportWorkerShutdownDelay: 60000
m_VCShowFailedCheckout: 1
m_VCOverwriteFailedCheckoutAssets: 1
m_VCProjectOverlayIcons: 1
m_VCHierarchyOverlayIcons: 1
m_VCOtherOverlayIcons: 1
m_VCAllowAsyncUpdate: 1
m_ArtifactGarbageCollection: 1

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,13 +0,0 @@
{
"name": "Assets",
"roots": ["Assets"],
"includes": [],
"excludes": [],
"options": {
"types": true,
"properties": true,
"extended": false,
"dependencies": false
},
"baseScore": 999
}

View File

@@ -1,66 +0,0 @@
trackSelection = true
fetchPreview = true
defaultFlags = 0
keepOpen = false
queryFolder = "Assets"
onBoardingDoNotAskAgain = true
showPackageIndexes = false
showStatusBar = false
scopes = {
}
providers = {
packages = {
active = true
priority = 90
defaultAction = null
}
log = {
active = false
priority = 210
defaultAction = null
}
store = {
active = true
priority = 100
defaultAction = null
}
scene = {
active = true
priority = 50
defaultAction = null
}
performance = {
active = false
priority = 100
defaultAction = null
}
find = {
active = true
priority = 25
defaultAction = null
}
asset = {
active = true
priority = 25
defaultAction = null
}
adb = {
active = false
priority = 2500
defaultAction = null
}
}
objectSelectors = {
}
recentSearches = [
]
searchItemFavorites = [
]
savedSearchesSortOrder = 0
showSavedSearchPanel = false
expandedQueries = [
]
queryBuilder = false
ignoredProperties = "id;name;classname;imagecontentshash"
helperWidgetCurrentArea = "all"
disabledIndexers = ""