Merge pull request #17 from playmaker1210/elet
eletvesztes ugynok
This commit was merged in pull request #17.
This commit is contained in:
@@ -64,9 +64,9 @@ public class Akciok : MonoBehaviour
|
|||||||
{
|
{
|
||||||
if (tolteny_index < 24 && ap.akciopont != 0)
|
if (tolteny_index < 24 && ap.akciopont != 0)
|
||||||
{
|
{
|
||||||
if (tolteny_index + betarazas > 23)
|
if (tolteny_index + betarazas > 24)
|
||||||
{
|
{
|
||||||
tolteny_index = 23;
|
tolteny_index = 24;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ public class Ugynok : MonoBehaviour
|
|||||||
private Akciok akciok;
|
private Akciok akciok;
|
||||||
private Upgrade upgrade;
|
private Upgrade upgrade;
|
||||||
private jatekmanager jatekmanager;
|
private jatekmanager jatekmanager;
|
||||||
|
private Elet elet;
|
||||||
private movement movement;
|
private movement movement;
|
||||||
|
|
||||||
public TMP_Text[] oneone;
|
public TMP_Text[] oneone;
|
||||||
@@ -43,11 +44,18 @@ public class Ugynok : MonoBehaviour
|
|||||||
public void setCanKillTrue(){ canKill = true; }
|
public void setCanKillTrue(){ canKill = true; }
|
||||||
public Camera maincamera;
|
public Camera maincamera;
|
||||||
|
|
||||||
|
private string[] previus_ugynok_csapatok;
|
||||||
|
private int elozo_x;
|
||||||
|
private int elozo_y ;
|
||||||
|
|
||||||
private void Awake() {
|
private void Awake() {
|
||||||
akciok = FindObjectOfType<Akciok>();
|
akciok = FindObjectOfType<Akciok>();
|
||||||
upgrade = FindObjectOfType<Upgrade>();
|
upgrade = FindObjectOfType<Upgrade>();
|
||||||
jatekmanager = FindObjectOfType<jatekmanager>();
|
jatekmanager = FindObjectOfType<jatekmanager>();
|
||||||
movement = FindObjectOfType<movement>();
|
movement = FindObjectOfType<movement>();
|
||||||
|
elet = FindObjectOfType<Elet>();
|
||||||
|
|
||||||
|
previus_ugynok_csapatok = new string[3];
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
@@ -338,466 +346,150 @@ public class Ugynok : MonoBehaviour
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void ugynokMegolveElozoHelyen(){
|
||||||
|
if(elozo_x != movement.jelenlegi_x || elozo_y != movement.jelenlegi_y){
|
||||||
|
foreach(var item in previus_ugynok_csapatok){
|
||||||
/* private void Update()
|
if(!item.Equals("")){
|
||||||
{
|
//ha nem ures a text vagyis volt atirva szamra nezze meg hogy X-e
|
||||||
if(canShoot){
|
if(!item.Equals("x")){
|
||||||
if(oneone[0].text.Equals("")){
|
//vonjon le egy eletet
|
||||||
|
elet.Eletvesztes();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(elozo_x == 1 && elozo_y == 1){
|
||||||
|
for (int i = 0; i < 3; i++)
|
||||||
|
{
|
||||||
|
previus_ugynok_csapatok[i] = oneone[i].text;
|
||||||
|
}
|
||||||
|
}else if(elozo_x == 1 && elozo_y == 2){
|
||||||
|
for (int i = 0; i < 3; i++)
|
||||||
|
{
|
||||||
|
previus_ugynok_csapatok[i] = onetwo[i].text;
|
||||||
|
}
|
||||||
|
}else if(elozo_x == 1 && elozo_y == 3){
|
||||||
|
for (int i = 0; i < 3; i++)
|
||||||
|
{
|
||||||
|
previus_ugynok_csapatok[i] = onethree[i].text;
|
||||||
|
}
|
||||||
|
}else if(elozo_x == 1 && elozo_y == 4){
|
||||||
|
for (int i = 0; i < 3; i++)
|
||||||
|
{
|
||||||
|
previus_ugynok_csapatok[i] = onefour[i].text;
|
||||||
|
}
|
||||||
|
}else if(elozo_x == 2 && elozo_y == 1){
|
||||||
|
for (int i = 0; i < 3; i++)
|
||||||
|
{
|
||||||
|
previus_ugynok_csapatok[i] = twoone[i].text;
|
||||||
|
}
|
||||||
|
}else if(elozo_x == 2 && elozo_y == 2){
|
||||||
|
for (int i = 0; i < 3; i++)
|
||||||
|
{
|
||||||
|
previus_ugynok_csapatok[i] = twotwo[i].text;
|
||||||
|
}
|
||||||
|
}else if(elozo_x == 2 && elozo_y == 3){
|
||||||
|
for (int i = 0; i < 3; i++)
|
||||||
|
{
|
||||||
|
previus_ugynok_csapatok[i] = twothree[i].text;
|
||||||
|
}
|
||||||
|
}else if(elozo_x == 2 && elozo_y == 4){
|
||||||
|
for (int i = 0; i < 3; i++)
|
||||||
|
{
|
||||||
|
previus_ugynok_csapatok[i] = twofour[i].text;
|
||||||
|
}
|
||||||
|
}else if(elozo_x == 3 && elozo_y == 1){
|
||||||
|
for (int i = 0; i < 3; i++)
|
||||||
|
{
|
||||||
|
previus_ugynok_csapatok[i] = threeone[i].text;
|
||||||
|
}
|
||||||
|
}else if(elozo_x == 3 && elozo_y == 2){
|
||||||
|
for (int i = 0; i < 3; i++)
|
||||||
|
{
|
||||||
|
previus_ugynok_csapatok[i] = threetwo[i].text;
|
||||||
|
}
|
||||||
|
}else if(elozo_x == 3 && elozo_y == 3){
|
||||||
|
for (int i = 0; i < 3; i++)
|
||||||
|
{
|
||||||
|
previus_ugynok_csapatok[i] = threethree[i].text;
|
||||||
|
}
|
||||||
|
}else if(elozo_x == 3 && elozo_y == 4){
|
||||||
|
for (int i = 0; i < 3; i++)
|
||||||
|
{
|
||||||
|
previus_ugynok_csapatok[i] = threefour[i].text;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canKill)
|
elozo_x = movement.jelenlegi_x;
|
||||||
{
|
elozo_y = movement.jelenlegi_y;
|
||||||
//check for collider onclick then x out tmp text then set canKill false
|
}
|
||||||
//check if text field is empty
|
|
||||||
//oneone
|
public void setElozoHelyszin(int x, int y){
|
||||||
if (Input.GetKeyDown(KeyCode.Mouse0) && oneoneCollider[0].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
elozo_x = x;
|
||||||
|
elozo_y = y;
|
||||||
|
|
||||||
|
if(elozo_x == 1 && elozo_y == 1){
|
||||||
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
if (!oneone[0].text.Equals(""))
|
previus_ugynok_csapatok[i] = oneone[i].text;
|
||||||
{
|
|
||||||
oneone[0].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (Input.GetKeyDown(KeyCode.Mouse0) && oneoneCollider[1].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
}else if(elozo_x == 1 && elozo_y == 2){
|
||||||
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
if (!oneone[1].text.Equals(""))
|
previus_ugynok_csapatok[i] = onetwo[i].text;
|
||||||
{
|
|
||||||
oneone[1].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (Input.GetKeyDown(KeyCode.Mouse0) && oneoneCollider[2].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
}else if(elozo_x == 1 && elozo_y == 3){
|
||||||
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
if (!oneone[2].text.Equals(""))
|
previus_ugynok_csapatok[i] = onethree[i].text;
|
||||||
{
|
|
||||||
oneone[2].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//onetwo
|
}else if(elozo_x == 1 && elozo_y == 4){
|
||||||
if (Input.GetKeyDown(KeyCode.Mouse0) && onetwoCollider[0].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
if (!onetwo[0].text.Equals(""))
|
previus_ugynok_csapatok[i] = onefour[i].text;
|
||||||
{
|
|
||||||
onetwo[0].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (Input.GetKeyDown(KeyCode.Mouse0) && onetwoCollider[1].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
}else if(elozo_x == 2 && elozo_y == 1){
|
||||||
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
if (!onetwo[1].text.Equals(""))
|
previus_ugynok_csapatok[i] = twoone[i].text;
|
||||||
{
|
|
||||||
onetwo[1].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (Input.GetKeyDown(KeyCode.Mouse0) && onetwoCollider[2].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
}else if(elozo_x == 2 && elozo_y == 2){
|
||||||
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
if (!onetwo[2].text.Equals(""))
|
previus_ugynok_csapatok[i] = twotwo[i].text;
|
||||||
{
|
|
||||||
onetwo[2].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//onethree
|
}else if(elozo_x == 2 && elozo_y == 3){
|
||||||
if (Input.GetKeyDown(KeyCode.Mouse0) && onethreeCollider[0].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
if (!onethree[0].text.Equals(""))
|
previus_ugynok_csapatok[i] = twothree[i].text;
|
||||||
{
|
|
||||||
onethree[0].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (Input.GetKeyDown(KeyCode.Mouse0) && onethreeCollider[1].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
}else if(elozo_x == 2 && elozo_y == 4){
|
||||||
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
if (!onethree[1].text.Equals(""))
|
previus_ugynok_csapatok[i] = twofour[i].text;
|
||||||
{
|
|
||||||
onethree[1].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (Input.GetKeyDown(KeyCode.Mouse0) && onethreeCollider[2].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
}else if(elozo_x == 3 && elozo_y == 1){
|
||||||
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
if (!onethree[2].text.Equals(""))
|
previus_ugynok_csapatok[i] = threeone[i].text;
|
||||||
{
|
|
||||||
onethree[2].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//onefour
|
}else if(elozo_x == 3 && elozo_y == 2){
|
||||||
if (Input.GetKeyDown(KeyCode.Mouse0) && onefourCollider[0].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
if (!onefour[0].text.Equals(""))
|
previus_ugynok_csapatok[i] = threetwo[i].text;
|
||||||
{
|
|
||||||
onefour[0].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (Input.GetKeyDown(KeyCode.Mouse0) && onefourCollider[1].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
}else if(elozo_x == 3 && elozo_y == 3){
|
||||||
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
if (!onefour[1].text.Equals(""))
|
previus_ugynok_csapatok[i] = threethree[i].text;
|
||||||
{
|
|
||||||
onefour[1].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (Input.GetKeyDown(KeyCode.Mouse0) && onefourCollider[2].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
}else if(elozo_x == 3 && elozo_y == 4){
|
||||||
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
if (!onefour[2].text.Equals(""))
|
previus_ugynok_csapatok[i] = threefour[i].text;
|
||||||
{
|
|
||||||
onefour[2].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//twoone
|
|
||||||
if (Input.GetKeyDown(KeyCode.Mouse0) && twooneCollider[0].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
|
||||||
{
|
|
||||||
if (!twoone[0].text.Equals(""))
|
|
||||||
{
|
|
||||||
twoone[0].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (Input.GetKeyDown(KeyCode.Mouse0) && twooneCollider[1].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
|
||||||
{
|
|
||||||
if (!twoone[1].text.Equals(""))
|
|
||||||
{
|
|
||||||
twoone[1].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (Input.GetKeyDown(KeyCode.Mouse0) && twooneCollider[2].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
|
||||||
{
|
|
||||||
if (!twoone[2].text.Equals(""))
|
|
||||||
{
|
|
||||||
twoone[2].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//twotwo
|
|
||||||
if (Input.GetKeyDown(KeyCode.Mouse0) && twotwoCollider[0].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
|
||||||
{
|
|
||||||
if (!twotwo[0].text.Equals(""))
|
|
||||||
{
|
|
||||||
twotwo[0].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (Input.GetKeyDown(KeyCode.Mouse0) && twotwoCollider[1].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
|
||||||
{
|
|
||||||
if (!twotwo[1].text.Equals(""))
|
|
||||||
{
|
|
||||||
twotwo[1].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (Input.GetKeyDown(KeyCode.Mouse0) && twotwoCollider[2].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
|
||||||
{
|
|
||||||
if (!twotwo[2].text.Equals(""))
|
|
||||||
{
|
|
||||||
twotwo[2].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//twothree
|
|
||||||
if (Input.GetKeyDown(KeyCode.Mouse0) && twothreeCollider[0].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
|
||||||
{
|
|
||||||
if (!twothree[0].text.Equals(""))
|
|
||||||
{
|
|
||||||
twothree[0].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (Input.GetKeyDown(KeyCode.Mouse0) && twothreeCollider[1].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
|
||||||
{
|
|
||||||
if (!twothree[1].text.Equals(""))
|
|
||||||
{
|
|
||||||
twothree[1].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (Input.GetKeyDown(KeyCode.Mouse0) && twothreeCollider[2].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
|
||||||
{
|
|
||||||
if (!twothree[2].text.Equals(""))
|
|
||||||
{
|
|
||||||
twothree[2].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//twofour
|
|
||||||
if (Input.GetKeyDown(KeyCode.Mouse0) && twofourCollider[0].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
|
||||||
{
|
|
||||||
if (!twofour[0].text.Equals(""))
|
|
||||||
{
|
|
||||||
twofour[0].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (Input.GetKeyDown(KeyCode.Mouse0) && twofourCollider[1].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
|
||||||
{
|
|
||||||
if (!twofour[1].text.Equals(""))
|
|
||||||
{
|
|
||||||
twofour[1].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (Input.GetKeyDown(KeyCode.Mouse0) && twofourCollider[2].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
|
||||||
{
|
|
||||||
if (!twofour[2].text.Equals(""))
|
|
||||||
{
|
|
||||||
twofour[2].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//threeone
|
|
||||||
if (Input.GetKeyDown(KeyCode.Mouse0) && threeoneCollider[0].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
|
||||||
{
|
|
||||||
if (!threeone[0].text.Equals(""))
|
|
||||||
{
|
|
||||||
threeone[0].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (Input.GetKeyDown(KeyCode.Mouse0) && threeoneCollider[1].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
|
||||||
{
|
|
||||||
if (!threeone[1].text.Equals(""))
|
|
||||||
{
|
|
||||||
threeone[1].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (Input.GetKeyDown(KeyCode.Mouse0) && threeoneCollider[2].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
|
||||||
{
|
|
||||||
if (!threeone[2].text.Equals(""))
|
|
||||||
{
|
|
||||||
threeone[2].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//threetwo
|
|
||||||
if (Input.GetKeyDown(KeyCode.Mouse0) && threetwoCollider[0].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
|
||||||
{
|
|
||||||
if (!threetwo[0].text.Equals(""))
|
|
||||||
{
|
|
||||||
threetwo[0].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (Input.GetKeyDown(KeyCode.Mouse0) && threetwoCollider[1].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
|
||||||
{
|
|
||||||
if (!threetwo[1].text.Equals(""))
|
|
||||||
{
|
|
||||||
threetwo[1].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (Input.GetKeyDown(KeyCode.Mouse0) && threetwoCollider[2].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
|
||||||
{
|
|
||||||
if (!threetwo[2].text.Equals(""))
|
|
||||||
{
|
|
||||||
threetwo[2].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//threethree
|
|
||||||
if (Input.GetKeyDown(KeyCode.Mouse0) && threethreeCollider[0].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
|
||||||
{
|
|
||||||
if (!threethree[0].text.Equals(""))
|
|
||||||
{
|
|
||||||
threethree[0].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (Input.GetKeyDown(KeyCode.Mouse0) && threethreeCollider[1].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
|
||||||
{
|
|
||||||
if (!threethree[1].text.Equals(""))
|
|
||||||
{
|
|
||||||
threethree[1].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (Input.GetKeyDown(KeyCode.Mouse0) && threethreeCollider[2].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
|
||||||
{
|
|
||||||
if (!threethree[2].text.Equals(""))
|
|
||||||
{
|
|
||||||
threethree[2].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//threefour
|
|
||||||
if (Input.GetKeyDown(KeyCode.Mouse0) && threefourCollider[0].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
|
||||||
{
|
|
||||||
if (!threefour[0].text.Equals(""))
|
|
||||||
{
|
|
||||||
threefour[0].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (Input.GetKeyDown(KeyCode.Mouse0) && threefourCollider[1].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
|
||||||
{
|
|
||||||
if (!threefour[1].text.Equals(""))
|
|
||||||
{
|
|
||||||
threefour[1].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (Input.GetKeyDown(KeyCode.Mouse0) && threefourCollider[2].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
|
||||||
{
|
|
||||||
if (!threefour[2].text.Equals(""))
|
|
||||||
{
|
|
||||||
threefour[2].text = "X";
|
|
||||||
canKill = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("itt nincs ugynok csapat!!!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
@@ -105,10 +105,11 @@ public class movement : MonoBehaviour
|
|||||||
{"", "", "", "" }
|
{"", "", "", "" }
|
||||||
};
|
};
|
||||||
|
|
||||||
private void Awake() {
|
private void Awake()
|
||||||
|
{
|
||||||
ap = FindObjectOfType<Akciopont>();
|
ap = FindObjectOfType<Akciopont>();
|
||||||
ugynok = FindObjectOfType<Ugynok>();
|
ugynok = FindObjectOfType<Ugynok>();
|
||||||
targyak = FindObjectOfType<Targyak>();
|
targyak = FindObjectOfType<Targyak>();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
@@ -265,6 +266,8 @@ public class movement : MonoBehaviour
|
|||||||
jelenlegi_y = 4;
|
jelenlegi_y = 4;
|
||||||
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ugynok.setElozoHelyszin(jelenlegi_x, jelenlegi_y);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void mozgasHelyre(int x, int y)
|
public void mozgasHelyre(int x, int y)
|
||||||
@@ -351,7 +354,7 @@ public class movement : MonoBehaviour
|
|||||||
Debug.Log("Player clicked on the collider: " + oneone_Collider.gameObject.name);
|
Debug.Log("Player clicked on the collider: " + oneone_Collider.gameObject.name);
|
||||||
if (eromulepes1.activeSelf == true & eromulepes2.activeSelf == true)
|
if (eromulepes1.activeSelf == true & eromulepes2.activeSelf == true)
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -381,7 +384,7 @@ public class movement : MonoBehaviour
|
|||||||
Debug.Log("Player clicked on the collider: " + twoone_Collider.gameObject.name);
|
Debug.Log("Player clicked on the collider: " + twoone_Collider.gameObject.name);
|
||||||
if (feketepiaclepes1.activeSelf == true & feketepiaclepes2.activeSelf == true)
|
if (feketepiaclepes1.activeSelf == true & feketepiaclepes2.activeSelf == true)
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -407,7 +410,7 @@ public class movement : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez?re");
|
Debug.Log("Maximum ketszer lephetsz egy mez?re");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -421,7 +424,7 @@ public class movement : MonoBehaviour
|
|||||||
Debug.Log("Player clicked on the collider: " + threeone_Collider.gameObject.name);
|
Debug.Log("Player clicked on the collider: " + threeone_Collider.gameObject.name);
|
||||||
if (metrolepes1.activeSelf == true & metrolepes2.activeSelf == true)
|
if (metrolepes1.activeSelf == true & metrolepes2.activeSelf == true)
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -458,7 +461,7 @@ public class movement : MonoBehaviour
|
|||||||
Debug.Log("Player clicked on the collider: " + onetwo_Collider.gameObject.name);
|
Debug.Log("Player clicked on the collider: " + onetwo_Collider.gameObject.name);
|
||||||
if (szervereklepes1.activeSelf == true & szervereklepes2.activeSelf == true)
|
if (szervereklepes1.activeSelf == true & szervereklepes2.activeSelf == true)
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -485,7 +488,7 @@ public class movement : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Nincs el<EFBFBD>g akci<EFBFBD>pontod vagy nem 1 mez<EFBFBD>n bel<EFBFBD>l akarsz l<EFBFBD>pni");
|
Debug.Log("Nincs eleg akciopontod vagy nem 1 mezon belul akarsz lepni");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -496,7 +499,7 @@ public class movement : MonoBehaviour
|
|||||||
Debug.Log("Player clicked on the collider: " + twotwo_Collider.gameObject.name);
|
Debug.Log("Player clicked on the collider: " + twotwo_Collider.gameObject.name);
|
||||||
if (kingcasinolepes1.activeSelf == true & kingcasinolepes2.activeSelf == true)
|
if (kingcasinolepes1.activeSelf == true & kingcasinolepes2.activeSelf == true)
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -522,7 +525,7 @@ public class movement : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -533,7 +536,7 @@ public class movement : MonoBehaviour
|
|||||||
Debug.Log("Player clicked on the collider: " + threetwo_Collider.gameObject.name);
|
Debug.Log("Player clicked on the collider: " + threetwo_Collider.gameObject.name);
|
||||||
if (feltoltolepes1.activeSelf == true & feltoltolepes2.activeSelf == true)
|
if (feltoltolepes1.activeSelf == true & feltoltolepes2.activeSelf == true)
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -559,7 +562,7 @@ public class movement : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez?re");
|
Debug.Log("Maximum ketszer lephetsz egy mez?re");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -572,7 +575,7 @@ public class movement : MonoBehaviour
|
|||||||
|
|
||||||
if (kutatolaborlepes1.activeSelf == true & kutatolaborlepes2.activeSelf == true)
|
if (kutatolaborlepes1.activeSelf == true & kutatolaborlepes2.activeSelf == true)
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -598,7 +601,7 @@ public class movement : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez?re");
|
Debug.Log("Maximum ketszer lephetsz egy mez?re");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -613,7 +616,7 @@ public class movement : MonoBehaviour
|
|||||||
|
|
||||||
if (kriptoklublepes1.activeSelf == true & kriptoklublepes2.activeSelf == true)
|
if (kriptoklublepes1.activeSelf == true & kriptoklublepes2.activeSelf == true)
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -639,7 +642,7 @@ public class movement : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez?re");
|
Debug.Log("Maximum ketszer lephetsz egy mez?re");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -655,7 +658,7 @@ public class movement : MonoBehaviour
|
|||||||
|
|
||||||
if (cyberplazalepes1.activeSelf == true & cyberplazalepes2.activeSelf == true)
|
if (cyberplazalepes1.activeSelf == true & cyberplazalepes2.activeSelf == true)
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -681,7 +684,7 @@ public class movement : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -696,7 +699,7 @@ public class movement : MonoBehaviour
|
|||||||
|
|
||||||
if (hadiuzemlepes1.activeSelf == true & hadiuzemlepes2.activeSelf == true)
|
if (hadiuzemlepes1.activeSelf == true & hadiuzemlepes2.activeSelf == true)
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -722,7 +725,7 @@ public class movement : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez?re");
|
Debug.Log("Maximum ketszer lephetsz egy mez?re");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -737,7 +740,7 @@ public class movement : MonoBehaviour
|
|||||||
|
|
||||||
if (konyvtarlepes1.activeSelf == true & konyvtarlepes2.activeSelf == true)
|
if (konyvtarlepes1.activeSelf == true & konyvtarlepes2.activeSelf == true)
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -763,7 +766,7 @@ public class movement : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez?re");
|
Debug.Log("Maximum ketszer lephetsz egy mez?re");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -778,7 +781,7 @@ public class movement : MonoBehaviour
|
|||||||
|
|
||||||
if (korhazlepes1.activeSelf == true & korhazlepes2.activeSelf == true)
|
if (korhazlepes1.activeSelf == true & korhazlepes2.activeSelf == true)
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -804,7 +807,7 @@ public class movement : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez?re");
|
Debug.Log("Maximum ketszer lephetsz egy mez?re");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -820,7 +823,7 @@ public class movement : MonoBehaviour
|
|||||||
{
|
{
|
||||||
tavolsag = math.abs(tavolsag);
|
tavolsag = math.abs(tavolsag);
|
||||||
|
|
||||||
// player mozgat<EFBFBD>sa <EFBFBD>s konzolra irat<EFBFBD>s
|
// player mozgatasa es konzolra iratas
|
||||||
if (Input.GetKeyDown(KeyCode.Mouse0) && oneone_Collider.OverlapPoint(THE_Camera.ScreenToWorldPoint(Input.mousePosition)))
|
if (Input.GetKeyDown(KeyCode.Mouse0) && oneone_Collider.OverlapPoint(THE_Camera.ScreenToWorldPoint(Input.mousePosition)))
|
||||||
{
|
{
|
||||||
for (int x = 0; x < w; x++)
|
for (int x = 0; x < w; x++)
|
||||||
@@ -842,21 +845,22 @@ public class movement : MonoBehaviour
|
|||||||
player.transform.position = oneone.transform.position;
|
player.transform.position = oneone.transform.position;
|
||||||
jelenlegi_x = 1;
|
jelenlegi_x = 1;
|
||||||
jelenlegi_y = 1;
|
jelenlegi_y = 1;
|
||||||
if (targyak.lathatatlanOltozetAktivalva)
|
if (targyak.lathatatlanOltozetAktivalva)
|
||||||
{
|
{
|
||||||
targyak.lathatatlanOltozetAktivalva = false;
|
targyak.lathatatlanOltozetAktivalva = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//ap.akciopont = ap.akciopont - tavolsag;
|
//ap.akciopont = ap.akciopont - tavolsag;
|
||||||
ap.UpdateAkciopont(-tavolsag);
|
ap.UpdateAkciopont(-tavolsag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
oneonecount = oneonecount + 1;
|
oneonecount = oneonecount + 1;
|
||||||
Debug.Log(ap.akciopont);
|
Debug.Log(ap.akciopont);
|
||||||
Debug.Log("ugynok sorsolas");
|
Debug.Log("ugynok sorsolas");
|
||||||
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||||
|
ugynok.ugynokMegolveElozoHelyen();
|
||||||
if (eromulepes1.activeSelf == true)
|
if (eromulepes1.activeSelf == true)
|
||||||
{
|
{
|
||||||
eromulepes2.SetActive(true);
|
eromulepes2.SetActive(true);
|
||||||
@@ -872,7 +876,7 @@ public class movement : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Nincs el<EFBFBD>g akci<EFBFBD>pontod vagy nem 1 mez?n bel<EFBFBD>l akarsz l<EFBFBD>pni");
|
Debug.Log("Nincs eleg akciopontod vagy nem 1 mez?n belul akarsz lepni");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -892,7 +896,7 @@ public class movement : MonoBehaviour
|
|||||||
tavolsag = math.abs((x + 1) - jelenlegi_x) + math.abs((y + 1) - jelenlegi_y);
|
tavolsag = math.abs((x + 1) - jelenlegi_x) + math.abs((y + 1) - jelenlegi_y);
|
||||||
if (feketepiaclepes1.activeSelf == true & feketepiaclepes2.activeSelf == true)
|
if (feketepiaclepes1.activeSelf == true & feketepiaclepes2.activeSelf == true)
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -907,18 +911,19 @@ public class movement : MonoBehaviour
|
|||||||
player.transform.position = twoone.transform.position;
|
player.transform.position = twoone.transform.position;
|
||||||
jelenlegi_x = 2;
|
jelenlegi_x = 2;
|
||||||
jelenlegi_y = 1;
|
jelenlegi_y = 1;
|
||||||
if (targyak.lathatatlanOltozetAktivalva)
|
if (targyak.lathatatlanOltozetAktivalva)
|
||||||
{
|
{
|
||||||
targyak.lathatatlanOltozetAktivalva = false;
|
targyak.lathatatlanOltozetAktivalva = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//ap.akciopont = ap.akciopont - tavolsag;
|
//ap.akciopont = ap.akciopont - tavolsag;
|
||||||
ap.UpdateAkciopont(-tavolsag);
|
ap.UpdateAkciopont(-tavolsag);
|
||||||
}
|
}
|
||||||
twoonecount = twoonecount + 1;
|
twoonecount = twoonecount + 1;
|
||||||
Debug.Log(ap.akciopont); Debug.Log("ugynok sorsolas");
|
Debug.Log(ap.akciopont); Debug.Log("ugynok sorsolas");
|
||||||
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||||
|
ugynok.ugynokMegolveElozoHelyen();
|
||||||
if (feketepiaclepes1.activeSelf == true)
|
if (feketepiaclepes1.activeSelf == true)
|
||||||
{
|
{
|
||||||
feketepiaclepes2.SetActive(true);
|
feketepiaclepes2.SetActive(true);
|
||||||
@@ -934,12 +939,12 @@ public class movement : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez?re");
|
Debug.Log("Maximum ketszer lephetsz egy mez?re");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Nincs el<EFBFBD>g akci<EFBFBD>pontod vagy nem 1 mez?n bel<EFBFBD>l akarsz l<EFBFBD>pni");
|
Debug.Log("Nincs eleg akciopontod vagy nem 1 mez?n belul akarsz lepni");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -960,7 +965,7 @@ public class movement : MonoBehaviour
|
|||||||
tavolsag = math.abs((x + 1) - jelenlegi_x) + math.abs((y + 1) - jelenlegi_y);
|
tavolsag = math.abs((x + 1) - jelenlegi_x) + math.abs((y + 1) - jelenlegi_y);
|
||||||
if (metrolepes1.activeSelf == true & metrolepes2.activeSelf == true)
|
if (metrolepes1.activeSelf == true & metrolepes2.activeSelf == true)
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -971,18 +976,20 @@ public class movement : MonoBehaviour
|
|||||||
player.transform.position = threeone.transform.position;
|
player.transform.position = threeone.transform.position;
|
||||||
jelenlegi_x = 3;
|
jelenlegi_x = 3;
|
||||||
jelenlegi_y = 1;
|
jelenlegi_y = 1;
|
||||||
if (targyak.lathatatlanOltozetAktivalva)
|
if (targyak.lathatatlanOltozetAktivalva)
|
||||||
{
|
{
|
||||||
targyak.lathatatlanOltozetAktivalva = false;
|
targyak.lathatatlanOltozetAktivalva = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//ap.akciopont = ap.akciopont - tavolsag;
|
//ap.akciopont = ap.akciopont - tavolsag;
|
||||||
ap.UpdateAkciopont(-tavolsag);
|
ap.UpdateAkciopont(-tavolsag);
|
||||||
}
|
}
|
||||||
threeonecount++;
|
threeonecount++;
|
||||||
Debug.Log(ap.akciopont); Debug.Log("ugynok sorsolas");
|
Debug.Log(ap.akciopont);
|
||||||
|
Debug.Log("ugynok sorsolas");
|
||||||
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||||
|
ugynok.ugynokMegolveElozoHelyen();
|
||||||
if (metrolepes1.activeSelf == true)
|
if (metrolepes1.activeSelf == true)
|
||||||
{
|
{
|
||||||
metrolepes2.SetActive(true);
|
metrolepes2.SetActive(true);
|
||||||
@@ -998,12 +1005,12 @@ public class movement : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Nincs el<EFBFBD>g akci<EFBFBD>pontod vagy nem 1 mez?n bel<EFBFBD>l akarsz l<EFBFBD>pni");
|
Debug.Log("Nincs eleg akciopontod vagy nem 1 mez?n belul akarsz lepni");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1024,7 +1031,7 @@ public class movement : MonoBehaviour
|
|||||||
|
|
||||||
if (szervereklepes1.activeSelf == true & szervereklepes2.activeSelf == true)
|
if (szervereklepes1.activeSelf == true & szervereklepes2.activeSelf == true)
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1039,19 +1046,20 @@ public class movement : MonoBehaviour
|
|||||||
player.transform.position = onetwo.transform.position;
|
player.transform.position = onetwo.transform.position;
|
||||||
jelenlegi_x = 1;
|
jelenlegi_x = 1;
|
||||||
jelenlegi_y = 2;
|
jelenlegi_y = 2;
|
||||||
if (targyak.lathatatlanOltozetAktivalva)
|
if (targyak.lathatatlanOltozetAktivalva)
|
||||||
{
|
{
|
||||||
targyak.lathatatlanOltozetAktivalva = false;
|
targyak.lathatatlanOltozetAktivalva = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//ap.akciopont = ap.akciopont - tavolsag;
|
//ap.akciopont = ap.akciopont - tavolsag;
|
||||||
ap.UpdateAkciopont(-tavolsag);
|
ap.UpdateAkciopont(-tavolsag);
|
||||||
}
|
}
|
||||||
onetwocount++;
|
onetwocount++;
|
||||||
Debug.Log(ap.akciopont);
|
Debug.Log(ap.akciopont);
|
||||||
Debug.Log("ugynok sorsolas");
|
Debug.Log("ugynok sorsolas");
|
||||||
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||||
|
ugynok.ugynokMegolveElozoHelyen();
|
||||||
if (szervereklepes1.activeSelf == true)
|
if (szervereklepes1.activeSelf == true)
|
||||||
{
|
{
|
||||||
szervereklepes2.SetActive(true);
|
szervereklepes2.SetActive(true);
|
||||||
@@ -1067,12 +1075,12 @@ public class movement : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Nincs el<EFBFBD>g akci<EFBFBD>pontod vagy nem 1 mez<EFBFBD>n bel<EFBFBD>l akarsz l<EFBFBD>pni");
|
Debug.Log("Nincs eleg akciopontod vagy nem 1 mezon belul akarsz lepni");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1093,7 +1101,7 @@ public class movement : MonoBehaviour
|
|||||||
|
|
||||||
if (kingcasinolepes1.activeSelf == true & kingcasinolepes2.activeSelf == true)
|
if (kingcasinolepes1.activeSelf == true & kingcasinolepes2.activeSelf == true)
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1104,18 +1112,19 @@ public class movement : MonoBehaviour
|
|||||||
player.transform.position = twotwo.transform.position;
|
player.transform.position = twotwo.transform.position;
|
||||||
jelenlegi_x = 2;
|
jelenlegi_x = 2;
|
||||||
jelenlegi_y = 2;
|
jelenlegi_y = 2;
|
||||||
if (targyak.lathatatlanOltozetAktivalva)
|
if (targyak.lathatatlanOltozetAktivalva)
|
||||||
{
|
{
|
||||||
targyak.lathatatlanOltozetAktivalva = false;
|
targyak.lathatatlanOltozetAktivalva = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//ap.akciopont = ap.akciopont - tavolsag;
|
//ap.akciopont = ap.akciopont - tavolsag;
|
||||||
ap.UpdateAkciopont(-tavolsag);
|
ap.UpdateAkciopont(-tavolsag);
|
||||||
}
|
}
|
||||||
Debug.Log(ap.akciopont);
|
Debug.Log(ap.akciopont);
|
||||||
Debug.Log("ugynok sorsolas");
|
Debug.Log("ugynok sorsolas");
|
||||||
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||||
|
ugynok.ugynokMegolveElozoHelyen();
|
||||||
twotwocount++;
|
twotwocount++;
|
||||||
if (kingcasinolepes1.activeSelf == true)
|
if (kingcasinolepes1.activeSelf == true)
|
||||||
{
|
{
|
||||||
@@ -1132,12 +1141,12 @@ public class movement : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Nincs el<EFBFBD>g akci<EFBFBD>pontod vagy nem 1 mez<EFBFBD>n bel<EFBFBD>l akarsz l<EFBFBD>pni");
|
Debug.Log("Nincs eleg akciopontod vagy nem 1 mezon belul akarsz lepni");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1159,7 +1168,7 @@ public class movement : MonoBehaviour
|
|||||||
|
|
||||||
if (feltoltolepes1.activeSelf == true & feltoltolepes2.activeSelf == true)
|
if (feltoltolepes1.activeSelf == true & feltoltolepes2.activeSelf == true)
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1175,17 +1184,18 @@ public class movement : MonoBehaviour
|
|||||||
jelenlegi_x = 3;
|
jelenlegi_x = 3;
|
||||||
jelenlegi_y = 2;
|
jelenlegi_y = 2;
|
||||||
if (targyak.lathatatlanOltozetAktivalva)
|
if (targyak.lathatatlanOltozetAktivalva)
|
||||||
{
|
{
|
||||||
targyak.lathatatlanOltozetAktivalva = false;
|
targyak.lathatatlanOltozetAktivalva = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//ap.akciopont = ap.akciopont - tavolsag;
|
//ap.akciopont = ap.akciopont - tavolsag;
|
||||||
ap.UpdateAkciopont(-tavolsag);
|
ap.UpdateAkciopont(-tavolsag);
|
||||||
}
|
}
|
||||||
Debug.Log(ap.akciopont);
|
Debug.Log(ap.akciopont);
|
||||||
Debug.Log("ugynok sorsolas");
|
Debug.Log("ugynok sorsolas");
|
||||||
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||||
|
ugynok.ugynokMegolveElozoHelyen();
|
||||||
threetwocount++;
|
threetwocount++;
|
||||||
if (feltoltolepes1.activeSelf == true)
|
if (feltoltolepes1.activeSelf == true)
|
||||||
{
|
{
|
||||||
@@ -1202,12 +1212,12 @@ public class movement : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez?re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Nincs el<EFBFBD>g akci<EFBFBD>pontod vagy nem 1 mez?n bel<EFBFBD>l akarsz l<EFBFBD>pni");
|
Debug.Log("Nincs eleg akciopontod vagy nem 1 mezon belul akarsz lepni");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1229,7 +1239,7 @@ public class movement : MonoBehaviour
|
|||||||
|
|
||||||
if (kutatolaborlepes1.activeSelf == true & kutatolaborlepes2.activeSelf == true)
|
if (kutatolaborlepes1.activeSelf == true & kutatolaborlepes2.activeSelf == true)
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1240,18 +1250,19 @@ public class movement : MonoBehaviour
|
|||||||
player.transform.position = onethree.transform.position;
|
player.transform.position = onethree.transform.position;
|
||||||
jelenlegi_x = 1;
|
jelenlegi_x = 1;
|
||||||
jelenlegi_y = 3;
|
jelenlegi_y = 3;
|
||||||
if (targyak.lathatatlanOltozetAktivalva)
|
if (targyak.lathatatlanOltozetAktivalva)
|
||||||
{
|
{
|
||||||
targyak.lathatatlanOltozetAktivalva = false;
|
targyak.lathatatlanOltozetAktivalva = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//ap.akciopont = ap.akciopont - tavolsag;
|
//ap.akciopont = ap.akciopont - tavolsag;
|
||||||
ap.UpdateAkciopont(-tavolsag);
|
ap.UpdateAkciopont(-tavolsag);
|
||||||
}
|
}
|
||||||
Debug.Log(ap.akciopont);
|
Debug.Log(ap.akciopont);
|
||||||
Debug.Log("ugynok sorsolas");
|
Debug.Log("ugynok sorsolas");
|
||||||
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||||
|
ugynok.ugynokMegolveElozoHelyen();
|
||||||
onethreecount++;
|
onethreecount++;
|
||||||
if (kutatolaborlepes1.activeSelf == true)
|
if (kutatolaborlepes1.activeSelf == true)
|
||||||
{
|
{
|
||||||
@@ -1268,12 +1279,12 @@ public class movement : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez?re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Nincs el<EFBFBD>g akci<EFBFBD>pontod vagy nem 1 mez?n bel<EFBFBD>l akarsz l<EFBFBD>pni");
|
Debug.Log("Nincs eleg akciopontod vagy nem 1 mez?n belul akarsz lepni");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1295,7 +1306,7 @@ public class movement : MonoBehaviour
|
|||||||
|
|
||||||
if (kriptoklublepes1.activeSelf == true & kriptoklublepes2.activeSelf == true)
|
if (kriptoklublepes1.activeSelf == true & kriptoklublepes2.activeSelf == true)
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1311,17 +1322,18 @@ public class movement : MonoBehaviour
|
|||||||
jelenlegi_x = 2;
|
jelenlegi_x = 2;
|
||||||
jelenlegi_y = 3;
|
jelenlegi_y = 3;
|
||||||
if (targyak.lathatatlanOltozetAktivalva)
|
if (targyak.lathatatlanOltozetAktivalva)
|
||||||
{
|
{
|
||||||
targyak.lathatatlanOltozetAktivalva = false;
|
targyak.lathatatlanOltozetAktivalva = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//ap.akciopont = ap.akciopont - tavolsag;
|
//ap.akciopont = ap.akciopont - tavolsag;
|
||||||
ap.UpdateAkciopont(-tavolsag);
|
ap.UpdateAkciopont(-tavolsag);
|
||||||
}
|
}
|
||||||
Debug.Log(ap.akciopont);
|
Debug.Log(ap.akciopont);
|
||||||
Debug.Log("ugynok sorsolas");
|
Debug.Log("ugynok sorsolas");
|
||||||
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||||
|
ugynok.ugynokMegolveElozoHelyen();
|
||||||
twothreecount++;
|
twothreecount++;
|
||||||
if (kriptoklublepes1.activeSelf == true)
|
if (kriptoklublepes1.activeSelf == true)
|
||||||
{
|
{
|
||||||
@@ -1338,12 +1350,12 @@ public class movement : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez?re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Nincs el<EFBFBD>g akci<EFBFBD>pontod vagy nem 1 mez?n bel<EFBFBD>l akarsz l<EFBFBD>pni");
|
Debug.Log("Nincs eleg akciopontod vagy nem 1 mezon belul akarsz lepni");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1366,7 +1378,7 @@ public class movement : MonoBehaviour
|
|||||||
|
|
||||||
if (cyberplazalepes1.activeSelf == true & cyberplazalepes2.activeSelf == true)
|
if (cyberplazalepes1.activeSelf == true & cyberplazalepes2.activeSelf == true)
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1378,17 +1390,18 @@ public class movement : MonoBehaviour
|
|||||||
jelenlegi_x = 3;
|
jelenlegi_x = 3;
|
||||||
jelenlegi_y = 3;
|
jelenlegi_y = 3;
|
||||||
if (targyak.lathatatlanOltozetAktivalva)
|
if (targyak.lathatatlanOltozetAktivalva)
|
||||||
{
|
{
|
||||||
targyak.lathatatlanOltozetAktivalva = false;
|
targyak.lathatatlanOltozetAktivalva = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//ap.akciopont = ap.akciopont - tavolsag;
|
//ap.akciopont = ap.akciopont - tavolsag;
|
||||||
ap.UpdateAkciopont(-tavolsag);
|
ap.UpdateAkciopont(-tavolsag);
|
||||||
}
|
}
|
||||||
Debug.Log(ap.akciopont);
|
Debug.Log(ap.akciopont);
|
||||||
Debug.Log("ugynok sorsolas");
|
Debug.Log("ugynok sorsolas");
|
||||||
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||||
|
ugynok.ugynokMegolveElozoHelyen();
|
||||||
threethreecount++;
|
threethreecount++;
|
||||||
if (cyberplazalepes1.activeSelf == true)
|
if (cyberplazalepes1.activeSelf == true)
|
||||||
{
|
{
|
||||||
@@ -1405,12 +1418,12 @@ public class movement : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Nincs el<EFBFBD>g akci<EFBFBD>pontod vagy nem 1 mez?n bel<EFBFBD>l akarsz l<EFBFBD>pni");
|
Debug.Log("Nincs eleg akciopontod vagy nem 1 mezon belul akarsz lepni");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1432,7 +1445,7 @@ public class movement : MonoBehaviour
|
|||||||
|
|
||||||
if (hadiuzemlepes1.activeSelf == true & hadiuzemlepes2.activeSelf == true)
|
if (hadiuzemlepes1.activeSelf == true & hadiuzemlepes2.activeSelf == true)
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1444,17 +1457,18 @@ public class movement : MonoBehaviour
|
|||||||
jelenlegi_x = 1;
|
jelenlegi_x = 1;
|
||||||
jelenlegi_y = 4;
|
jelenlegi_y = 4;
|
||||||
if (targyak.lathatatlanOltozetAktivalva)
|
if (targyak.lathatatlanOltozetAktivalva)
|
||||||
{
|
{
|
||||||
targyak.lathatatlanOltozetAktivalva = false;
|
targyak.lathatatlanOltozetAktivalva = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//ap.akciopont = ap.akciopont - tavolsag;
|
//ap.akciopont = ap.akciopont - tavolsag;
|
||||||
ap.UpdateAkciopont(-tavolsag);
|
ap.UpdateAkciopont(-tavolsag);
|
||||||
}
|
}
|
||||||
Debug.Log(ap.akciopont);
|
Debug.Log(ap.akciopont);
|
||||||
Debug.Log("ugynok sorsolas");
|
Debug.Log("ugynok sorsolas");
|
||||||
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||||
|
ugynok.ugynokMegolveElozoHelyen();
|
||||||
onefourcount++;
|
onefourcount++;
|
||||||
if (hadiuzemlepes1.activeSelf == true)
|
if (hadiuzemlepes1.activeSelf == true)
|
||||||
{
|
{
|
||||||
@@ -1471,12 +1485,12 @@ public class movement : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez?re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Nincs el<EFBFBD>g akci<EFBFBD>pontod vagy nem 1 mez?n bel<EFBFBD>l akarsz l<EFBFBD>pni");
|
Debug.Log("Nincs eleg akciopontod vagy nem 1 mez?n belul akarsz lepni");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1498,7 +1512,7 @@ public class movement : MonoBehaviour
|
|||||||
|
|
||||||
if (konyvtarlepes1.activeSelf == true & konyvtarlepes2.activeSelf == true)
|
if (konyvtarlepes1.activeSelf == true & konyvtarlepes2.activeSelf == true)
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1509,18 +1523,19 @@ public class movement : MonoBehaviour
|
|||||||
player.transform.position = twofour.transform.position;
|
player.transform.position = twofour.transform.position;
|
||||||
jelenlegi_x = 2;
|
jelenlegi_x = 2;
|
||||||
jelenlegi_y = 4;
|
jelenlegi_y = 4;
|
||||||
if (targyak.lathatatlanOltozetAktivalva)
|
if (targyak.lathatatlanOltozetAktivalva)
|
||||||
{
|
{
|
||||||
targyak.lathatatlanOltozetAktivalva = false;
|
targyak.lathatatlanOltozetAktivalva = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//ap.akciopont = ap.akciopont - tavolsag;
|
//ap.akciopont = ap.akciopont - tavolsag;
|
||||||
ap.UpdateAkciopont(-tavolsag);
|
ap.UpdateAkciopont(-tavolsag);
|
||||||
}
|
}
|
||||||
Debug.Log(ap.akciopont);
|
Debug.Log(ap.akciopont);
|
||||||
Debug.Log("ugynok sorsolas");
|
Debug.Log("ugynok sorsolas");
|
||||||
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||||
|
ugynok.ugynokMegolveElozoHelyen();
|
||||||
twofourcount++;
|
twofourcount++;
|
||||||
if (konyvtarlepes1.activeSelf == true)
|
if (konyvtarlepes1.activeSelf == true)
|
||||||
{
|
{
|
||||||
@@ -1537,12 +1552,12 @@ public class movement : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez?re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Nincs el<EFBFBD>g akci<EFBFBD>pontod vagy nem 1 mez?n bel<EFBFBD>l akarsz l<EFBFBD>pni");
|
Debug.Log("Nincs eleg akciopontod vagy nem 1 mezon belul akarsz lepni");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1564,7 +1579,7 @@ public class movement : MonoBehaviour
|
|||||||
|
|
||||||
if (korhazlepes1.activeSelf == true & korhazlepes2.activeSelf == true)
|
if (korhazlepes1.activeSelf == true & korhazlepes2.activeSelf == true)
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1576,17 +1591,18 @@ public class movement : MonoBehaviour
|
|||||||
jelenlegi_x = 3;
|
jelenlegi_x = 3;
|
||||||
jelenlegi_y = 4;
|
jelenlegi_y = 4;
|
||||||
if (targyak.lathatatlanOltozetAktivalva)
|
if (targyak.lathatatlanOltozetAktivalva)
|
||||||
{
|
{
|
||||||
targyak.lathatatlanOltozetAktivalva = false;
|
targyak.lathatatlanOltozetAktivalva = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//ap.akciopont = ap.akciopont - tavolsag;
|
//ap.akciopont = ap.akciopont - tavolsag;
|
||||||
ap.UpdateAkciopont(-tavolsag);
|
ap.UpdateAkciopont(-tavolsag);
|
||||||
}
|
}
|
||||||
Debug.Log(ap.akciopont);
|
Debug.Log(ap.akciopont);
|
||||||
Debug.Log("ugynok sorsolas");
|
Debug.Log("ugynok sorsolas");
|
||||||
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||||
|
ugynok.ugynokMegolveElozoHelyen();
|
||||||
threefourcount++;
|
threefourcount++;
|
||||||
if (korhazlepes1.activeSelf == true)
|
if (korhazlepes1.activeSelf == true)
|
||||||
{
|
{
|
||||||
@@ -1603,12 +1619,12 @@ public class movement : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez?re");
|
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("Nincs el<EFBFBD>g akci<EFBFBD>pontod vagy nem 1 mez?n bel<EFBFBD>l akarsz l<EFBFBD>pni");
|
Debug.Log("Nincs eleg akciopontod vagy nem 1 mezon belul akarsz lepni");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ MonoBehaviour:
|
|||||||
width: 1470
|
width: 1470
|
||||||
height: 20
|
height: 20
|
||||||
m_MinSize: {x: 0, y: 0}
|
m_MinSize: {x: 0, y: 0}
|
||||||
m_MaxSize: {x: 0, y: 0}
|
m_MaxSize: {x: 0, y: 0
|
||||||
--- !u!114 &9
|
--- !u!114 &9
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 52
|
m_ObjectHideFlags: 52
|
||||||
@@ -993,4 +993,4 @@ MonoBehaviour:
|
|||||||
m_ViewDataDictionary: {fileID: 0}
|
m_ViewDataDictionary: {fileID: 0}
|
||||||
m_OverlayCanvas:
|
m_OverlayCanvas:
|
||||||
m_LastAppliedPresetName: Default
|
m_LastAppliedPresetName: Default
|
||||||
m_SaveData: []
|
m_SaveData: []
|
||||||
Reference in New Issue
Block a user