diff --git a/Assets/Scripts/Energia.cs b/Assets/Scripts/Energia.cs index f28a0d8..36889c2 100644 --- a/Assets/Scripts/Energia.cs +++ b/Assets/Scripts/Energia.cs @@ -7,11 +7,13 @@ public class Energia : MonoBehaviour { public TMP_Text[] energiasav_text; private int energiasav_index = 0; + public bool granatAktivalva = false; public int getEnergiasavIndex() { return energiasav_index; } public void setEnegiasavIndex(int ertek) { energiasav_index = ertek; } public void csokkenEnergia(int number) { + if (granatAktivalva) return; //targy cucc aktivalva egesz korbe nem csokken az energia if (energiasav_index > 30) return; for (int i = 0; i < number; i++) { diff --git a/Assets/Scripts/Targyak.cs b/Assets/Scripts/Targyak.cs new file mode 100644 index 0000000..2778385 --- /dev/null +++ b/Assets/Scripts/Targyak.cs @@ -0,0 +1,50 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class Targyak : MonoBehaviour +{ + private Akciok akciok; + private Elet elet; + private Akciopont akciopont; + private movement movement; + private Energia energia; + + private void Start() { + akciok = FindObjectOfType(); + elet = FindObjectOfType(); + akciopont = FindObjectOfType(); + movement = FindObjectOfType(); + energia = FindObjectOfType(); + } + + public void AdrenalinLoket() { + + } + + public void HackerCsatlakozo() { //Hogyan kell aktivalni? + //+2 tolteny + akciok.Betarazas(2); + //+1 elet + elet.Eletplusz(); + //+1 akcio + akciopont.akciopont++; + } + + public void LathatatlanOltozek() { + movement.mozgasHelyre(2, 2); //megadni inkabb a hely nevet ahova menni akar? | input field es nev megadas + } + + public void DroidGepagyu() { + + } + + public void MatavTaviranyito() { + + } + + public void FustGranat() { + energia.granatAktivalva = true; + } + +} diff --git a/Assets/Scripts/Targyak.cs.meta b/Assets/Scripts/Targyak.cs.meta new file mode 100644 index 0000000..49a4a80 --- /dev/null +++ b/Assets/Scripts/Targyak.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2595afc692aed134ab895e537a2c9f73 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/TurnManager.cs b/Assets/Scripts/TurnManager.cs index a973390..c8fe05e 100644 --- a/Assets/Scripts/TurnManager.cs +++ b/Assets/Scripts/TurnManager.cs @@ -23,6 +23,7 @@ public class TurnManager : MonoBehaviour dice.setLocked(false); akciopont.resetAkciopont(); energia.csokkenEnergia(upgrade.energia[upgrade.getEnergiaIndex()]); + energia.granatAktivalva = false; //ha aktivalva lett a granat a korben deaktivalja turnCounter++; dice.hely1.sprite = null; dice.hely2.sprite = null; diff --git a/Assets/Scripts/movement.cs b/Assets/Scripts/movement.cs index 31c0cb0..cda0527 100644 --- a/Assets/Scripts/movement.cs +++ b/Assets/Scripts/movement.cs @@ -224,6 +224,58 @@ public class movement : MonoBehaviour { } } + public void mozgasHelyre(int x, int y) { + if(x == 1 && y == 1) { + jelenlegi_x = x; + jelenlegi_y = y; + player.transform.position = oneone.transform.position; + }else if(x == 1 && y == 2) { + jelenlegi_x = x; + jelenlegi_y = y; + player.transform.position = onetwo.transform.position; + } else if (x == 1 && y == 3) { + jelenlegi_x = x; + jelenlegi_y = y; + player.transform.position = onethree.transform.position; + } else if (x == 1 && y == 4) { + jelenlegi_x = x; + jelenlegi_y = y; + player.transform.position = onefour.transform.position; + }else if (x == 2 && y == 1) { + jelenlegi_x = x; + jelenlegi_y = y; + player.transform.position = twoone.transform.position; + } else if (x == 2 && y == 2) { + jelenlegi_x = x; + jelenlegi_y = y; + player.transform.position = twotwo.transform.position; + } else if (x == 2 && y == 3) { + jelenlegi_x = x; + jelenlegi_y = y; + player.transform.position = twothree.transform.position; + } else if (x == 2 && y == 4) { + jelenlegi_x = x; + jelenlegi_y = y; + player.transform.position = twofour.transform.position; + }else if (x == 3 && y == 1) { + jelenlegi_x = x; + jelenlegi_y = y; + player.transform.position = threeone.transform.position; + } else if (x == 3 && y == 2) { + jelenlegi_x = x; + jelenlegi_y = y; + player.transform.position = threetwo.transform.position; + } else if (x == 3 && y == 3) { + jelenlegi_x = x; + jelenlegi_y = y; + player.transform.position = threethree.transform.position; + } else if (x == 3 && y == 4) { + jelenlegi_x = x; + jelenlegi_y = y; + player.transform.position = threefour.transform.position; + } + } + // Update is called once per frame public void Update() { tavolsag = math.abs(tavolsag); diff --git a/UserSettings/Layouts/default-2021.dwlt b/UserSettings/Layouts/default-2021.dwlt index 5624ab1..4a1567e 100644 --- a/UserSettings/Layouts/default-2021.dwlt +++ b/UserSettings/Layouts/default-2021.dwlt @@ -19,7 +19,7 @@ MonoBehaviour: width: 1920 height: 997 m_ShowMode: 4 - m_Title: Hierarchy + m_Title: Scene m_RootView: {fileID: 2} m_MinSize: {x: 875, y: 421} m_MaxSize: {x: 10000, y: 10000} @@ -119,7 +119,7 @@ MonoBehaviour: m_MinSize: {x: 300, y: 200} m_MaxSize: {x: 24288, y: 16192} vertical: 0 - controlID: 63 + controlID: 95 --- !u!114 &6 MonoBehaviour: m_ObjectHideFlags: 52 @@ -144,7 +144,7 @@ MonoBehaviour: m_MinSize: {x: 200, y: 200} m_MaxSize: {x: 16192, y: 16192} vertical: 1 - controlID: 94 + controlID: 96 --- !u!114 &7 MonoBehaviour: m_ObjectHideFlags: 52 @@ -169,7 +169,7 @@ MonoBehaviour: m_MinSize: {x: 200, y: 100} m_MaxSize: {x: 16192, y: 8096} vertical: 0 - controlID: 95 + controlID: 97 --- !u!114 &8 MonoBehaviour: m_ObjectHideFlags: 52 @@ -247,7 +247,7 @@ MonoBehaviour: m_MinSize: {x: 200, y: 100} m_MaxSize: {x: 16192, y: 8096} vertical: 0 - controlID: 106 + controlID: 42 --- !u!114 &11 MonoBehaviour: m_ObjectHideFlags: 52 @@ -448,10 +448,10 @@ MonoBehaviour: m_SaveData: [] m_SceneHierarchy: m_TreeViewState: - scrollPos: {x: 0, y: 74} - m_SelectedIDs: 66700000 - m_LastClickedID: 28774 - m_ExpandedIDs: fcf6ffff28fbffffc26e0000ca740000 + scrollPos: {x: 0, y: 0} + m_SelectedIDs: + m_LastClickedID: 0 + m_ExpandedIDs: 20fbffff m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -755,9 +755,9 @@ MonoBehaviour: m_PlayAudio: 0 m_AudioPlay: 0 m_Position: - m_Target: {x: -2.3493092, y: 0.25319585, z: -0.57166994} + m_Target: {x: -1.9214761, y: -3.5599983, z: -0.5370578} speed: 2 - m_Value: {x: -2.3493092, y: 0.25319585, z: -0.57166994} + m_Value: {x: -1.9974782, y: -3.6252608, z: -0.53255546} m_RenderMode: 0 m_CameraMode: drawMode: 0 @@ -808,9 +808,9 @@ MonoBehaviour: speed: 2 m_Value: {x: 0, y: 0, z: 0, w: 1} m_Size: - m_Target: 13.818133 + m_Target: 10.4553385 speed: 2 - m_Value: 13.818133 + m_Value: 10.005109 m_Ortho: m_Target: 1 speed: 2 @@ -889,9 +889,9 @@ MonoBehaviour: m_IsLocked: 0 m_FolderTreeState: scrollPos: {x: 0, y: 0} - m_SelectedIDs: d2760000 - m_LastClickedID: 30418 - m_ExpandedIDs: 00000000c4760000c6760000c8760000 + m_SelectedIDs: 0e770000 + m_LastClickedID: 30478 + m_ExpandedIDs: 00000000007700000277000004770000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -919,7 +919,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 00000000c4760000c6760000c8760000 + m_ExpandedIDs: 00000000007700000277000004770000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: