energia sav

This commit is contained in:
2022-11-07 17:25:24 +01:00
parent 302c977200
commit 58648bb9ee
10 changed files with 4609 additions and 113 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -24,4 +24,8 @@ public class Akciopont : MonoBehaviour
public void UpdateAkciopont(int number) {
akciopontok += number;
}
public void resetAkciopont() {
akciopontok = 0;
}
}

View File

@@ -16,7 +16,7 @@ public class CameraMovement : MonoBehaviour
public void moveCameraBack() {
Debug.Log("Moved back");
mainCamera.transform.position = new Vector3(0, 0, -10);
mainCamera.transform.position = new Vector3((float)-2.15, 0, -10);
mainCamera.orthographicSize = 10.3f;
}
}

View File

@@ -18,6 +18,8 @@ public class Dice : MonoBehaviour {
public int[] getDices() { return diceResult; }
public int getValasztottErtek() { return valasztottErtek; }
public void setValasztottErtek(int ujErtek) { valasztottErtek = ujErtek; }
public bool getLocked() { return locked; }
public void setLocked(bool locked) { this.locked = locked; }
private void Start() {
upgrade = FindObjectOfType<Upgrade>();

34
Assets/Scripts/Energia.cs Normal file
View File

@@ -0,0 +1,34 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class Energia : MonoBehaviour
{
public TMP_Text[] energiasav_text;
private int enegiasav_index = 0;
public int getEnergiasavIndex() { return enegiasav_index; }
public void setEnegiasavIndex(int ertek) { enegiasav_index = ertek; }
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public void csokkenEnergia() {
if (enegiasav_index > 29) return;
energiasav_text[getEnergiasavIndex()].text = "X";
setEnegiasavIndex(getEnergiasavIndex() + 1);
Debug.Log("energia csokkent");
}
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 7187ff75d86420a4981438f408c7dfd6
guid: 7cc990e8a88c1084bbe82417d008fb6c
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,16 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Test : MonoBehaviour
{
public void testPass() {
Debug.Log("Passhthrough test: " + FindObjectOfType<Dice>().getDices()[0]);
Debug.Log("Passhthrough test: " + FindObjectOfType<Dice>().getDices()[1]);
}
public void test2() {
var upgrade = FindObjectOfType<Upgrade>();
Debug.Log("akcio: " + upgrade.akcio[upgrade.getAkcioIndex()]);
}
}

View File

@@ -0,0 +1,28 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TurnManager : MonoBehaviour
{
private Dice dice;
private Akciopont akciopont;
public int turnCounter = 1;
void Start()
{
dice = FindObjectOfType<Dice>();
akciopont = FindObjectOfType<Akciopont>();
}
public void nextTurn() {
dice.setLocked(false);
akciopont.resetAkciopont();
turnCounter++;
dice.hely1.sprite = null;
dice.hely2.sprite = null;
Debug.Log("kovetkezo kor " + turnCounter);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 054da35676bde5447a4318fc99fea01b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -19,12 +19,12 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 30
width: 1366
height: 635
width: 1920
height: 947
m_MinSize: {x: 300, y: 200}
m_MaxSize: {x: 24288, y: 16192}
vertical: 0
controlID: 137
controlID: 19121
--- !u!114 &2
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -45,10 +45,10 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 235
x: 330
y: 19
width: 790
height: 376
width: 1111
height: 571
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
@@ -59,7 +59,7 @@ MonoBehaviour:
m_ShowGizmos: 0
m_TargetDisplay: 0
m_ClearColor: {r: 0, g: 0, b: 0, a: 0}
m_TargetSize: {x: 790, y: 355}
m_TargetSize: {x: 1111, y: 550}
m_TextureFilterMode: 0
m_TextureHideFlags: 61
m_RenderIMGUI: 1
@@ -74,10 +74,10 @@ MonoBehaviour:
m_VRangeLocked: 0
hZoomLockedByDefault: 0
vZoomLockedByDefault: 0
m_HBaseRangeMin: -395
m_HBaseRangeMax: 395
m_VBaseRangeMin: -177.5
m_VBaseRangeMax: 177.5
m_HBaseRangeMin: -555.5
m_HBaseRangeMax: 555.5
m_VBaseRangeMin: -275
m_VBaseRangeMax: 275
m_HAllowExceedBaseRangeMin: 1
m_HAllowExceedBaseRangeMax: 1
m_VAllowExceedBaseRangeMin: 1
@@ -95,23 +95,23 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 21
width: 790
height: 355
width: 1111
height: 550
m_Scale: {x: 1, y: 1}
m_Translation: {x: 395, y: 177.5}
m_Translation: {x: 555.5, y: 275}
m_MarginLeft: 0
m_MarginRight: 0
m_MarginTop: 0
m_MarginBottom: 0
m_LastShownAreaInsideMargins:
serializedVersion: 2
x: -395
y: -177.5
width: 790
height: 355
x: -555.5
y: -275
width: 1111
height: 550
m_MinimalGUI: 1
m_defaultScale: 1
m_LastWindowPixelSize: {x: 790, y: 376}
m_LastWindowPixelSize: {x: 1111, y: 571}
m_ClearInEditMode: 1
m_NoCameraWarning: 1
m_LowResolutionForAspectRatios: 01000000000000000000
@@ -136,12 +136,12 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 1026
height: 635
width: 1442
height: 947
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 16192, y: 16192}
vertical: 1
controlID: 138
controlID: 19122
--- !u!114 &4
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -161,12 +161,12 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 1026
height: 397
width: 1442
height: 592
m_MinSize: {x: 200, y: 100}
m_MaxSize: {x: 16192, y: 8096}
vertical: 0
controlID: 139
controlID: 19123
--- !u!114 &5
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -184,8 +184,8 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 234
height: 397
width: 329
height: 592
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 6}
@@ -215,8 +215,8 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 73
width: 233
height: 376
width: 328
height: 571
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
@@ -226,7 +226,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 28fbffff
m_ExpandedIDs: cccaffff18fbffff6460000024620000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@@ -265,10 +265,10 @@ MonoBehaviour:
m_Children: []
m_Position:
serializedVersion: 2
x: 234
x: 329
y: 0
width: 792
height: 397
width: 1113
height: 592
m_MinSize: {x: 202, y: 221}
m_MaxSize: {x: 4002, y: 4021}
m_ActualView: {fileID: 2}
@@ -297,10 +297,10 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 234
x: 329
y: 73
width: 790
height: 376
width: 1111
height: 571
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
@@ -557,9 +557,9 @@ MonoBehaviour:
m_PlayAudio: 0
m_AudioPlay: 0
m_Position:
m_Target: {x: 0.5346609, y: -1.3819388, z: -0.08190441}
m_Target: {x: 0.90484023, y: 0.85474867, z: -0.40270457}
speed: 2
m_Value: {x: 0.5346609, y: -1.3819388, z: -0.08190441}
m_Value: {x: 0.90484023, y: 0.85474867, z: -0.40270457}
m_RenderMode: 0
m_CameraMode:
drawMode: 0
@@ -610,9 +610,9 @@ MonoBehaviour:
speed: 2
m_Value: {x: 0, y: 0, z: 0, w: 1}
m_Size:
m_Target: 7.4146304
m_Target: 9.024863
speed: 2
m_Value: 7.4146304
m_Value: 9.024863
m_Ortho:
m_Target: 1
speed: 2
@@ -655,13 +655,13 @@ MonoBehaviour:
m_Position:
serializedVersion: 2
x: 0
y: 397
width: 1026
height: 238
y: 592
width: 1442
height: 355
m_MinSize: {x: 200, y: 100}
m_MaxSize: {x: 16192, y: 8096}
vertical: 0
controlID: 67
controlID: 19074
--- !u!114 &10
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -679,8 +679,8 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 562
height: 238
width: 790
height: 355
m_MinSize: {x: 230, y: 250}
m_MaxSize: {x: 10000, y: 10000}
m_ActualView: {fileID: 11}
@@ -709,9 +709,9 @@ MonoBehaviour:
m_Pos:
serializedVersion: 2
x: 0
y: 470
width: 561
height: 217
y: 665
width: 789
height: 334
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
@@ -737,14 +737,14 @@ MonoBehaviour:
m_LastFolders:
- Assets/Scripts
m_LastFoldersGridSize: 55
m_LastProjectPath: C:\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: 70670000
m_LastClickedID: 26480
m_ExpandedIDs: 000000006667000000ca9a3bffffff7f
m_SelectedIDs: 86670000
m_LastClickedID: 26502
m_ExpandedIDs: 0000000070670000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@@ -772,7 +772,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 0000000066670000
m_ExpandedIDs: 0000000070670000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@@ -797,8 +797,8 @@ MonoBehaviour:
m_Icon: {fileID: 0}
m_ResourceFile:
m_ListAreaState:
m_SelectedInstanceIDs:
m_LastClickedInstanceID: 0
m_SelectedInstanceIDs: 40600000
m_LastClickedInstanceID: 24640
m_HadKeyboardFocusLastEvent: 0
m_ExpandedInstanceIDs: c623000000000000
m_RenameOverlay:
@@ -843,12 +843,12 @@ MonoBehaviour:
m_Children: []
m_Position:
serializedVersion: 2
x: 562
x: 790
y: 0
width: 464
height: 238
m_MinSize: {x: 102, y: 121}
m_MaxSize: {x: 4002, y: 4021}
width: 652
height: 355
m_MinSize: {x: 100, y: 100}
m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 13}
m_Panes:
- {fileID: 13}
@@ -874,10 +874,10 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 562
y: 470
width: 462
height: 217
x: 790
y: 665
width: 650
height: 334
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
@@ -897,10 +897,10 @@ MonoBehaviour:
m_Children: []
m_Position:
serializedVersion: 2
x: 1026
x: 1442
y: 0
width: 340
height: 635
width: 478
height: 947
m_MinSize: {x: 275, y: 50}
m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 15}
@@ -928,10 +928,10 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 1026
x: 1442
y: 73
width: 339
height: 614
width: 477
height: 926
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
@@ -942,7 +942,7 @@ MonoBehaviour:
m_CachedPref: 160
m_ControlHash: -371814159
m_PrefName: Preview_InspectorPreview
m_LastInspectedObjectInstanceID: -1
m_LastInspectedObjectInstanceID: 24640
m_LastVerticalScrollValue: 0
m_GlobalObjectId:
m_InspectorMode: 0