eletvesztes ugynok #17
@@ -64,9 +64,9 @@ public class Akciok : MonoBehaviour
|
||||
{
|
||||
if (tolteny_index < 24 && ap.akciopont != 0)
|
||||
{
|
||||
if (tolteny_index + betarazas > 23)
|
||||
if (tolteny_index + betarazas > 24)
|
||||
{
|
||||
tolteny_index = 23;
|
||||
tolteny_index = 24;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -9,6 +9,7 @@ public class Ugynok : MonoBehaviour
|
||||
private Akciok akciok;
|
||||
private Upgrade upgrade;
|
||||
private jatekmanager jatekmanager;
|
||||
private Elet elet;
|
||||
private movement movement;
|
||||
|
||||
public TMP_Text[] oneone;
|
||||
@@ -43,11 +44,18 @@ public class Ugynok : MonoBehaviour
|
||||
public void setCanKillTrue(){ canKill = true; }
|
||||
public Camera maincamera;
|
||||
|
||||
private string[] previus_ugynok_csapatok;
|
||||
private int elozo_x;
|
||||
private int elozo_y ;
|
||||
|
||||
private void Awake() {
|
||||
akciok = FindObjectOfType<Akciok>();
|
||||
upgrade = FindObjectOfType<Upgrade>();
|
||||
jatekmanager = FindObjectOfType<jatekmanager>();
|
||||
movement = FindObjectOfType<movement>();
|
||||
elet = FindObjectOfType<Elet>();
|
||||
|
||||
previus_ugynok_csapatok = new string[3];
|
||||
}
|
||||
|
||||
private void Start()
|
||||
@@ -338,466 +346,150 @@ public class Ugynok : MonoBehaviour
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* private void Update()
|
||||
{
|
||||
if(canShoot){
|
||||
if(oneone[0].text.Equals("")){
|
||||
|
||||
public void ugynokMegolveElozoHelyen(){
|
||||
if(elozo_x != movement.jelenlegi_x || elozo_y != movement.jelenlegi_y){
|
||||
foreach(var item in previus_ugynok_csapatok){
|
||||
if(!item.Equals("")){
|
||||
//ha nem ures a text vagyis volt atirva szamra nezze meg hogy X-e
|
||||
if(!item.Equals("x")){
|
||||
//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)
|
||||
{
|
||||
//check for collider onclick then x out tmp text then set canKill false
|
||||
//check if text field is empty
|
||||
//oneone
|
||||
if (Input.GetKeyDown(KeyCode.Mouse0) && oneoneCollider[0].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
||||
elozo_x = movement.jelenlegi_x;
|
||||
elozo_y = movement.jelenlegi_y;
|
||||
}
|
||||
|
||||
public void setElozoHelyszin(int x, int y){
|
||||
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(""))
|
||||
{
|
||||
oneone[0].text = "X";
|
||||
canKill = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("itt nincs ugynok csapat!!!");
|
||||
}
|
||||
previus_ugynok_csapatok[i] = oneone[i].text;
|
||||
}
|
||||
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(""))
|
||||
{
|
||||
oneone[1].text = "X";
|
||||
canKill = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("itt nincs ugynok csapat!!!");
|
||||
}
|
||||
previus_ugynok_csapatok[i] = onetwo[i].text;
|
||||
}
|
||||
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(""))
|
||||
{
|
||||
oneone[2].text = "X";
|
||||
canKill = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("itt nincs ugynok csapat!!!");
|
||||
}
|
||||
previus_ugynok_csapatok[i] = onethree[i].text;
|
||||
}
|
||||
//onetwo
|
||||
if (Input.GetKeyDown(KeyCode.Mouse0) && onetwoCollider[0].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
||||
}else if(elozo_x == 1 && elozo_y == 4){
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
if (!onetwo[0].text.Equals(""))
|
||||
{
|
||||
onetwo[0].text = "X";
|
||||
canKill = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("itt nincs ugynok csapat!!!");
|
||||
}
|
||||
previus_ugynok_csapatok[i] = onefour[i].text;
|
||||
}
|
||||
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(""))
|
||||
{
|
||||
onetwo[1].text = "X";
|
||||
canKill = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("itt nincs ugynok csapat!!!");
|
||||
}
|
||||
previus_ugynok_csapatok[i] = twoone[i].text;
|
||||
}
|
||||
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(""))
|
||||
{
|
||||
onetwo[2].text = "X";
|
||||
canKill = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("itt nincs ugynok csapat!!!");
|
||||
}
|
||||
previus_ugynok_csapatok[i] = twotwo[i].text;
|
||||
}
|
||||
//onethree
|
||||
if (Input.GetKeyDown(KeyCode.Mouse0) && onethreeCollider[0].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
||||
}else if(elozo_x == 2 && elozo_y == 3){
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
if (!onethree[0].text.Equals(""))
|
||||
{
|
||||
onethree[0].text = "X";
|
||||
canKill = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("itt nincs ugynok csapat!!!");
|
||||
}
|
||||
previus_ugynok_csapatok[i] = twothree[i].text;
|
||||
}
|
||||
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(""))
|
||||
{
|
||||
onethree[1].text = "X";
|
||||
canKill = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("itt nincs ugynok csapat!!!");
|
||||
}
|
||||
previus_ugynok_csapatok[i] = twofour[i].text;
|
||||
}
|
||||
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(""))
|
||||
{
|
||||
onethree[2].text = "X";
|
||||
canKill = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("itt nincs ugynok csapat!!!");
|
||||
}
|
||||
previus_ugynok_csapatok[i] = threeone[i].text;
|
||||
}
|
||||
//onefour
|
||||
if (Input.GetKeyDown(KeyCode.Mouse0) && onefourCollider[0].OverlapPoint(maincamera.ScreenToWorldPoint(Input.mousePosition)))
|
||||
}else if(elozo_x == 3 && elozo_y == 2){
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
if (!onefour[0].text.Equals(""))
|
||||
{
|
||||
onefour[0].text = "X";
|
||||
canKill = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("itt nincs ugynok csapat!!!");
|
||||
}
|
||||
previus_ugynok_csapatok[i] = threetwo[i].text;
|
||||
}
|
||||
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(""))
|
||||
{
|
||||
onefour[1].text = "X";
|
||||
canKill = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("itt nincs ugynok csapat!!!");
|
||||
}
|
||||
previus_ugynok_csapatok[i] = threethree[i].text;
|
||||
}
|
||||
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(""))
|
||||
{
|
||||
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!!!");
|
||||
}
|
||||
previus_ugynok_csapatok[i] = threefour[i].text;
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
@@ -105,10 +105,11 @@ public class movement : MonoBehaviour
|
||||
{"", "", "", "" }
|
||||
};
|
||||
|
||||
private void Awake() {
|
||||
private void Awake()
|
||||
{
|
||||
ap = FindObjectOfType<Akciopont>();
|
||||
ugynok = FindObjectOfType<Ugynok>();
|
||||
targyak = FindObjectOfType<Targyak>();
|
||||
targyak = FindObjectOfType<Targyak>();
|
||||
}
|
||||
|
||||
void Start()
|
||||
@@ -265,6 +266,8 @@ public class movement : MonoBehaviour
|
||||
jelenlegi_y = 4;
|
||||
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||
}
|
||||
|
||||
ugynok.setElozoHelyszin(jelenlegi_x, jelenlegi_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);
|
||||
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
|
||||
{
|
||||
@@ -381,7 +384,7 @@ public class movement : MonoBehaviour
|
||||
Debug.Log("Player clicked on the collider: " + twoone_Collider.gameObject.name);
|
||||
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
|
||||
{
|
||||
@@ -407,7 +410,7 @@ public class movement : MonoBehaviour
|
||||
}
|
||||
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);
|
||||
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
|
||||
{
|
||||
@@ -458,7 +461,7 @@ public class movement : MonoBehaviour
|
||||
Debug.Log("Player clicked on the collider: " + onetwo_Collider.gameObject.name);
|
||||
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
|
||||
{
|
||||
@@ -485,7 +488,7 @@ public class movement : MonoBehaviour
|
||||
}
|
||||
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);
|
||||
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
|
||||
{
|
||||
@@ -522,7 +525,7 @@ public class movement : MonoBehaviour
|
||||
}
|
||||
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);
|
||||
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
|
||||
{
|
||||
@@ -559,7 +562,7 @@ public class movement : MonoBehaviour
|
||||
}
|
||||
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)
|
||||
{
|
||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -598,7 +601,7 @@ public class movement : MonoBehaviour
|
||||
}
|
||||
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)
|
||||
{
|
||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -639,7 +642,7 @@ public class movement : MonoBehaviour
|
||||
}
|
||||
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)
|
||||
{
|
||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -681,7 +684,7 @@ public class movement : MonoBehaviour
|
||||
}
|
||||
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)
|
||||
{
|
||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -722,7 +725,7 @@ public class movement : MonoBehaviour
|
||||
}
|
||||
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)
|
||||
{
|
||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -763,7 +766,7 @@ public class movement : MonoBehaviour
|
||||
}
|
||||
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)
|
||||
{
|
||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -804,7 +807,7 @@ public class movement : MonoBehaviour
|
||||
}
|
||||
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);
|
||||
|
||||
// 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)))
|
||||
{
|
||||
for (int x = 0; x < w; x++)
|
||||
@@ -842,21 +845,22 @@ public class movement : MonoBehaviour
|
||||
player.transform.position = oneone.transform.position;
|
||||
jelenlegi_x = 1;
|
||||
jelenlegi_y = 1;
|
||||
if (targyak.lathatatlanOltozetAktivalva)
|
||||
{
|
||||
targyak.lathatatlanOltozetAktivalva = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//ap.akciopont = ap.akciopont - tavolsag;
|
||||
ap.UpdateAkciopont(-tavolsag);
|
||||
}
|
||||
if (targyak.lathatatlanOltozetAktivalva)
|
||||
{
|
||||
targyak.lathatatlanOltozetAktivalva = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//ap.akciopont = ap.akciopont - tavolsag;
|
||||
ap.UpdateAkciopont(-tavolsag);
|
||||
}
|
||||
|
||||
|
||||
|
||||
oneonecount = oneonecount + 1;
|
||||
Debug.Log(ap.akciopont);
|
||||
Debug.Log("ugynok sorsolas");
|
||||
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||
ugynok.ugynokMegolveElozoHelyen();
|
||||
if (eromulepes1.activeSelf == true)
|
||||
{
|
||||
eromulepes2.SetActive(true);
|
||||
@@ -872,7 +876,7 @@ public class movement : MonoBehaviour
|
||||
}
|
||||
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);
|
||||
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
|
||||
{
|
||||
@@ -907,18 +911,19 @@ public class movement : MonoBehaviour
|
||||
player.transform.position = twoone.transform.position;
|
||||
jelenlegi_x = 2;
|
||||
jelenlegi_y = 1;
|
||||
if (targyak.lathatatlanOltozetAktivalva)
|
||||
{
|
||||
targyak.lathatatlanOltozetAktivalva = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//ap.akciopont = ap.akciopont - tavolsag;
|
||||
ap.UpdateAkciopont(-tavolsag);
|
||||
}
|
||||
if (targyak.lathatatlanOltozetAktivalva)
|
||||
{
|
||||
targyak.lathatatlanOltozetAktivalva = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//ap.akciopont = ap.akciopont - tavolsag;
|
||||
ap.UpdateAkciopont(-tavolsag);
|
||||
}
|
||||
twoonecount = twoonecount + 1;
|
||||
Debug.Log(ap.akciopont); Debug.Log("ugynok sorsolas");
|
||||
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||
ugynok.ugynokMegolveElozoHelyen();
|
||||
if (feketepiaclepes1.activeSelf == true)
|
||||
{
|
||||
feketepiaclepes2.SetActive(true);
|
||||
@@ -934,12 +939,12 @@ public class movement : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez?re");
|
||||
Debug.Log("Maximum ketszer lephetsz egy mez?re");
|
||||
}
|
||||
}
|
||||
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);
|
||||
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
|
||||
{
|
||||
@@ -971,18 +976,20 @@ public class movement : MonoBehaviour
|
||||
player.transform.position = threeone.transform.position;
|
||||
jelenlegi_x = 3;
|
||||
jelenlegi_y = 1;
|
||||
if (targyak.lathatatlanOltozetAktivalva)
|
||||
{
|
||||
targyak.lathatatlanOltozetAktivalva = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//ap.akciopont = ap.akciopont - tavolsag;
|
||||
ap.UpdateAkciopont(-tavolsag);
|
||||
}
|
||||
if (targyak.lathatatlanOltozetAktivalva)
|
||||
{
|
||||
targyak.lathatatlanOltozetAktivalva = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//ap.akciopont = ap.akciopont - tavolsag;
|
||||
ap.UpdateAkciopont(-tavolsag);
|
||||
}
|
||||
threeonecount++;
|
||||
Debug.Log(ap.akciopont); Debug.Log("ugynok sorsolas");
|
||||
Debug.Log(ap.akciopont);
|
||||
Debug.Log("ugynok sorsolas");
|
||||
ugynok.UgynokSorsolas(jelenlegi_x, jelenlegi_y);
|
||||
ugynok.ugynokMegolveElozoHelyen();
|
||||
if (metrolepes1.activeSelf == true)
|
||||
{
|
||||
metrolepes2.SetActive(true);
|
||||
@@ -998,12 +1005,12 @@ public class movement : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
}
|
||||
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)
|
||||
{
|
||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1039,19 +1046,20 @@ public class movement : MonoBehaviour
|
||||
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);
|
||||
}
|
||||
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);
|
||||
ugynok.ugynokMegolveElozoHelyen();
|
||||
if (szervereklepes1.activeSelf == true)
|
||||
{
|
||||
szervereklepes2.SetActive(true);
|
||||
@@ -1067,12 +1075,12 @@ public class movement : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
}
|
||||
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)
|
||||
{
|
||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1104,18 +1112,19 @@ public class movement : MonoBehaviour
|
||||
player.transform.position = twotwo.transform.position;
|
||||
jelenlegi_x = 2;
|
||||
jelenlegi_y = 2;
|
||||
if (targyak.lathatatlanOltozetAktivalva)
|
||||
{
|
||||
targyak.lathatatlanOltozetAktivalva = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//ap.akciopont = ap.akciopont - tavolsag;
|
||||
ap.UpdateAkciopont(-tavolsag);
|
||||
}
|
||||
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);
|
||||
ugynok.ugynokMegolveElozoHelyen();
|
||||
twotwocount++;
|
||||
if (kingcasinolepes1.activeSelf == true)
|
||||
{
|
||||
@@ -1132,12 +1141,12 @@ public class movement : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
}
|
||||
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)
|
||||
{
|
||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1175,17 +1184,18 @@ public class movement : MonoBehaviour
|
||||
jelenlegi_x = 3;
|
||||
jelenlegi_y = 2;
|
||||
if (targyak.lathatatlanOltozetAktivalva)
|
||||
{
|
||||
targyak.lathatatlanOltozetAktivalva = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//ap.akciopont = ap.akciopont - tavolsag;
|
||||
ap.UpdateAkciopont(-tavolsag);
|
||||
}
|
||||
{
|
||||
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);
|
||||
ugynok.ugynokMegolveElozoHelyen();
|
||||
threetwocount++;
|
||||
if (feltoltolepes1.activeSelf == true)
|
||||
{
|
||||
@@ -1202,12 +1212,12 @@ public class movement : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez?re");
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
}
|
||||
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)
|
||||
{
|
||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1240,18 +1250,19 @@ public class movement : MonoBehaviour
|
||||
player.transform.position = onethree.transform.position;
|
||||
jelenlegi_x = 1;
|
||||
jelenlegi_y = 3;
|
||||
if (targyak.lathatatlanOltozetAktivalva)
|
||||
{
|
||||
targyak.lathatatlanOltozetAktivalva = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//ap.akciopont = ap.akciopont - tavolsag;
|
||||
ap.UpdateAkciopont(-tavolsag);
|
||||
}
|
||||
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);
|
||||
ugynok.ugynokMegolveElozoHelyen();
|
||||
onethreecount++;
|
||||
if (kutatolaborlepes1.activeSelf == true)
|
||||
{
|
||||
@@ -1268,12 +1279,12 @@ public class movement : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez?re");
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
}
|
||||
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)
|
||||
{
|
||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1311,17 +1322,18 @@ public class movement : MonoBehaviour
|
||||
jelenlegi_x = 2;
|
||||
jelenlegi_y = 3;
|
||||
if (targyak.lathatatlanOltozetAktivalva)
|
||||
{
|
||||
targyak.lathatatlanOltozetAktivalva = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//ap.akciopont = ap.akciopont - tavolsag;
|
||||
ap.UpdateAkciopont(-tavolsag);
|
||||
}
|
||||
{
|
||||
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);
|
||||
ugynok.ugynokMegolveElozoHelyen();
|
||||
twothreecount++;
|
||||
if (kriptoklublepes1.activeSelf == true)
|
||||
{
|
||||
@@ -1338,12 +1350,12 @@ public class movement : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez?re");
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
}
|
||||
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)
|
||||
{
|
||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1378,17 +1390,18 @@ public class movement : MonoBehaviour
|
||||
jelenlegi_x = 3;
|
||||
jelenlegi_y = 3;
|
||||
if (targyak.lathatatlanOltozetAktivalva)
|
||||
{
|
||||
targyak.lathatatlanOltozetAktivalva = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//ap.akciopont = ap.akciopont - tavolsag;
|
||||
ap.UpdateAkciopont(-tavolsag);
|
||||
}
|
||||
{
|
||||
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);
|
||||
ugynok.ugynokMegolveElozoHelyen();
|
||||
threethreecount++;
|
||||
if (cyberplazalepes1.activeSelf == true)
|
||||
{
|
||||
@@ -1405,12 +1418,12 @@ public class movement : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
}
|
||||
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)
|
||||
{
|
||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1444,17 +1457,18 @@ public class movement : MonoBehaviour
|
||||
jelenlegi_x = 1;
|
||||
jelenlegi_y = 4;
|
||||
if (targyak.lathatatlanOltozetAktivalva)
|
||||
{
|
||||
targyak.lathatatlanOltozetAktivalva = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//ap.akciopont = ap.akciopont - tavolsag;
|
||||
ap.UpdateAkciopont(-tavolsag);
|
||||
}
|
||||
{
|
||||
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);
|
||||
ugynok.ugynokMegolveElozoHelyen();
|
||||
onefourcount++;
|
||||
if (hadiuzemlepes1.activeSelf == true)
|
||||
{
|
||||
@@ -1471,12 +1485,12 @@ public class movement : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez?re");
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
}
|
||||
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)
|
||||
{
|
||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1509,18 +1523,19 @@ public class movement : MonoBehaviour
|
||||
player.transform.position = twofour.transform.position;
|
||||
jelenlegi_x = 2;
|
||||
jelenlegi_y = 4;
|
||||
if (targyak.lathatatlanOltozetAktivalva)
|
||||
{
|
||||
targyak.lathatatlanOltozetAktivalva = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//ap.akciopont = ap.akciopont - tavolsag;
|
||||
ap.UpdateAkciopont(-tavolsag);
|
||||
}
|
||||
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);
|
||||
ugynok.ugynokMegolveElozoHelyen();
|
||||
twofourcount++;
|
||||
if (konyvtarlepes1.activeSelf == true)
|
||||
{
|
||||
@@ -1537,12 +1552,12 @@ public class movement : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez?re");
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
}
|
||||
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)
|
||||
{
|
||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez<EFBFBD>re");
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1576,17 +1591,18 @@ public class movement : MonoBehaviour
|
||||
jelenlegi_x = 3;
|
||||
jelenlegi_y = 4;
|
||||
if (targyak.lathatatlanOltozetAktivalva)
|
||||
{
|
||||
targyak.lathatatlanOltozetAktivalva = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//ap.akciopont = ap.akciopont - tavolsag;
|
||||
ap.UpdateAkciopont(-tavolsag);
|
||||
}
|
||||
{
|
||||
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);
|
||||
ugynok.ugynokMegolveElozoHelyen();
|
||||
threefourcount++;
|
||||
if (korhazlepes1.activeSelf == true)
|
||||
{
|
||||
@@ -1603,12 +1619,12 @@ public class movement : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Maximum k<EFBFBD>tszer l<EFBFBD>phetsz egy mez?re");
|
||||
Debug.Log("Maximum ketszer lephetsz egy mezore");
|
||||
}
|
||||
}
|
||||
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
|
||||
height: 20
|
||||
m_MinSize: {x: 0, y: 0}
|
||||
m_MaxSize: {x: 0, y: 0}
|
||||
m_MaxSize: {x: 0, y: 0
|
||||
--- !u!114 &9
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
@@ -993,4 +993,4 @@ MonoBehaviour:
|
||||
m_ViewDataDictionary: {fileID: 0}
|
||||
m_OverlayCanvas:
|
||||
m_LastAppliedPresetName: Default
|
||||
m_SaveData: []
|
||||
m_SaveData: []
|
||||
Reference in New Issue
Block a user