Merge branch 'master' into valami
This commit is contained in:
@@ -177,6 +177,7 @@ public class jatekmanager : MonoBehaviour
|
||||
|
||||
public void Pause()
|
||||
{
|
||||
uzenetBox.text = "A játék meg lett állítva";
|
||||
pauseMenuUI.SetActive(true);
|
||||
//ido megallitasa hogy megalljon a jatek
|
||||
SetTimeScale(0f);
|
||||
@@ -263,6 +264,7 @@ public class jatekmanager : MonoBehaviour
|
||||
|
||||
private async void HandleUgynokValasztas()
|
||||
{
|
||||
uzenetBox.text = "Válaszd ki az ügynökcsapat létszámát, az egyik kockára nyomva. (a kisebb választása 1 energia vesztésével jár)";
|
||||
//kapcsolja ki addig a mezoket amig nem valasztott ugynokcsapat szamot
|
||||
movement.oneone_Collider.gameObject.SetActive(false);
|
||||
movement.onetwo_Collider.gameObject.SetActive(false);
|
||||
@@ -289,6 +291,8 @@ public class jatekmanager : MonoBehaviour
|
||||
|
||||
private async void HandleNev()
|
||||
{
|
||||
uzenetBox.text = "Írd be a neved a név mezőbe";
|
||||
|
||||
movement.oneone_Collider.gameObject.SetActive(false);
|
||||
movement.onetwo_Collider.gameObject.SetActive(false);
|
||||
movement.onethree_Collider.gameObject.SetActive(false);
|
||||
@@ -320,6 +324,7 @@ public class jatekmanager : MonoBehaviour
|
||||
|
||||
private async void HandleFejlesztes()
|
||||
{
|
||||
uzenetBox.text = "Válassz fejlesztést";
|
||||
energiafejlesztés.SetActive(true);
|
||||
akciofejlesztés.SetActive(true);
|
||||
harcfejlesztés.SetActive(true);
|
||||
@@ -337,6 +342,7 @@ public class jatekmanager : MonoBehaviour
|
||||
|
||||
private async void HandleAkcio()
|
||||
{
|
||||
uzenetBox.text = "Válassz akciókat!";
|
||||
//itt a movement bekapcsol
|
||||
kovetkezokor.SetActive(true);
|
||||
betarazas.SetActive(true);
|
||||
|
||||
@@ -279,19 +279,27 @@ public class movement : MonoBehaviour
|
||||
ugynok.setElozoHelyszin(jelenlegi_x, jelenlegi_y);
|
||||
}
|
||||
|
||||
public void Update()
|
||||
public void Ujmovement()
|
||||
{
|
||||
tavolsag = math.abs(tavolsag);
|
||||
ugynok.ugynokMegolveElozoHelyen();
|
||||
|
||||
// player mozgatasa es konzolra iratas
|
||||
if (Input.GetKeyDown(KeyCode.Mouse0) && oneone_Collider.OverlapPoint(THE_Camera.ScreenToWorldPoint(Input.mousePosition)))
|
||||
{
|
||||
for (int x = 0; x < w; x++)
|
||||
Debug.Log("Player clicked on the collider: " + oneone_Collider.gameObject.name);
|
||||
tavolsag = math.abs((1) - jelenlegi_x) + math.abs((1) - jelenlegi_y);
|
||||
if (eromulepes1.activeSelf == true & eromulepes2.activeSelf == true)
|
||||
{
|
||||
for (int y = 0; y < h; y++)
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (helyek[y, x].Equals("oneone"))
|
||||
if (tavolsag <= ap.akciopont && ap.akciopont > 0 && tavolsag != 0)
|
||||
{
|
||||
player.transform.position = oneone.transform.position;
|
||||
jelenlegi_x = 1;
|
||||
jelenlegi_y = 1;
|
||||
if (targyak.lathatatlanOltozetAktivalva)
|
||||
{
|
||||
Debug.Log("Player clicked on the collider: " + oneone_Collider.gameObject.name);
|
||||
tavolsag = math.abs((x + 1) - jelenlegi_x) + math.abs((y + 1) - jelenlegi_y);
|
||||
@@ -344,25 +352,48 @@ public class movement : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
eromulepes1.SetActive(true);
|
||||
moveCounter++;
|
||||
eromulepes1.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
jatekmanager.JatekosVesztett();
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Nincs eleg akciopontod vagy nem 1 mez?n belul akarsz lepni");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Mouse0) && twoone_Collider.OverlapPoint(THE_Camera.ScreenToWorldPoint(Input.mousePosition)))
|
||||
{
|
||||
for (int x = 0; x < w; x++)
|
||||
{
|
||||
for (int y = 0; y < h; y++)
|
||||
{
|
||||
if (helyek[y, x].Equals("twoone"))
|
||||
{
|
||||
Debug.Log("Player clicked on the collider: " + twoone_Collider.gameObject.name);
|
||||
tavolsag = math.abs((x + 1) - jelenlegi_x) + math.abs((y + 1) - jelenlegi_y);
|
||||
tavolsag = math.abs((2) - jelenlegi_x) + math.abs((1) - jelenlegi_y);
|
||||
if (feketepiaclepes1.activeSelf == true & feketepiaclepes2.activeSelf == true)
|
||||
{
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag <= ap.akciopont && ap.akciopont > 0 && tavolsag != 0)
|
||||
{
|
||||
if (jelenlegi_x == 1 && jelenlegi_y == 2)
|
||||
{
|
||||
tavolsag = 2;
|
||||
}
|
||||
if (twoonecount < 2)
|
||||
{
|
||||
player.transform.position = twoone.transform.position;
|
||||
jelenlegi_x = 2;
|
||||
jelenlegi_y = 1;
|
||||
if (targyak.lathatatlanOltozetAktivalva)
|
||||
{
|
||||
targyak.lathatatlanOltozetAktivalva = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag <= ap.getAkciopont() && ap.getAkciopont() > 0 && tavolsag != 0)
|
||||
{
|
||||
@@ -414,27 +445,61 @@ public class movement : MonoBehaviour
|
||||
Debug.Log("Nincs eleg akciopontod vagy nem 1 mez?n belul akarsz lepni");
|
||||
}
|
||||
}
|
||||
|
||||
twoonecount = twoonecount + 1;
|
||||
Debug.Log(ap.akciopont); Debug.Log("ugynok sorsolas");
|
||||
//ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||
jatekmanager.Instance.UpdateGameState(jatekmanager.GameState.UgynokValasztas); //ne lepjen addig tovabb amig nem valasztott
|
||||
dice.CallRenderDice(true);
|
||||
ugynok.ugynokMegolveElozoHelyen();
|
||||
if (feketepiaclepes1.activeSelf == true)
|
||||
{
|
||||
feketepiaclepes2.SetActive(true);
|
||||
moveCounter++;
|
||||
feketepiaclepes2.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
feketepiaclepes1.SetActive(true);
|
||||
moveCounter++;
|
||||
feketepiaclepes1.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
jatekmanager.JatekosVesztett();
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum ketszer lephetsz egy mez?re");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Nincs eleg akciopontod vagy nem 1 mez?n belul akarsz lepni");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Mouse0) && threeone_Collider.OverlapPoint(THE_Camera.ScreenToWorldPoint(Input.mousePosition)))
|
||||
{
|
||||
for (int x = 0; x < w; x++)
|
||||
{
|
||||
for (int y = 0; y < h; y++)
|
||||
{
|
||||
if (helyek[y, x].Equals("threeone"))
|
||||
{
|
||||
|
||||
Debug.Log("Player clicked on the collider: " + threeone_Collider.gameObject.name);
|
||||
tavolsag = math.abs((x + 1) - jelenlegi_x) + math.abs((y + 1) - jelenlegi_y);
|
||||
tavolsag = math.abs((3) - jelenlegi_x) + math.abs((1) - jelenlegi_y);
|
||||
if (metrolepes1.activeSelf == true & metrolepes2.activeSelf == true)
|
||||
{
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag <= ap.akciopont && ap.akciopont > 0 && tavolsag != 0)
|
||||
{
|
||||
if (threeonecount < 2)
|
||||
{
|
||||
player.transform.position = threeone.transform.position;
|
||||
jelenlegi_x = 3;
|
||||
jelenlegi_y = 1;
|
||||
if (targyak.lathatatlanOltozetAktivalva)
|
||||
{
|
||||
targyak.lathatatlanOltozetAktivalva = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag <= ap.getAkciopont() && ap.getAkciopont() > 0 && tavolsag != 0)
|
||||
{
|
||||
@@ -482,28 +547,86 @@ public class movement : MonoBehaviour
|
||||
{
|
||||
Debug.Log("Nincs eleg akciopontod vagy nem 1 mez?n belul akarsz lepni");
|
||||
}
|
||||
threeonecount++;
|
||||
Debug.Log(ap.akciopont);
|
||||
Debug.Log("ugynok sorsolas");
|
||||
//ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||
jatekmanager.Instance.UpdateGameState(jatekmanager.GameState.UgynokValasztas); //ne lepjen addig tovabb amig nem valasztott
|
||||
dice.CallRenderDice(true);
|
||||
ugynok.ugynokMegolveElozoHelyen();
|
||||
if (metrolepes1.activeSelf == true)
|
||||
{
|
||||
metrolepes2.SetActive(true);
|
||||
moveCounter++;
|
||||
metrolepes2.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
metrolepes1.SetActive(true);
|
||||
moveCounter++;
|
||||
metrolepes1.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
jatekmanager.JatekosVesztett();
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Nincs eleg akciopontod vagy nem 1 mez?n belul akarsz lepni");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Mouse0) && onetwo_Collider.OverlapPoint(THE_Camera.ScreenToWorldPoint(Input.mousePosition)))
|
||||
{
|
||||
for (int x = 0; x < w; x++)
|
||||
{
|
||||
for (int y = 0; y < h; y++)
|
||||
{
|
||||
if (helyek[y, x].Equals("onetwo"))
|
||||
{
|
||||
|
||||
Debug.Log("Player clicked on the collider: " + onetwo_Collider.gameObject.name);
|
||||
tavolsag = math.abs((x + 1) - jelenlegi_x) + math.abs((y + 1) - jelenlegi_y);
|
||||
tavolsag = math.abs((1) - jelenlegi_x) + math.abs((2) - jelenlegi_y);
|
||||
|
||||
if (szervereklepes1.activeSelf == true & szervereklepes2.activeSelf == true)
|
||||
{
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag <= ap.akciopont && ap.akciopont > 0 && tavolsag != 0)
|
||||
{
|
||||
if (jelenlegi_x == 2 && jelenlegi_y == 1)
|
||||
{
|
||||
tavolsag = 2;
|
||||
}
|
||||
if (onetwocount < 2)
|
||||
{
|
||||
player.transform.position = onetwo.transform.position;
|
||||
jelenlegi_x = 1;
|
||||
jelenlegi_y = 2;
|
||||
if (targyak.lathatatlanOltozetAktivalva)
|
||||
{
|
||||
targyak.lathatatlanOltozetAktivalva = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//ap.akciopont = ap.akciopont - tavolsag;
|
||||
ap.UpdateAkciopont(-tavolsag);
|
||||
}
|
||||
onetwocount++;
|
||||
Debug.Log(ap.akciopont);
|
||||
Debug.Log("ugynok sorsolas");
|
||||
//ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||
jatekmanager.Instance.UpdateGameState(jatekmanager.GameState.UgynokValasztas); //ne lepjen addig tovabb amig nem valasztott
|
||||
dice.CallRenderDice(true);
|
||||
ugynok.ugynokMegolveElozoHelyen();
|
||||
if (szervereklepes1.activeSelf == true)
|
||||
{
|
||||
szervereklepes2.SetActive(true);
|
||||
moveCounter++;
|
||||
szervereklepes2.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag <= ap.getAkciopont() && ap.getAkciopont() > 0 && tavolsag != 0)
|
||||
{
|
||||
@@ -556,27 +679,45 @@ public class movement : MonoBehaviour
|
||||
Debug.Log("Nincs eleg akciopontod vagy nem 1 mezon belul akarsz lepni");
|
||||
}
|
||||
}
|
||||
jatekmanager.JatekosVesztett();
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Nincs eleg akciopontod vagy nem 1 mezon belul akarsz lepni");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Mouse0) && twotwo_Collider.OverlapPoint(THE_Camera.ScreenToWorldPoint(Input.mousePosition)))
|
||||
{
|
||||
for (int x = 0; x < w; x++)
|
||||
{
|
||||
for (int y = 0; y < h; y++)
|
||||
{
|
||||
if (helyek[y, x].Equals("twotwo"))
|
||||
{
|
||||
|
||||
Debug.Log("Player clicked on the collider: " + twotwo_Collider.gameObject.name);
|
||||
tavolsag = math.abs((x + 1) - jelenlegi_x) + math.abs((y + 1) - jelenlegi_y);
|
||||
tavolsag = math.abs((2) - jelenlegi_x) + math.abs((2) - jelenlegi_y);
|
||||
|
||||
if (kingcasinolepes1.activeSelf == true & kingcasinolepes2.activeSelf == true)
|
||||
{
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag <= ap.akciopont && ap.akciopont > 0 && tavolsag != 0)
|
||||
{
|
||||
if (twotwocount < 2)
|
||||
{
|
||||
player.transform.position = twotwo.transform.position;
|
||||
jelenlegi_x = 2;
|
||||
jelenlegi_y = 2;
|
||||
if (targyak.lathatatlanOltozetAktivalva)
|
||||
{
|
||||
targyak.lathatatlanOltozetAktivalva = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag <= ap.getAkciopont() && ap.getAkciopont() > 0 && tavolsag != 0)
|
||||
{
|
||||
@@ -625,28 +766,69 @@ public class movement : MonoBehaviour
|
||||
Debug.Log("Nincs eleg akciopontod vagy nem 1 mezon belul akarsz lepni");
|
||||
}
|
||||
}
|
||||
Debug.Log(ap.akciopont);
|
||||
Debug.Log("ugynok sorsolas");
|
||||
//ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||
jatekmanager.Instance.UpdateGameState(jatekmanager.GameState.UgynokValasztas); //ne lepjen addig tovabb amig nem valasztott
|
||||
dice.CallRenderDice(true);
|
||||
ugynok.ugynokMegolveElozoHelyen();
|
||||
twotwocount++;
|
||||
if (kingcasinolepes1.activeSelf == true)
|
||||
{
|
||||
kingcasinolepes2.SetActive(true);
|
||||
moveCounter++;
|
||||
kingcasinolepes2.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
kingcasinolepes1.SetActive(true);
|
||||
moveCounter++;
|
||||
kingcasinolepes1.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
jatekmanager.JatekosVesztett();
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Nincs eleg akciopontod vagy nem 1 mezon belul akarsz lepni");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Mouse0) && threetwo_Collider.OverlapPoint(THE_Camera.ScreenToWorldPoint(Input.mousePosition)))
|
||||
{
|
||||
for (int x = 0; x < w; x++)
|
||||
{
|
||||
for (int y = 0; y < h; y++)
|
||||
{
|
||||
if (helyek[y, x].Equals("threetwo"))
|
||||
{
|
||||
|
||||
Debug.Log("Player clicked on the collider: " + threetwo_Collider.gameObject.name);
|
||||
tavolsag = math.abs((x + 1) - jelenlegi_x) + math.abs((y + 1) - jelenlegi_y);
|
||||
tavolsag = math.abs((3) - jelenlegi_x) + math.abs((2) - jelenlegi_y);
|
||||
|
||||
if (feltoltolepes1.activeSelf == true & feltoltolepes2.activeSelf == true)
|
||||
{
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag <= ap.akciopont && ap.akciopont > 0 && tavolsag != 0)
|
||||
{
|
||||
if (jelenlegi_x == 2 && jelenlegi_y == 3)
|
||||
{
|
||||
tavolsag = 2;
|
||||
}
|
||||
if (threetwocount < 2)
|
||||
{
|
||||
player.transform.position = threetwo.transform.position;
|
||||
jelenlegi_x = 3;
|
||||
jelenlegi_y = 2;
|
||||
if (targyak.lathatatlanOltozetAktivalva)
|
||||
{
|
||||
targyak.lathatatlanOltozetAktivalva = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag <= ap.getAkciopont() && ap.getAkciopont() > 0 && tavolsag != 0)
|
||||
{
|
||||
@@ -699,28 +881,65 @@ public class movement : MonoBehaviour
|
||||
Debug.Log("Nincs eleg akciopontod vagy nem 1 mezon belul akarsz lepni");
|
||||
}
|
||||
}
|
||||
Debug.Log(ap.akciopont);
|
||||
Debug.Log("ugynok sorsolas");
|
||||
//ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||
jatekmanager.Instance.UpdateGameState(jatekmanager.GameState.UgynokValasztas); //ne lepjen addig tovabb amig nem valasztott
|
||||
dice.CallRenderDice(true);
|
||||
ugynok.ugynokMegolveElozoHelyen();
|
||||
threetwocount++;
|
||||
if (feltoltolepes1.activeSelf == true)
|
||||
{
|
||||
feltoltolepes2.SetActive(true);
|
||||
moveCounter++;
|
||||
feltoltolepes2.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
feltoltolepes1.SetActive(true);
|
||||
moveCounter++;
|
||||
feltoltolepes1.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
jatekmanager.JatekosVesztett();
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Nincs eleg akciopontod vagy nem 1 mezon belul akarsz lepni");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Mouse0) && onethree_Collider.OverlapPoint(THE_Camera.ScreenToWorldPoint(Input.mousePosition)))
|
||||
{
|
||||
for (int x = 0; x < w; x++)
|
||||
{
|
||||
for (int y = 0; y < h; y++)
|
||||
{
|
||||
if (helyek[y, x].Equals("onethree"))
|
||||
{
|
||||
|
||||
Debug.Log("Player clicked on the collider: " + onethree_Collider.gameObject.name);
|
||||
tavolsag = math.abs((x + 1) - jelenlegi_x) + math.abs((y + 1) - jelenlegi_y);
|
||||
tavolsag = math.abs((1) - jelenlegi_x) + math.abs((3) - jelenlegi_y);
|
||||
|
||||
if (kutatolaborlepes1.activeSelf == true & kutatolaborlepes2.activeSelf == true)
|
||||
{
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag <= ap.akciopont && ap.akciopont > 0 && tavolsag != 0)
|
||||
{
|
||||
if (onethreecount < 2)
|
||||
{
|
||||
player.transform.position = onethree.transform.position;
|
||||
jelenlegi_x = 1;
|
||||
jelenlegi_y = 3;
|
||||
if (targyak.lathatatlanOltozetAktivalva)
|
||||
{
|
||||
targyak.lathatatlanOltozetAktivalva = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag <= ap.getAkciopont() && ap.getAkciopont() > 0 && tavolsag != 0)
|
||||
{
|
||||
@@ -769,28 +988,69 @@ public class movement : MonoBehaviour
|
||||
Debug.Log("Nincs eleg akciopontod vagy nem 1 mez?n belul akarsz lepni");
|
||||
}
|
||||
}
|
||||
Debug.Log(ap.akciopont);
|
||||
Debug.Log("ugynok sorsolas");
|
||||
//ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||
jatekmanager.Instance.UpdateGameState(jatekmanager.GameState.UgynokValasztas); //ne lepjen addig tovabb amig nem valasztott
|
||||
dice.CallRenderDice(true);
|
||||
ugynok.ugynokMegolveElozoHelyen();
|
||||
onethreecount++;
|
||||
if (kutatolaborlepes1.activeSelf == true)
|
||||
{
|
||||
kutatolaborlepes2.SetActive(true);
|
||||
moveCounter++;
|
||||
kutatolaborlepes2.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
kutatolaborlepes1.SetActive(true);
|
||||
moveCounter++;
|
||||
kutatolaborlepes1.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
jatekmanager.JatekosVesztett();
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Nincs eleg akciopontod vagy nem 1 mez?n belul akarsz lepni");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Mouse0) && twothree_Collider.OverlapPoint(THE_Camera.ScreenToWorldPoint(Input.mousePosition)))
|
||||
{
|
||||
for (int x = 0; x < w; x++)
|
||||
{
|
||||
for (int y = 0; y < h; y++)
|
||||
{
|
||||
if (helyek[y, x].Equals("twothree"))
|
||||
{
|
||||
|
||||
Debug.Log("Player clicked on the collider: " + twothree_Collider.gameObject.name);
|
||||
tavolsag = math.abs((x + 1) - jelenlegi_x) + math.abs((y + 1) - jelenlegi_y);
|
||||
tavolsag = math.abs((2) - jelenlegi_x) + math.abs((3) - jelenlegi_y);
|
||||
|
||||
if (kriptoklublepes1.activeSelf == true & kriptoklublepes2.activeSelf == true)
|
||||
{
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag <= ap.akciopont && ap.akciopont > 0 && tavolsag != 0)
|
||||
{
|
||||
if (jelenlegi_x == 3 && jelenlegi_y == 2)
|
||||
{
|
||||
tavolsag = 2;
|
||||
}
|
||||
if (twothreecount < 2)
|
||||
{
|
||||
player.transform.position = twothree.transform.position;
|
||||
jelenlegi_x = 2;
|
||||
jelenlegi_y = 3;
|
||||
if (targyak.lathatatlanOltozetAktivalva)
|
||||
{
|
||||
targyak.lathatatlanOltozetAktivalva = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag <= ap.getAkciopont() && ap.getAkciopont() > 0 && tavolsag != 0)
|
||||
{
|
||||
@@ -843,29 +1103,66 @@ public class movement : MonoBehaviour
|
||||
Debug.Log("Nincs eleg akciopontod vagy nem 1 mezon belul akarsz lepni");
|
||||
}
|
||||
}
|
||||
Debug.Log(ap.akciopont);
|
||||
Debug.Log("ugynok sorsolas");
|
||||
//ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||
jatekmanager.Instance.UpdateGameState(jatekmanager.GameState.UgynokValasztas); //ne lepjen addig tovabb amig nem valasztott
|
||||
dice.CallRenderDice(true);
|
||||
ugynok.ugynokMegolveElozoHelyen();
|
||||
twothreecount++;
|
||||
if (kriptoklublepes1.activeSelf == true)
|
||||
{
|
||||
kriptoklublepes2.SetActive(true);
|
||||
moveCounter++;
|
||||
kriptoklublepes2.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
kriptoklublepes1.SetActive(true);
|
||||
moveCounter++;
|
||||
kriptoklublepes1.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
jatekmanager.JatekosVesztett();
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Nincs eleg akciopontod vagy nem 1 mezon belul akarsz lepni");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Mouse0) && threethree_Collider.OverlapPoint(THE_Camera.ScreenToWorldPoint(Input.mousePosition)))
|
||||
{
|
||||
for (int x = 0; x < w; x++)
|
||||
{
|
||||
for (int y = 0; y < h; y++)
|
||||
{
|
||||
if (helyek[x, y].Equals("threethree"))
|
||||
{
|
||||
|
||||
Debug.Log("Player clicked on the collider: " + threethree_Collider.gameObject.name);
|
||||
tavolsag = math.abs((x + 1) - jelenlegi_x) + math.abs((y + 1) - jelenlegi_y);
|
||||
tavolsag = math.abs((3) - jelenlegi_x) + math.abs((3) - jelenlegi_y);
|
||||
|
||||
if (cyberplazalepes1.activeSelf == true & cyberplazalepes2.activeSelf == true)
|
||||
{
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag <= ap.akciopont && ap.akciopont > 0 && tavolsag != 0)
|
||||
{
|
||||
if (threethreecount < 2)
|
||||
{
|
||||
player.transform.position = threethree.transform.position;
|
||||
jelenlegi_x = 3;
|
||||
jelenlegi_y = 3;
|
||||
if (targyak.lathatatlanOltozetAktivalva)
|
||||
{
|
||||
targyak.lathatatlanOltozetAktivalva = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag <= ap.getAkciopont() && ap.getAkciopont() > 0 && tavolsag != 0)
|
||||
{
|
||||
@@ -914,28 +1211,65 @@ public class movement : MonoBehaviour
|
||||
Debug.Log("Nincs eleg akciopontod vagy nem 1 mezon belul akarsz lepni");
|
||||
}
|
||||
}
|
||||
Debug.Log(ap.akciopont);
|
||||
Debug.Log("ugynok sorsolas");
|
||||
//ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||
jatekmanager.Instance.UpdateGameState(jatekmanager.GameState.UgynokValasztas); //ne lepjen addig tovabb amig nem valasztott
|
||||
dice.CallRenderDice(true);
|
||||
ugynok.ugynokMegolveElozoHelyen();
|
||||
threethreecount++;
|
||||
if (cyberplazalepes1.activeSelf == true)
|
||||
{
|
||||
cyberplazalepes2.SetActive(true);
|
||||
moveCounter++;
|
||||
cyberplazalepes2.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
cyberplazalepes1.SetActive(true);
|
||||
moveCounter++;
|
||||
cyberplazalepes1.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
jatekmanager.JatekosVesztett();
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Nincs eleg akciopontod vagy nem 1 mezon belul akarsz lepni");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Mouse0) && onefour_Collider.OverlapPoint(THE_Camera.ScreenToWorldPoint(Input.mousePosition)))
|
||||
{
|
||||
for (int x = 0; x < w; x++)
|
||||
{
|
||||
for (int y = 0; y < h; y++)
|
||||
{
|
||||
if (helyek[y, x].Equals("onefour"))
|
||||
{
|
||||
|
||||
Debug.Log("Player clicked on the collider: " + onefour_Collider.gameObject.name);
|
||||
tavolsag = math.abs((x + 1) - jelenlegi_x) + math.abs((y + 1) - jelenlegi_y);
|
||||
tavolsag = math.abs((1) - jelenlegi_x) + math.abs((4) - jelenlegi_y);
|
||||
|
||||
if (hadiuzemlepes1.activeSelf == true & hadiuzemlepes2.activeSelf == true)
|
||||
{
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag <= ap.akciopont && ap.akciopont > 0 && tavolsag != 0)
|
||||
{
|
||||
if (onefourcount < 2)
|
||||
{
|
||||
player.transform.position = onefour.transform.position;
|
||||
jelenlegi_x = 1;
|
||||
jelenlegi_y = 4;
|
||||
if (targyak.lathatatlanOltozetAktivalva)
|
||||
{
|
||||
targyak.lathatatlanOltozetAktivalva = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag <= ap.getAkciopont() && ap.getAkciopont() > 0 && tavolsag != 0)
|
||||
{
|
||||
@@ -984,28 +1318,65 @@ public class movement : MonoBehaviour
|
||||
Debug.Log("Nincs eleg akciopontod vagy nem 1 mez?n belul akarsz lepni");
|
||||
}
|
||||
}
|
||||
Debug.Log(ap.akciopont);
|
||||
Debug.Log("ugynok sorsolas");
|
||||
//ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||
jatekmanager.Instance.UpdateGameState(jatekmanager.GameState.UgynokValasztas); //ne lepjen addig tovabb amig nem valasztott
|
||||
dice.CallRenderDice(true);
|
||||
ugynok.ugynokMegolveElozoHelyen();
|
||||
onefourcount++;
|
||||
if (hadiuzemlepes1.activeSelf == true)
|
||||
{
|
||||
hadiuzemlepes2.SetActive(true);
|
||||
moveCounter++;
|
||||
hadiuzemlepes2.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
hadiuzemlepes1.SetActive(true);
|
||||
moveCounter++;
|
||||
hadiuzemlepes1.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
jatekmanager.JatekosVesztett();
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Nincs eleg akciopontod vagy nem 1 mez?n belul akarsz lepni");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Mouse0) && twofour_Collider.OverlapPoint(THE_Camera.ScreenToWorldPoint(Input.mousePosition)))
|
||||
{
|
||||
for (int x = 0; x < w; x++)
|
||||
{
|
||||
for (int y = 0; y < h; y++)
|
||||
{
|
||||
if (helyek[y, x].Equals("twofour"))
|
||||
{
|
||||
|
||||
Debug.Log("Player clicked on the collider: " + twofour_Collider.gameObject.name);
|
||||
tavolsag = math.abs((x + 1) - jelenlegi_x) + math.abs((y + 1) - jelenlegi_y);
|
||||
tavolsag = math.abs((2) - jelenlegi_x) + math.abs((4) - jelenlegi_y);
|
||||
|
||||
if (konyvtarlepes1.activeSelf == true & konyvtarlepes2.activeSelf == true)
|
||||
{
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag <= ap.akciopont && ap.akciopont > 0 && tavolsag != 0)
|
||||
{
|
||||
if (twofourcount < 2)
|
||||
{
|
||||
player.transform.position = twofour.transform.position;
|
||||
jelenlegi_x = 2;
|
||||
jelenlegi_y = 4;
|
||||
if (targyak.lathatatlanOltozetAktivalva)
|
||||
{
|
||||
targyak.lathatatlanOltozetAktivalva = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag <= ap.getAkciopont() && ap.getAkciopont() > 0 && tavolsag != 0)
|
||||
{
|
||||
@@ -1054,27 +1425,81 @@ public class movement : MonoBehaviour
|
||||
Debug.Log("Nincs eleg akciopontod vagy nem 1 mezon belul akarsz lepni");
|
||||
}
|
||||
}
|
||||
Debug.Log(ap.akciopont);
|
||||
Debug.Log("ugynok sorsolas");
|
||||
//ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||
jatekmanager.Instance.UpdateGameState(jatekmanager.GameState.UgynokValasztas); //ne lepjen addig tovabb amig nem valasztott
|
||||
dice.CallRenderDice(true);
|
||||
ugynok.ugynokMegolveElozoHelyen();
|
||||
twofourcount++;
|
||||
if (konyvtarlepes1.activeSelf == true)
|
||||
{
|
||||
konyvtarlepes2.SetActive(true);
|
||||
moveCounter++;
|
||||
konyvtarlepes2.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
konyvtarlepes1.SetActive(true);
|
||||
moveCounter++;
|
||||
konyvtarlepes1.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
jatekmanager.JatekosVesztett();
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Nincs eleg akciopontod vagy nem 1 mezon belul akarsz lepni");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Mouse0) && threefour_Collider.OverlapPoint(THE_Camera.ScreenToWorldPoint(Input.mousePosition)))
|
||||
{
|
||||
for (int x = 0; x < w; x++)
|
||||
{
|
||||
for (int y = 0; y < h; y++)
|
||||
{
|
||||
if (helyek[y, x].Equals("threefour"))
|
||||
{
|
||||
Debug.Log("Player clicked on the collider: " + threefour_Collider.gameObject.name);
|
||||
tavolsag = math.abs((x + 1) - jelenlegi_x) + math.abs((y + 1) - jelenlegi_y);
|
||||
tavolsag = math.abs((3) - jelenlegi_x) + math.abs((4) - jelenlegi_y);
|
||||
|
||||
if (korhazlepes1.activeSelf == true & korhazlepes2.activeSelf == true)
|
||||
{
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag <= ap.akciopont && ap.akciopont > 0 && tavolsag != 0)
|
||||
{
|
||||
if (threefourcount < 2)
|
||||
{
|
||||
player.transform.position = threefour.transform.position;
|
||||
jelenlegi_x = 3;
|
||||
jelenlegi_y = 4;
|
||||
if (targyak.lathatatlanOltozetAktivalva)
|
||||
{
|
||||
targyak.lathatatlanOltozetAktivalva = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//ap.akciopont = ap.akciopont - tavolsag;
|
||||
ap.UpdateAkciopont(-tavolsag);
|
||||
}
|
||||
Debug.Log(ap.akciopont);
|
||||
Debug.Log("ugynok sorsolas");
|
||||
//ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||
jatekmanager.Instance.UpdateGameState(jatekmanager.GameState.UgynokValasztas); //ne lepjen addig tovabb amig nem valasztott
|
||||
dice.CallRenderDice(true);
|
||||
ugynok.ugynokMegolveElozoHelyen();
|
||||
threefourcount++;
|
||||
if (korhazlepes1.activeSelf == true)
|
||||
{
|
||||
korhazlepes2.SetActive(true);
|
||||
moveCounter++;
|
||||
korhazlepes2.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag <= ap.getAkciopont() && ap.getAkciopont() > 0 && tavolsag != 0)
|
||||
{
|
||||
@@ -1123,9 +1548,19 @@ public class movement : MonoBehaviour
|
||||
Debug.Log("Nincs eleg akciopontod vagy nem 1 mezon belul akarsz lepni");
|
||||
}
|
||||
}
|
||||
jatekmanager.JatekosVesztett();
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Nincs eleg akciopontod vagy nem 1 mezon belul akarsz lepni");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user