build
This commit is contained in:
@@ -10,42 +10,67 @@ public class movement : MonoBehaviour {
|
||||
|
||||
public GameObject oneone;
|
||||
public Collider2D oneone_Collider;
|
||||
public GameObject eromulepes1;
|
||||
public GameObject eromulepes2;
|
||||
|
||||
public GameObject twoone;
|
||||
public Collider2D twoone_Collider;
|
||||
public GameObject feketepiaclepes1;
|
||||
public GameObject feketepiaclepes2;
|
||||
|
||||
public GameObject threeone;
|
||||
public Collider2D threeone_Collider;
|
||||
public GameObject metrolepes1;
|
||||
public GameObject metrolepes2;
|
||||
|
||||
public GameObject onetwo;
|
||||
public Collider2D onetwo_Collider;
|
||||
public GameObject szervereklepes1;
|
||||
public GameObject szervereklepes2;
|
||||
|
||||
public GameObject twotwo;
|
||||
public Collider2D twotwo_Collider;
|
||||
public GameObject kingcasinolepes1;
|
||||
public GameObject kingcasinolepes2;
|
||||
|
||||
public GameObject threetwo;
|
||||
public Collider2D threetwo_Collider;
|
||||
public GameObject feltoltolepes1;
|
||||
public GameObject feltoltolepes2;
|
||||
|
||||
public GameObject onethree;
|
||||
public Collider2D onethree_Collider;
|
||||
public GameObject kutatolaborlepes1;
|
||||
public GameObject kutatolaborlepes2;
|
||||
|
||||
public GameObject twothree;
|
||||
public Collider2D twothree_Collider;
|
||||
public GameObject kriptoklublepes1;
|
||||
public GameObject kriptoklublepes2;
|
||||
|
||||
public GameObject threethree;
|
||||
public Collider2D threethree_Collider;
|
||||
public GameObject cyberplazalepes1;
|
||||
public GameObject cyberplazalepes2;
|
||||
|
||||
public GameObject onefour;
|
||||
public Collider2D onefour_Collider;
|
||||
public GameObject hadiuzemlepes1;
|
||||
public GameObject hadiuzemlepes2;
|
||||
|
||||
public GameObject twofour;
|
||||
public Collider2D twofour_Collider;
|
||||
public GameObject konyvtarlepes1;
|
||||
public GameObject konyvtarlepes2;
|
||||
|
||||
public GameObject threefour;
|
||||
public Collider2D threefour_Collider;
|
||||
public GameObject korhazlepes1;
|
||||
public GameObject korhazlepes2;
|
||||
|
||||
public GameObject player;
|
||||
|
||||
|
||||
int oneonecount = 0;
|
||||
int twoonecount = 0;
|
||||
int threeonecount = 0;
|
||||
@@ -71,6 +96,7 @@ public class movement : MonoBehaviour {
|
||||
{"", "", "", "" }
|
||||
};
|
||||
|
||||
|
||||
int jelenlegi_x = 1;
|
||||
int jelenlegi_y = 1;
|
||||
int akciopont = 20;
|
||||
@@ -79,6 +105,42 @@ public class movement : MonoBehaviour {
|
||||
// Start is called before the first frame update
|
||||
void Start() {
|
||||
player.transform.position = oneone.transform.position;
|
||||
|
||||
eromulepes1.SetActive(false);
|
||||
eromulepes2.SetActive(false);
|
||||
|
||||
feketepiaclepes1.SetActive(false);
|
||||
feketepiaclepes2.SetActive(false);
|
||||
|
||||
metrolepes1.SetActive(false);
|
||||
metrolepes2.SetActive(false);
|
||||
|
||||
szervereklepes1.SetActive(false);
|
||||
szervereklepes2.SetActive(false);
|
||||
|
||||
kingcasinolepes1.SetActive(false);
|
||||
kingcasinolepes2.SetActive(false);
|
||||
|
||||
feltoltolepes1.SetActive(false);
|
||||
feltoltolepes2.SetActive(false);
|
||||
|
||||
kutatolaborlepes1.SetActive(false);
|
||||
kutatolaborlepes2.SetActive(false);
|
||||
|
||||
kriptoklublepes1.SetActive(false);
|
||||
kriptoklublepes2.SetActive(false);
|
||||
|
||||
cyberplazalepes1.SetActive(false);
|
||||
cyberplazalepes2.SetActive(false);
|
||||
|
||||
hadiuzemlepes1.SetActive(false);
|
||||
hadiuzemlepes2.SetActive(false);
|
||||
|
||||
konyvtarlepes1.SetActive(false);
|
||||
konyvtarlepes2.SetActive(false);
|
||||
|
||||
korhazlepes1.SetActive(false);
|
||||
korhazlepes2.SetActive(false);
|
||||
}
|
||||
|
||||
private void kezdoHelyMeghatarzoas() {
|
||||
@@ -97,25 +159,33 @@ public class movement : MonoBehaviour {
|
||||
if (helyek[y, x].Equals("oneone")) {
|
||||
Debug.Log("Player clicked on the collider: " + oneone_Collider.gameObject.name);
|
||||
tavolsag = math.abs((jelenlegi_x + jelenlegi_y) - ((x + 1) + (y + 1)));
|
||||
if (tavolsag < 5) {
|
||||
|
||||
if (eromulepes1.activeSelf == true & eromulepes2.activeSelf == true) {
|
||||
Debug.Log("Maximum kétszer léphetsz egy mezõre");
|
||||
}
|
||||
|
||||
if (tavolsag == 1 && akciopont != 0) {
|
||||
if (oneonecount < 2) {
|
||||
player.transform.position = oneone.transform.position;
|
||||
jelenlegi_x = 1;
|
||||
jelenlegi_y = 1;
|
||||
akciopont = akciopont - 1;
|
||||
oneonecount = oneonecount + 1;
|
||||
Debug.Log(akciopont);
|
||||
} else {
|
||||
Debug.Log("Maximum kétszer léphetsz egy mez?re");
|
||||
else
|
||||
{
|
||||
if (tavolsag == 1 && akciopont != 0)
|
||||
{
|
||||
player.transform.position = oneone.transform.position;
|
||||
jelenlegi_x = 1;
|
||||
jelenlegi_y = 1;
|
||||
akciopont = akciopont - 1;
|
||||
oneonecount = oneonecount + 1;
|
||||
Debug.Log(akciopont);
|
||||
if (eromulepes1.activeSelf == true)
|
||||
{
|
||||
eromulepes2.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
eromulepes1.SetActive(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Nincs elég akciópontod vagy nem 1 mez?n belül akarsz lépni");
|
||||
}
|
||||
} else {
|
||||
Debug.Log("Nincs elég akciópontod vagy nem 1 mez?n belül akarsz lépni");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -127,21 +197,42 @@ public class movement : MonoBehaviour {
|
||||
if (helyek[y, x].Equals("twoone")) {
|
||||
Debug.Log("Player clicked on the collider: " + twoone_Collider.gameObject.name);
|
||||
tavolsag = math.abs((jelenlegi_x + jelenlegi_y) - ((x + 1) + (y + 1)));
|
||||
|
||||
if (tavolsag == 1 && akciopont != 0) {
|
||||
if (twoonecount < 2) {
|
||||
player.transform.position = twoone.transform.position;
|
||||
jelenlegi_x = 2;
|
||||
jelenlegi_y = 1;
|
||||
akciopont = akciopont - 1;
|
||||
twoonecount = twoonecount + 1;
|
||||
Debug.Log(akciopont);
|
||||
} else {
|
||||
Debug.Log("Maximum kétszer léphetsz egy mez?re");
|
||||
}
|
||||
} else {
|
||||
Debug.Log("Nincs elég akciópontod vagy nem 1 mez?n belül akarsz lépni");
|
||||
if (feketepiaclepes1.activeSelf == true & feketepiaclepes2.activeSelf == true)
|
||||
{
|
||||
Debug.Log("Maximum kétszer léphetsz egy mezõre");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag == 1 && akciopont != 0)
|
||||
{
|
||||
if (twoonecount < 2)
|
||||
{
|
||||
player.transform.position = twoone.transform.position;
|
||||
jelenlegi_x = 2;
|
||||
jelenlegi_y = 1;
|
||||
akciopont = akciopont - 1;
|
||||
twoonecount = twoonecount + 1;
|
||||
Debug.Log(akciopont);
|
||||
if (feketepiaclepes1.activeSelf == true)
|
||||
{
|
||||
feketepiaclepes2.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
feketepiaclepes1.SetActive(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum kétszer léphetsz egy mez?re");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Nincs elég akciópontod vagy nem 1 mez?n belül akarsz lépni");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -153,20 +244,40 @@ public class movement : MonoBehaviour {
|
||||
if (helyek[y, x].Equals("threeone")) {
|
||||
Debug.Log("Player clicked on the collider: " + threeone_Collider.gameObject.name);
|
||||
tavolsag = math.abs((jelenlegi_x + jelenlegi_y) - ((x + 1) + (y + 1)));
|
||||
|
||||
if (tavolsag == 1 && akciopont != 0) {
|
||||
if (threeonecount < 2) {
|
||||
player.transform.position = threeone.transform.position;
|
||||
jelenlegi_x = 3;
|
||||
jelenlegi_y = 1;
|
||||
akciopont = akciopont - 1;
|
||||
threeonecount++;
|
||||
Debug.Log(akciopont);
|
||||
} else {
|
||||
Debug.Log("Maximum kétszer léphetsz egy mez?re");
|
||||
if (metrolepes1.activeSelf == true & metrolepes2.activeSelf == true)
|
||||
{
|
||||
Debug.Log("Maximum kétszer léphetsz egy mezõre");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag == 1 && akciopont != 0)
|
||||
{
|
||||
if (threeonecount < 2)
|
||||
{
|
||||
player.transform.position = threeone.transform.position;
|
||||
jelenlegi_x = 3;
|
||||
jelenlegi_y = 1;
|
||||
akciopont = akciopont - 1;
|
||||
threeonecount++;
|
||||
Debug.Log(akciopont);
|
||||
if (metrolepes1.activeSelf == true)
|
||||
{
|
||||
metrolepes2.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
metrolepes1.SetActive(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum kétszer léphetsz egy mezõre");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Nincs elég akciópontod vagy nem 1 mez?n belül akarsz lépni");
|
||||
}
|
||||
} else {
|
||||
Debug.Log("Nincs elég akciópontod vagy nem 1 mez?n belül akarsz lépni");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -180,19 +291,40 @@ public class movement : MonoBehaviour {
|
||||
Debug.Log("Player clicked on the collider: " + onetwo_Collider.gameObject.name);
|
||||
tavolsag = math.abs((jelenlegi_x + jelenlegi_y) - ((x + 1) + (y + 1)));
|
||||
|
||||
if (tavolsag == 1 && akciopont != 0) {
|
||||
if (onetwocount < 2) {
|
||||
player.transform.position = onetwo.transform.position;
|
||||
jelenlegi_x = 1;
|
||||
jelenlegi_y = 2;
|
||||
akciopont = akciopont - 1;
|
||||
onetwocount++;
|
||||
Debug.Log(akciopont);
|
||||
} else {
|
||||
Debug.Log("Maximum kétszer léphetsz egy mez?re");
|
||||
if (szervereklepes1.activeSelf == true & szervereklepes2.activeSelf == true)
|
||||
{
|
||||
Debug.Log("Maximum kétszer léphetsz egy mezõre");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag == 1 && akciopont != 0)
|
||||
{
|
||||
if (onetwocount < 2)
|
||||
{
|
||||
player.transform.position = onetwo.transform.position;
|
||||
jelenlegi_x = 1;
|
||||
jelenlegi_y = 2;
|
||||
akciopont = akciopont - 1;
|
||||
onetwocount++;
|
||||
Debug.Log(akciopont);
|
||||
if (szervereklepes1.activeSelf == true)
|
||||
{
|
||||
szervereklepes2.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
szervereklepes1.SetActive(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum kétszer léphetsz egy mezõre");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Nincs elég akciópontod vagy nem 1 mezõn belül akarsz lépni");
|
||||
}
|
||||
} else {
|
||||
Debug.Log("Nincs elég akciópontod vagy nem 1 mez?n belül akarsz lépni");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -206,20 +338,41 @@ public class movement : MonoBehaviour {
|
||||
Debug.Log("Player clicked on the collider: " + twotwo_Collider.gameObject.name);
|
||||
tavolsag = math.abs((jelenlegi_x + jelenlegi_y) - ((x + 1) + (y + 1)));
|
||||
|
||||
if (tavolsag == 1 && akciopont != 0) {
|
||||
if (twotwocount < 2) {
|
||||
player.transform.position = twotwo.transform.position;
|
||||
jelenlegi_x = 2;
|
||||
jelenlegi_y = 2;
|
||||
akciopont = akciopont - 1;
|
||||
Debug.Log(akciopont);
|
||||
twotwocount++;
|
||||
} else {
|
||||
Debug.Log("Maximum kétszer léphetsz egy mez?re");
|
||||
}
|
||||
} else {
|
||||
Debug.Log("Nincs elég akciópontod vagy nem 1 mez?n belül akarsz lépni");
|
||||
if (kingcasinolepes1.activeSelf == true & kingcasinolepes2.activeSelf == true)
|
||||
{
|
||||
Debug.Log("Maximum kétszer léphetsz egy mezõre");
|
||||
}
|
||||
else {
|
||||
if (tavolsag == 1 && akciopont != 0)
|
||||
{
|
||||
if (twotwocount < 2)
|
||||
{
|
||||
player.transform.position = twotwo.transform.position;
|
||||
jelenlegi_x = 2;
|
||||
jelenlegi_y = 2;
|
||||
akciopont = akciopont - 1;
|
||||
Debug.Log(akciopont);
|
||||
twotwocount++;
|
||||
if (kingcasinolepes1.activeSelf == true)
|
||||
{
|
||||
kingcasinolepes2.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
kingcasinolepes1.SetActive(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum kétszer léphetsz egy mezõre");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Nincs elég akciópontod vagy nem 1 mezõn belül akarsz lépni");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -232,20 +385,42 @@ public class movement : MonoBehaviour {
|
||||
Debug.Log("Player clicked on the collider: " + threetwo_Collider.gameObject.name);
|
||||
tavolsag = math.abs((jelenlegi_x + jelenlegi_y) - ((x + 1) + (y + 1)));
|
||||
|
||||
if (tavolsag == 1 && akciopont != 0) {
|
||||
if (threetwocount < 2) {
|
||||
player.transform.position = threetwo.transform.position;
|
||||
jelenlegi_x = 3;
|
||||
jelenlegi_y = 2;
|
||||
akciopont = akciopont - 1;
|
||||
Debug.Log(akciopont);
|
||||
threetwocount++;
|
||||
} else {
|
||||
Debug.Log("Maximum kétszer léphetsz egy mez?re");
|
||||
}
|
||||
} else {
|
||||
Debug.Log("Nincs elég akciópontod vagy nem 1 mez?n belül akarsz lépni");
|
||||
if (feltoltolepes1.activeSelf == true & feltoltolepes2.activeSelf == true)
|
||||
{
|
||||
Debug.Log("Maximum kétszer léphetsz egy mezõre");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag == 1 && akciopont != 0)
|
||||
{
|
||||
if (threetwocount < 2)
|
||||
{
|
||||
player.transform.position = threetwo.transform.position;
|
||||
jelenlegi_x = 3;
|
||||
jelenlegi_y = 2;
|
||||
akciopont = akciopont - 1;
|
||||
Debug.Log(akciopont);
|
||||
threetwocount++;
|
||||
if (feltoltolepes1.activeSelf == true)
|
||||
{
|
||||
feltoltolepes2.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
feltoltolepes1.SetActive(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum kétszer léphetsz egy mez?re");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Nincs elég akciópontod vagy nem 1 mez?n belül akarsz lépni");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -258,20 +433,42 @@ public class movement : MonoBehaviour {
|
||||
Debug.Log("Player clicked on the collider: " + onethree_Collider.gameObject.name);
|
||||
tavolsag = math.abs((jelenlegi_x + jelenlegi_y) - ((x + 1) + (y + 1)));
|
||||
|
||||
if (tavolsag == 1 && akciopont != 0) {
|
||||
if (onethreecount < 2) {
|
||||
player.transform.position = onethree.transform.position;
|
||||
jelenlegi_x = 1;
|
||||
jelenlegi_y = 3;
|
||||
akciopont = akciopont - 1;
|
||||
Debug.Log(akciopont);
|
||||
onethreecount++;
|
||||
} else {
|
||||
Debug.Log("Maximum kétszer léphetsz egy mez?re");
|
||||
}
|
||||
} else {
|
||||
Debug.Log("Nincs elég akciópontod vagy nem 1 mez?n belül akarsz lépni");
|
||||
if (kutatolaborlepes1.activeSelf == true & kutatolaborlepes2.activeSelf == true)
|
||||
{
|
||||
Debug.Log("Maximum kétszer léphetsz egy mezõre");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag == 1 && akciopont != 0)
|
||||
{
|
||||
if (onethreecount < 2)
|
||||
{
|
||||
player.transform.position = onethree.transform.position;
|
||||
jelenlegi_x = 1;
|
||||
jelenlegi_y = 3;
|
||||
akciopont = akciopont - 1;
|
||||
Debug.Log(akciopont);
|
||||
onethreecount++;
|
||||
if (kutatolaborlepes1.activeSelf == true)
|
||||
{
|
||||
kutatolaborlepes2.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
kutatolaborlepes1.SetActive(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum kétszer léphetsz egy mez?re");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Nincs elég akciópontod vagy nem 1 mez?n belül akarsz lépni");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -284,20 +481,43 @@ public class movement : MonoBehaviour {
|
||||
Debug.Log("Player clicked on the collider: " + twothree_Collider.gameObject.name);
|
||||
tavolsag = math.abs((jelenlegi_x + jelenlegi_y) - ((x + 1) + (y + 1)));
|
||||
|
||||
if (tavolsag == 1 && akciopont != 0) {
|
||||
if (twothreecount < 2) {
|
||||
player.transform.position = twothree.transform.position;
|
||||
jelenlegi_x = 2;
|
||||
jelenlegi_y = 3;
|
||||
akciopont = akciopont - 1;
|
||||
Debug.Log(akciopont);
|
||||
twothreecount++;
|
||||
} else {
|
||||
Debug.Log("Maximum kétszer léphetsz egy mez?re");
|
||||
}
|
||||
} else {
|
||||
Debug.Log("Nincs elég akciópontod vagy nem 1 mez?n belül akarsz lépni");
|
||||
if (kriptoklublepes1.activeSelf == true & kriptoklublepes2.activeSelf == true)
|
||||
{
|
||||
Debug.Log("Maximum kétszer léphetsz egy mezõre");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag == 1 && akciopont != 0)
|
||||
{
|
||||
if (twothreecount < 2)
|
||||
{
|
||||
player.transform.position = twothree.transform.position;
|
||||
jelenlegi_x = 2;
|
||||
jelenlegi_y = 3;
|
||||
akciopont = akciopont - 1;
|
||||
Debug.Log(akciopont);
|
||||
twothreecount++;
|
||||
if (kriptoklublepes1.activeSelf == true)
|
||||
{
|
||||
kriptoklublepes2.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
kriptoklublepes1.SetActive(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum kétszer léphetsz egy mez?re");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Nincs elég akciópontod vagy nem 1 mez?n belül akarsz lépni");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -310,20 +530,42 @@ public class movement : MonoBehaviour {
|
||||
Debug.Log("Player clicked on the collider: " + threethree_Collider.gameObject.name);
|
||||
tavolsag = math.abs((jelenlegi_x + jelenlegi_y) - ((x + 1) + (y + 1)));
|
||||
|
||||
if (tavolsag == 1 && akciopont != 0) {
|
||||
if (threethreecount < 2) {
|
||||
player.transform.position = threethree.transform.position;
|
||||
jelenlegi_x = 3;
|
||||
jelenlegi_y = 3;
|
||||
akciopont = akciopont - 1;
|
||||
Debug.Log(akciopont);
|
||||
threethreecount++;
|
||||
} else {
|
||||
Debug.Log("Maximum kétszer léphetsz egy mez?re");
|
||||
}
|
||||
} else {
|
||||
Debug.Log("Nincs elég akciópontod vagy nem 1 mez?n belül akarsz lépni");
|
||||
if (cyberplazalepes1.activeSelf == true & cyberplazalepes2.activeSelf == true)
|
||||
{
|
||||
Debug.Log("Maximum kétszer léphetsz egy mezõre");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag == 1 && akciopont != 0)
|
||||
{
|
||||
if (threethreecount < 2)
|
||||
{
|
||||
player.transform.position = threethree.transform.position;
|
||||
jelenlegi_x = 3;
|
||||
jelenlegi_y = 3;
|
||||
akciopont = akciopont - 1;
|
||||
Debug.Log(akciopont);
|
||||
threethreecount++;
|
||||
if (cyberplazalepes1.activeSelf == true)
|
||||
{
|
||||
cyberplazalepes2.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
cyberplazalepes1.SetActive(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum kétszer léphetsz egy mezõre");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Nincs elég akciópontod vagy nem 1 mez?n belül akarsz lépni");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -336,20 +578,42 @@ public class movement : MonoBehaviour {
|
||||
Debug.Log("Player clicked on the collider: " + onefour_Collider.gameObject.name);
|
||||
tavolsag = math.abs((jelenlegi_x + jelenlegi_y) - ((x + 1) + (y + 1)));
|
||||
|
||||
if (tavolsag == 1 && akciopont != 0) {
|
||||
if (onefourcount < 2) {
|
||||
player.transform.position = onefour.transform.position;
|
||||
jelenlegi_x = 1;
|
||||
jelenlegi_y = 4;
|
||||
akciopont = akciopont - 1;
|
||||
Debug.Log(akciopont);
|
||||
onefourcount++;
|
||||
} else {
|
||||
Debug.Log("Maximum kétszer léphetsz egy mez?re");
|
||||
}
|
||||
} else {
|
||||
Debug.Log("Nincs elég akciópontod vagy nem 1 mez?n belül akarsz lépni");
|
||||
if (hadiuzemlepes1.activeSelf == true & hadiuzemlepes2.activeSelf == true)
|
||||
{
|
||||
Debug.Log("Maximum kétszer léphetsz egy mezõre");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag == 1 && akciopont != 0)
|
||||
{
|
||||
if (onefourcount < 2)
|
||||
{
|
||||
player.transform.position = onefour.transform.position;
|
||||
jelenlegi_x = 1;
|
||||
jelenlegi_y = 4;
|
||||
akciopont = akciopont - 1;
|
||||
Debug.Log(akciopont);
|
||||
onefourcount++;
|
||||
if (hadiuzemlepes1.activeSelf == true)
|
||||
{
|
||||
hadiuzemlepes2.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
hadiuzemlepes1.SetActive(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum kétszer léphetsz egy mez?re");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Nincs elég akciópontod vagy nem 1 mez?n belül akarsz lépni");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -362,20 +626,42 @@ public class movement : MonoBehaviour {
|
||||
Debug.Log("Player clicked on the collider: " + twofour_Collider.gameObject.name);
|
||||
tavolsag = math.abs((jelenlegi_x + jelenlegi_y) - ((x + 1) + (y + 1)));
|
||||
|
||||
if (tavolsag == 1 && akciopont != 0) {
|
||||
if (twofourcount < 2) {
|
||||
player.transform.position = twofour.transform.position;
|
||||
jelenlegi_x = 2;
|
||||
jelenlegi_y = 4;
|
||||
akciopont = akciopont - 1;
|
||||
Debug.Log(akciopont);
|
||||
twofourcount++;
|
||||
} else {
|
||||
Debug.Log("Maximum kétszer léphetsz egy mez?re");
|
||||
}
|
||||
} else {
|
||||
Debug.Log("Nincs elég akciópontod vagy nem 1 mez?n belül akarsz lépni");
|
||||
if (konyvtarlepes1.activeSelf == true & konyvtarlepes2.activeSelf == true)
|
||||
{
|
||||
Debug.Log("Maximum kétszer léphetsz egy mezõre");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag == 1 && akciopont != 0)
|
||||
{
|
||||
if (twofourcount < 2)
|
||||
{
|
||||
player.transform.position = twofour.transform.position;
|
||||
jelenlegi_x = 2;
|
||||
jelenlegi_y = 4;
|
||||
akciopont = akciopont - 1;
|
||||
Debug.Log(akciopont);
|
||||
twofourcount++;
|
||||
if (konyvtarlepes1.activeSelf == true)
|
||||
{
|
||||
konyvtarlepes2.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
konyvtarlepes1.SetActive(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum kétszer léphetsz egy mez?re");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Nincs elég akciópontod vagy nem 1 mez?n belül akarsz lépni");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -388,20 +674,42 @@ public class movement : MonoBehaviour {
|
||||
Debug.Log("Player clicked on the collider: " + threefour_Collider.gameObject.name);
|
||||
tavolsag = math.abs((jelenlegi_x + jelenlegi_y) - ((x + 1) + (y + 1)));
|
||||
|
||||
if (tavolsag == 1 && akciopont != 0) {
|
||||
if (threefourcount < 2) {
|
||||
player.transform.position = threefour.transform.position;
|
||||
jelenlegi_x = 3;
|
||||
jelenlegi_y = 4;
|
||||
akciopont = akciopont - 1;
|
||||
Debug.Log(akciopont);
|
||||
threefourcount++;
|
||||
} else {
|
||||
Debug.Log("Maximum kétszer léphetsz egy mez?re");
|
||||
}
|
||||
} else {
|
||||
Debug.Log("Nincs elég akciópontod vagy nem 1 mez?n belül akarsz lépni");
|
||||
if (korhazlepes1.activeSelf == true & korhazlepes2.activeSelf == true)
|
||||
{
|
||||
Debug.Log("Maximum kétszer léphetsz egy mezõre");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tavolsag == 1 && akciopont != 0)
|
||||
{
|
||||
if (threefourcount < 2)
|
||||
{
|
||||
player.transform.position = threefour.transform.position;
|
||||
jelenlegi_x = 3;
|
||||
jelenlegi_y = 4;
|
||||
akciopont = akciopont - 1;
|
||||
Debug.Log(akciopont);
|
||||
threefourcount++;
|
||||
if (korhazlepes1.activeSelf == true)
|
||||
{
|
||||
korhazlepes2.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
korhazlepes1.SetActive(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum kétszer léphetsz egy mez?re");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Nincs elég akciópontod vagy nem 1 mez?n belül akarsz lépni");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user