nyert/vesztett
yes
This commit is contained in:
@@ -11,6 +11,8 @@ public class Source : MonoBehaviour
|
||||
private movement movement;
|
||||
public GameObject sourceSprite;
|
||||
private Ugynok ugynok;
|
||||
private jatekmanager jatekmanager;
|
||||
|
||||
|
||||
private bool oneTime = false;
|
||||
|
||||
@@ -29,6 +31,7 @@ public class Source : MonoBehaviour
|
||||
private void Update() {
|
||||
if(isNyitva && oszlop != -1 && sor.Count == 1) {
|
||||
sourceRender(oszlop, sor[0]);
|
||||
|
||||
if (!oneTime) {
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
@@ -36,6 +39,7 @@ public class Source : MonoBehaviour
|
||||
}
|
||||
printSourceLocation();
|
||||
oneTime = true;
|
||||
jatekmanager.JatekosVesztett();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -331,6 +331,8 @@ public class Ugynok : MonoBehaviour
|
||||
|
||||
ugynokText.text = "X"; //ugynok csapat megolve
|
||||
|
||||
jatekmanager.JatekosNyert();
|
||||
|
||||
//minden vissza kapcsolasa
|
||||
//jatekmanager.ugynokDeaktivalas(true);
|
||||
jatekmanager.UpdateGameState(jatekmanager.GameState.Akcio); //miutan vegzett menjen az akcio state-re
|
||||
|
||||
@@ -458,11 +458,11 @@ public class jatekmanager : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
jatekosvesztett = false;
|
||||
jatekosvesztett = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (source.sor[0] == 2 && source.oszlop == 1)
|
||||
if (source.sor[0] == 1 && source.oszlop == 2)
|
||||
{
|
||||
if (movement.feketepiaclepes2.activeSelf == true)
|
||||
{
|
||||
@@ -472,11 +472,11 @@ public class jatekmanager : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
jatekosvesztett = false;
|
||||
jatekosvesztett = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (source.sor[0] == 3 && source.oszlop == 1)
|
||||
if (source.sor[0] == 1 && source.oszlop == 3)
|
||||
{
|
||||
if (movement.metrolepes2.activeSelf == true)
|
||||
{
|
||||
@@ -486,11 +486,11 @@ public class jatekmanager : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
jatekosvesztett = false;
|
||||
jatekosvesztett = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (source.sor[0] == 1 && source.oszlop == 2)
|
||||
if (source.sor[0] == 2 && source.oszlop == 1)
|
||||
{
|
||||
if (movement.szervereklepes2.activeSelf == true)
|
||||
{
|
||||
@@ -500,7 +500,7 @@ public class jatekmanager : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
jatekosvesztett = false;
|
||||
jatekosvesztett = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -514,11 +514,11 @@ public class jatekmanager : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
jatekosvesztett = false;
|
||||
jatekosvesztett = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (source.sor[0] == 3 && source.oszlop == 2)
|
||||
if (source.sor[0] == 2 && source.oszlop == 3)
|
||||
{
|
||||
if (movement.feltoltolepes2.activeSelf == true)
|
||||
{
|
||||
@@ -528,11 +528,11 @@ public class jatekmanager : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
jatekosvesztett = false;
|
||||
jatekosvesztett = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (source.sor[0] == 1 && source.oszlop == 3)
|
||||
if (source.sor[0] == 3 && source.oszlop == 1)
|
||||
{
|
||||
if (movement.kutatolaborlepes2.activeSelf == true)
|
||||
{
|
||||
@@ -542,11 +542,11 @@ public class jatekmanager : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
jatekosvesztett = false;
|
||||
jatekosvesztett = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (source.sor[0] == 2 && source.oszlop == 3)
|
||||
if (source.sor[0] == 3 && source.oszlop == 2)
|
||||
{
|
||||
if (movement.kriptoklublepes2.activeSelf == true)
|
||||
{
|
||||
@@ -556,7 +556,7 @@ public class jatekmanager : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
jatekosvesztett = false;
|
||||
jatekosvesztett = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -570,11 +570,11 @@ public class jatekmanager : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
jatekosvesztett = false;
|
||||
jatekosvesztett = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (source.sor[0] == 1 && source.oszlop == 4)
|
||||
if (source.sor[0] == 4 && source.oszlop == 1)
|
||||
{
|
||||
if (movement.hadiuzemlepes2.activeSelf == true)
|
||||
{
|
||||
@@ -584,11 +584,11 @@ public class jatekmanager : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
jatekosvesztett = false;
|
||||
jatekosvesztett = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (source.sor[0] == 2 && source.oszlop == 4)
|
||||
if (source.sor[0] == 4 && source.oszlop == 2)
|
||||
{
|
||||
if (movement.konyvtarlepes2.activeSelf == true)
|
||||
{
|
||||
@@ -598,11 +598,11 @@ public class jatekmanager : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
jatekosvesztett = false;
|
||||
jatekosvesztett = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (source.sor[0] == 3 && source.oszlop == 4)
|
||||
if (source.sor[0] == 4 && source.oszlop == 3)
|
||||
{
|
||||
if (movement.korhazlepes2.activeSelf == true)
|
||||
{
|
||||
@@ -612,7 +612,7 @@ public class jatekmanager : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
jatekosvesztett = false;
|
||||
jatekosvesztett = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -713,6 +713,7 @@ public class jatekmanager : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
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.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,6 +74,7 @@ public class movement : MonoBehaviour
|
||||
private Akciopont ap;
|
||||
private Ugynok ugynok;
|
||||
private Targyak targyak;
|
||||
private jatekmanager jatekmanager;
|
||||
|
||||
private int oneonecount = 0;
|
||||
private int twoonecount = 0;
|
||||
@@ -108,7 +109,8 @@ public class movement : MonoBehaviour
|
||||
private void Awake() {
|
||||
ap = FindObjectOfType<Akciopont>();
|
||||
ugynok = FindObjectOfType<Ugynok>();
|
||||
targyak = FindObjectOfType<Targyak>();
|
||||
targyak = FindObjectOfType<Targyak>();
|
||||
jatekmanager = FindObjectOfType<jatekmanager>();
|
||||
}
|
||||
|
||||
void Start()
|
||||
@@ -371,6 +373,7 @@ public class movement : MonoBehaviour
|
||||
eromulepes1.SetActive(true);
|
||||
moveCounter++;
|
||||
eromulepes1.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -869,6 +872,7 @@ public class movement : MonoBehaviour
|
||||
moveCounter++;
|
||||
eromulepes1.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
jatekmanager.JatekosVesztett();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -931,6 +935,7 @@ public class movement : MonoBehaviour
|
||||
moveCounter++;
|
||||
feketepiaclepes1.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
jatekmanager.JatekosVesztett();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -995,6 +1000,7 @@ public class movement : MonoBehaviour
|
||||
moveCounter++;
|
||||
metrolepes1.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
jatekmanager.JatekosVesztett();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1064,6 +1070,7 @@ public class movement : MonoBehaviour
|
||||
moveCounter++;
|
||||
szervereklepes1.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
jatekmanager.JatekosVesztett();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1129,6 +1136,7 @@ public class movement : MonoBehaviour
|
||||
moveCounter++;
|
||||
kingcasinolepes1.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
jatekmanager.JatekosVesztett();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1199,6 +1207,7 @@ public class movement : MonoBehaviour
|
||||
moveCounter++;
|
||||
feltoltolepes1.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
jatekmanager.JatekosVesztett();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1265,6 +1274,7 @@ public class movement : MonoBehaviour
|
||||
moveCounter++;
|
||||
kutatolaborlepes1.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
jatekmanager.JatekosVesztett();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1335,6 +1345,7 @@ public class movement : MonoBehaviour
|
||||
moveCounter++;
|
||||
kriptoklublepes1.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
jatekmanager.JatekosVesztett();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1402,6 +1413,7 @@ public class movement : MonoBehaviour
|
||||
moveCounter++;
|
||||
cyberplazalepes1.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
jatekmanager.JatekosVesztett();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1468,6 +1480,7 @@ public class movement : MonoBehaviour
|
||||
moveCounter++;
|
||||
hadiuzemlepes1.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
jatekmanager.JatekosVesztett();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1534,6 +1547,7 @@ public class movement : MonoBehaviour
|
||||
moveCounter++;
|
||||
konyvtarlepes1.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
jatekmanager.JatekosVesztett();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1600,6 +1614,7 @@ public class movement : MonoBehaviour
|
||||
moveCounter++;
|
||||
korhazlepes1.GetComponent<TMP_Text>().text = moveCounter.ToString();
|
||||
}
|
||||
jatekmanager.JatekosVesztett();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user