adrenalin loket bugos
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,5 @@
|
||||
using System.Collections;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
public class Dice : MonoBehaviour {
|
||||
@@ -9,10 +10,14 @@ public class Dice : MonoBehaviour {
|
||||
private Upgrade upgrade;
|
||||
private Akciopont ap;
|
||||
private Energia energiasav;
|
||||
private Targyak targyak;
|
||||
|
||||
private int[] diceResult = { 0, 0 };
|
||||
public int valasztottErtek; //a jatekos altal valasztott dobott ertek helye
|
||||
private bool locked = false; //ne lehessen ujra kivalasztani a masikat ha mar tortent egy valasztas
|
||||
|
||||
private bool adrenalinMegerosites = false;
|
||||
public GameObject adrenalinHasznalat;
|
||||
|
||||
//getters setters
|
||||
public int[] getDices() { return diceResult; }
|
||||
@@ -27,6 +32,7 @@ public class Dice : MonoBehaviour {
|
||||
upgrade = FindObjectOfType<Upgrade>();
|
||||
ap = FindObjectOfType<Akciopont>();
|
||||
energiasav = FindObjectOfType<Energia>();
|
||||
targyak = FindObjectOfType<Targyak>();
|
||||
}
|
||||
|
||||
|
||||
@@ -71,6 +77,20 @@ public class Dice : MonoBehaviour {
|
||||
do {
|
||||
diceResult[0] = RollDice();
|
||||
diceResult[1] = RollDice();
|
||||
|
||||
if(targyak.adrenalinloket > 0) {
|
||||
//text aktivalasa kerdesre hogy akarja e hasznalni a targyat
|
||||
adrenalinHasznalat.SetActive(true);
|
||||
//ha igen gomb -> valtozo igaz, targy fv meghivas, deaktivalas
|
||||
if (adrenalinMegerosites) {
|
||||
int[] ujertek = targyak.AdrenalinLoket();
|
||||
diceResult[0] = ujertek[0];
|
||||
diceResult[1] = ujertek[1];
|
||||
}
|
||||
//deaktivalas
|
||||
adrenalinHasznalat.gameObject.SetActive(false);
|
||||
adrenalinMegerosites = false;
|
||||
}
|
||||
} while (diceResult[0] == diceResult[1]);
|
||||
|
||||
hely1.sprite = diceSides[diceResult[0]-1];
|
||||
@@ -81,4 +101,8 @@ public class Dice : MonoBehaviour {
|
||||
dobott++;
|
||||
|
||||
}
|
||||
|
||||
public void setAdrenalinMegerosites(bool adrenalinMegerosites) {
|
||||
this.adrenalinMegerosites = adrenalinMegerosites;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
public class Targyak : MonoBehaviour
|
||||
@@ -10,9 +11,10 @@ public class Targyak : MonoBehaviour
|
||||
private movement movement;
|
||||
private Energia energia;
|
||||
private Ugynok ugynok;
|
||||
private Dice dice;
|
||||
|
||||
public GameObject kocka1ertek;
|
||||
public GameObject kocka2ertek;
|
||||
public TMP_InputField kocka1ertek;
|
||||
public TMP_InputField kocka2ertek;
|
||||
public int ujertek1;
|
||||
public int ujertek2;
|
||||
|
||||
@@ -34,6 +36,7 @@ public class Targyak : MonoBehaviour
|
||||
movement = FindObjectOfType<movement>();
|
||||
energia = FindObjectOfType<Energia>();
|
||||
ugynok = FindObjectOfType<Ugynok>();
|
||||
dice = FindObjectOfType<Dice>();
|
||||
}
|
||||
|
||||
public void RandomTargy()
|
||||
@@ -44,6 +47,7 @@ public class Targyak : MonoBehaviour
|
||||
randomszam = UnityEngine.Random.Range(0, elerheto_targyak.Length);
|
||||
}while(!elerheto_targyak[randomszam].Equals(""));
|
||||
|
||||
|
||||
elerheto_targyak[randomszam] = "";
|
||||
|
||||
if (randomszam == 0)
|
||||
@@ -78,16 +82,27 @@ public class Targyak : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public void AdrenalinLoket() {
|
||||
/*kocka1ertek.SetActive(true); //aktivalja az input mezot hogy meg lehessen adni az uj erteket
|
||||
kocka2ertek.SetActive(true);
|
||||
ujertek1 = int.Parse(kocka1ertek.text);
|
||||
ujertek2 = int.Parse(kocka2ertek.text);
|
||||
//uj ertek atadasa a dicenak
|
||||
public void addAdrenalin() {
|
||||
adrenalinloket = 1;
|
||||
}
|
||||
|
||||
//input mezo deaktivalas
|
||||
kocka1ertek.SetActive(false);
|
||||
kocka2ertek.SetActive(false);*/
|
||||
public int[] AdrenalinLoket() {
|
||||
kocka1ertek.text = dice.getDices()[0].ToString();
|
||||
kocka2ertek.text = dice.getDices()[1].ToString();
|
||||
kocka1ertek.gameObject.SetActive(true); //aktivalja az input mezot hogy meg lehessen adni az uj erteket
|
||||
kocka2ertek.gameObject.SetActive(true);
|
||||
ujertek1 = int.Parse(kocka1ertek.text);
|
||||
ujertek2 = int.Parse(kocka2ertek.text); //hogy tunik el az elozo? || egymas melle kerul a ket input vagy gomb ami deaktivalja a inputot
|
||||
int[] eredmeny = {ujertek1, ujertek2};
|
||||
return eredmeny;
|
||||
}
|
||||
|
||||
public void deactivateInput1() {
|
||||
kocka1ertek.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
public void deactivateInput2(){
|
||||
kocka2ertek.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
public void HackerCsatlakozo() { //kesz
|
||||
|
||||
@@ -79,7 +79,7 @@ public class jatekmanager : MonoBehaviour
|
||||
betarazas.SetActive(false);
|
||||
nyomozas.SetActive(false);
|
||||
hackeles.SetActive(false);
|
||||
test.SetActive(false);
|
||||
//test.SetActive(false);
|
||||
|
||||
|
||||
//ez rossz!!!!
|
||||
@@ -124,7 +124,7 @@ public class jatekmanager : MonoBehaviour
|
||||
betarazas.SetActive(false);
|
||||
nyomozas.SetActive(false);
|
||||
hackeles.SetActive(false);
|
||||
test.SetActive(false);
|
||||
//test.SetActive(false);
|
||||
kovetkezokor.SetActive(true);
|
||||
}
|
||||
//amint rányom a kör vége gombra 0 legyen az akciópont és megint csak a dobás legyen elérhető
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -19,7 +19,7 @@ MonoBehaviour:
|
||||
width: 1920
|
||||
height: 997
|
||||
m_ShowMode: 4
|
||||
m_Title: Hierarchy
|
||||
m_Title: Game
|
||||
m_RootView: {fileID: 2}
|
||||
m_MinSize: {x: 875, y: 300}
|
||||
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: 203
|
||||
controlID: 41
|
||||
--- !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: 208
|
||||
controlID: 42
|
||||
--- !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: 209
|
||||
controlID: 43
|
||||
--- !u!114 &8
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
@@ -233,7 +233,7 @@ MonoBehaviour:
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 1
|
||||
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name: ConsoleWindow
|
||||
m_Name: ProjectBrowser
|
||||
m_EditorClassIdentifier:
|
||||
m_Children: []
|
||||
m_Position:
|
||||
@@ -242,14 +242,14 @@ MonoBehaviour:
|
||||
y: 574
|
||||
width: 1421
|
||||
height: 373
|
||||
m_MinSize: {x: 101, y: 121}
|
||||
m_MaxSize: {x: 4001, y: 4021}
|
||||
m_ActualView: {fileID: 16}
|
||||
m_MinSize: {x: 231, y: 271}
|
||||
m_MaxSize: {x: 10001, y: 10021}
|
||||
m_ActualView: {fileID: 15}
|
||||
m_Panes:
|
||||
- {fileID: 15}
|
||||
- {fileID: 16}
|
||||
m_Selected: 1
|
||||
m_LastSelected: 0
|
||||
m_Selected: 0
|
||||
m_LastSelected: 1
|
||||
--- !u!114 &11
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
@@ -296,10 +296,10 @@ MonoBehaviour:
|
||||
m_Tooltip:
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 201
|
||||
y: 86
|
||||
width: 808
|
||||
height: 356
|
||||
x: 282
|
||||
y: 73
|
||||
width: 1137
|
||||
height: 553
|
||||
m_ViewDataDictionary: {fileID: 0}
|
||||
m_OverlayCanvas:
|
||||
m_LastAppliedPresetName: Default
|
||||
@@ -310,7 +310,7 @@ MonoBehaviour:
|
||||
m_ShowGizmos: 0
|
||||
m_TargetDisplay: 0
|
||||
m_ClearColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_TargetSize: {x: 808, y: 335}
|
||||
m_TargetSize: {x: 1137, y: 532}
|
||||
m_TextureFilterMode: 0
|
||||
m_TextureHideFlags: 61
|
||||
m_RenderIMGUI: 1
|
||||
@@ -325,10 +325,10 @@ MonoBehaviour:
|
||||
m_VRangeLocked: 0
|
||||
hZoomLockedByDefault: 0
|
||||
vZoomLockedByDefault: 0
|
||||
m_HBaseRangeMin: -404
|
||||
m_HBaseRangeMax: 404
|
||||
m_VBaseRangeMin: -167.5
|
||||
m_VBaseRangeMax: 167.5
|
||||
m_HBaseRangeMin: -568.5
|
||||
m_HBaseRangeMax: 568.5
|
||||
m_VBaseRangeMin: -266
|
||||
m_VBaseRangeMax: 266
|
||||
m_HAllowExceedBaseRangeMin: 1
|
||||
m_HAllowExceedBaseRangeMax: 1
|
||||
m_VAllowExceedBaseRangeMin: 1
|
||||
@@ -337,7 +337,7 @@ MonoBehaviour:
|
||||
m_HSlider: 0
|
||||
m_VSlider: 0
|
||||
m_IgnoreScrollWheelUntilClicked: 0
|
||||
m_EnableMouseInput: 1
|
||||
m_EnableMouseInput: 0
|
||||
m_EnableSliderZoomHorizontal: 0
|
||||
m_EnableSliderZoomVertical: 0
|
||||
m_UniformScale: 1
|
||||
@@ -346,23 +346,23 @@ MonoBehaviour:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 21
|
||||
width: 808
|
||||
height: 335
|
||||
width: 1137
|
||||
height: 532
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Translation: {x: 404, y: 167.5}
|
||||
m_Translation: {x: 568.5, y: 266}
|
||||
m_MarginLeft: 0
|
||||
m_MarginRight: 0
|
||||
m_MarginTop: 0
|
||||
m_MarginBottom: 0
|
||||
m_LastShownAreaInsideMargins:
|
||||
serializedVersion: 2
|
||||
x: -404
|
||||
y: -167.5
|
||||
width: 808
|
||||
height: 335
|
||||
x: -568.5
|
||||
y: -266
|
||||
width: 1137
|
||||
height: 532
|
||||
m_MinimalGUI: 1
|
||||
m_defaultScale: 1
|
||||
m_LastWindowPixelSize: {x: 808, y: 356}
|
||||
m_LastWindowPixelSize: {x: 1137, y: 553}
|
||||
m_ClearInEditMode: 1
|
||||
m_NoCameraWarning: 1
|
||||
m_LowResolutionForAspectRatios: 01000000000000000000
|
||||
@@ -398,10 +398,10 @@ MonoBehaviour:
|
||||
m_SaveData: []
|
||||
m_SceneHierarchy:
|
||||
m_TreeViewState:
|
||||
scrollPos: {x: 0, y: 0}
|
||||
m_SelectedIDs:
|
||||
m_LastClickedID: 0
|
||||
m_ExpandedIDs: a2faffff
|
||||
scrollPos: {x: 0, y: 204}
|
||||
m_SelectedIDs: 3abdffff
|
||||
m_LastClickedID: -17094
|
||||
m_ExpandedIDs: 3abdffff8ecdffff2cfbffffe46f0000c6760000
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
@@ -417,7 +417,7 @@ MonoBehaviour:
|
||||
m_IsRenaming: 0
|
||||
m_OriginalEventType: 11
|
||||
m_IsRenamingFilename: 0
|
||||
m_ClientGUIView: {fileID: 0}
|
||||
m_ClientGUIView: {fileID: 8}
|
||||
m_SearchString:
|
||||
m_ExpandedScenes: []
|
||||
m_CurrenRootInstanceID: 0
|
||||
@@ -705,9 +705,9 @@ MonoBehaviour:
|
||||
m_PlayAudio: 0
|
||||
m_AudioPlay: 0
|
||||
m_Position:
|
||||
m_Target: {x: -11.833951, y: -4.035131, z: 0.27219582}
|
||||
m_Target: {x: -0.50129414, y: 0.69531596, z: -0.018057432}
|
||||
speed: 2
|
||||
m_Value: {x: -3.7412379, y: 0.46741328, z: 0.07387488}
|
||||
m_Value: {x: -0.50129414, y: 0.69531596, z: -0.018057432}
|
||||
m_RenderMode: 0
|
||||
m_CameraMode:
|
||||
drawMode: 0
|
||||
@@ -758,9 +758,9 @@ MonoBehaviour:
|
||||
speed: 2
|
||||
m_Value: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_Size:
|
||||
m_Target: 10.312159
|
||||
m_Target: 10.010393
|
||||
speed: 2
|
||||
m_Value: 5.720447
|
||||
m_Value: 10.010393
|
||||
m_Ortho:
|
||||
m_Target: 1
|
||||
speed: 2
|
||||
@@ -806,9 +806,9 @@ MonoBehaviour:
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 463
|
||||
width: 1010
|
||||
height: 224
|
||||
y: 647
|
||||
width: 1420
|
||||
height: 352
|
||||
m_ViewDataDictionary: {fileID: 0}
|
||||
m_OverlayCanvas:
|
||||
m_LastAppliedPresetName: Default
|
||||
@@ -834,14 +834,14 @@ MonoBehaviour:
|
||||
m_LastFolders:
|
||||
- Assets/Scripts
|
||||
m_LastFoldersGridSize: 66
|
||||
m_LastProjectPath: /home/tom/Documents/dev/find the source
|
||||
m_LastProjectPath: C:\dev\find the source\projekt\FindTheSource
|
||||
m_LockTracker:
|
||||
m_IsLocked: 0
|
||||
m_FolderTreeState:
|
||||
scrollPos: {x: 0, y: 0}
|
||||
m_SelectedIDs: 4c6f0000
|
||||
m_LastClickedID: 28492
|
||||
m_ExpandedIDs: 00000000ce690000
|
||||
m_SelectedIDs: 04790000
|
||||
m_LastClickedID: 30980
|
||||
m_ExpandedIDs: 00000000c6780000
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
@@ -869,7 +869,7 @@ MonoBehaviour:
|
||||
scrollPos: {x: 0, y: 0}
|
||||
m_SelectedIDs:
|
||||
m_LastClickedID: 0
|
||||
m_ExpandedIDs: 00000000ce690000
|
||||
m_ExpandedIDs: 00000000c6780000
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
@@ -894,9 +894,9 @@ MonoBehaviour:
|
||||
m_Icon: {fileID: 0}
|
||||
m_ResourceFile:
|
||||
m_ListAreaState:
|
||||
m_SelectedInstanceIDs: 8c700000
|
||||
m_LastClickedInstanceID: 28812
|
||||
m_HadKeyboardFocusLastEvent: 0
|
||||
m_SelectedInstanceIDs:
|
||||
m_LastClickedInstanceID: 0
|
||||
m_HadKeyboardFocusLastEvent: 1
|
||||
m_ExpandedInstanceIDs: c623000000000000
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
@@ -988,7 +988,7 @@ MonoBehaviour:
|
||||
m_ControlHash: -371814159
|
||||
m_PrefName: Preview_InspectorPreview
|
||||
m_LastInspectedObjectInstanceID: -1
|
||||
m_LastVerticalScrollValue: 110
|
||||
m_LastVerticalScrollValue: 0
|
||||
m_GlobalObjectId:
|
||||
m_InspectorMode: 0
|
||||
m_LockTracker:
|
||||
|
||||
Reference in New Issue
Block a user