upgrade implemented

This commit is contained in:
2022-11-02 17:17:33 +01:00
parent a147aa2540
commit 3e958ba1ab
13 changed files with 5292 additions and 284 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -8,4 +8,9 @@ public class Test : MonoBehaviour
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

@@ -1,6 +1,8 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
public class Upgrade : MonoBehaviour
{
@@ -10,31 +12,57 @@ public class Upgrade : MonoBehaviour
public readonly int[] ujradobas = { 0, 1, 2, 3, 4 };
public readonly int[] hack = { 4, 3, 2, 1 };
private int energia_index, akcio_index, harc_index, ujradobas_index, hack_index = 0;
public TMP_Text[] energiatext;
public TMP_Text[] akciotext;
public TMP_Text[] harctext;
public TMP_Text[] ujradobastext;
public TMP_Text[] hacktext;
private int getEnergiaIndex() { return energia_index; }
private int getAkcioIndex() { return akcio_index; }
private int getHarcIndex() { return harc_index; }
private int getUjradobasIndex() { return ujradobas_index; }
private int getHackIndex() { return hack_index; }
private int energia_index, akcio_index, harc_index, ujradobas_index, hack_index = 0; //nem lehet nagyobb 4-nel | hack 3-nal
public int getEnergiaIndex() { return energia_index; }
public int getAkcioIndex() { return akcio_index; }
public int getHarcIndex() { return harc_index; }
public int getUjradobasIndex() { return ujradobas_index; }
public int getHackIndex() { return hack_index; }
public void upgradeEnergia() {
if(energia_index < 4) {
energiatext[energia_index].text = "X";
energia_index++;
}
Debug.Log("energia_i: " + energia_index);
}
public void upgradeAkcio() {
if (akcio_index < 4) {
akciotext[akcio_index].text = "X";
akcio_index++;
}
Debug.Log("akcio_i: " + akcio_index);
}
public void upgradeHarc() {
if (harc_index < 4) {
harctext[harc_index].text = "X";
harc_index++;
}
Debug.Log("harc_i: " + harc_index);
}
public void upgradeUjradobas() {
if (ujradobas_index < 4) {
ujradobastext[ujradobas_index].text = "X";
ujradobas_index++;
}
Debug.Log("ujradobas_i: " + ujradobas_index);
}
public void upgradeHack() {
if (hack_index < 3) {
hacktext[hack_index].text = "X";
hack_index++;
}
Debug.Log("hack_i: " + hack_index);
}
}

View File

@@ -0,0 +1,14 @@
{
"MonoBehaviour": {
"Version": 4,
"EnableBurstCompilation": true,
"EnableOptimisations": true,
"EnableSafetyChecks": false,
"EnableDebugInAllBuilds": false,
"CpuMinTargetX32": 0,
"CpuMaxTargetX32": 0,
"CpuMinTargetX64": 0,
"CpuMaxTargetX64": 0,
"OptimizeFor": 0
}
}

View File

@@ -0,0 +1,17 @@
{
"MonoBehaviour": {
"Version": 4,
"EnableBurstCompilation": true,
"EnableOptimisations": true,
"EnableSafetyChecks": false,
"EnableDebugInAllBuilds": false,
"UsePlatformSDKLinker": false,
"CpuMinTargetX32": 0,
"CpuMaxTargetX32": 0,
"CpuMinTargetX64": 0,
"CpuMaxTargetX64": 0,
"CpuTargetsX32": 6,
"CpuTargetsX64": 72,
"OptimizeFor": 0
}
}

View File

@@ -0,0 +1,16 @@
{
"MonoBehaviour": {
"Version": 4,
"EnableBurstCompilation": true,
"EnableOptimisations": true,
"EnableSafetyChecks": false,
"EnableDebugInAllBuilds": false,
"CpuMinTargetX32": 0,
"CpuMaxTargetX32": 0,
"CpuMinTargetX64": 0,
"CpuMaxTargetX64": 0,
"CpuTargetsX32": 6,
"CpuTargetsX64": 72,
"OptimizeFor": 0
}
}

View File

@@ -0,0 +1,14 @@
{
"MonoBehaviour": {
"Version": 4,
"EnableBurstCompilation": true,
"EnableOptimisations": true,
"EnableSafetyChecks": false,
"EnableDebugInAllBuilds": false,
"CpuMinTargetX32": 0,
"CpuMaxTargetX32": 0,
"CpuMinTargetX64": 0,
"CpuMaxTargetX64": 0,
"OptimizeFor": 0
}
}

View File

@@ -0,0 +1,14 @@
{
"MonoBehaviour": {
"Version": 4,
"EnableBurstCompilation": true,
"EnableOptimisations": true,
"EnableSafetyChecks": false,
"EnableDebugInAllBuilds": false,
"CpuMinTargetX32": 0,
"CpuMaxTargetX32": 0,
"CpuMinTargetX64": 0,
"CpuMaxTargetX64": 0,
"OptimizeFor": 0
}
}

View File

@@ -0,0 +1,6 @@
{
"MonoBehaviour": {
"Version": 4,
"DisabledWarnings": ""
}
}

View File

@@ -780,8 +780,8 @@ PlayerSettings:
apiCompatibilityLevelPerPlatform: {}
m_RenderingPath: 1
m_MobileRenderingPath: 1
metroPackageName: 2D_BuiltInRenderer
metroPackageVersion:
metroPackageName: 2DBuiltInRenderer
metroPackageVersion: 1.0.0.0
metroCertificatePath:
metroCertificatePassword:
metroCertificateSubject:
@@ -789,7 +789,7 @@ PlayerSettings:
metroCertificateNotAfter: 0000000000000000
metroApplicationDescription: 2D_BuiltInRenderer
wsaImages: {}
metroTileShortName:
metroTileShortName: FindTheSource
metroTileShowName: 0
metroMediumTileShowName: 0
metroLargeTileShowName: 0

View File

@@ -189,8 +189,8 @@ QualitySettings:
- serializedVersion: 2
name: Ultra
pixelLightCount: 4
shadows: 2
shadowResolution: 2
shadows: 0
shadowResolution: 3
shadowProjection: 1
shadowCascades: 4
shadowDistance: 150
@@ -224,12 +224,13 @@ QualitySettings:
excludedTargetPlatforms: []
m_PerPlatformDefaultQuality:
Android: 2
Lumin: 5
GameCoreScarlett: 5
GameCoreXboxOne: 5
Lumin: 5
Nintendo Switch: 5
PS4: 5
PS5: 5
Server: 0
Stadia: 5
Standalone: 5
WebGL: 3

View File

@@ -8,6 +8,9 @@ EditorUserSettings:
RecentlyUsedSceneGuid-0:
value: 515250075c0c595e5f5a5e71122159444e4e4a2f7a7d7f602f284d66b4b76661
flags: 0
UnityRemoteResolution:
value: 2d5e460b0459
flags: 0
vcSharedLogLevel:
value: 0d5e400f0650
flags: 0

View File

@@ -24,7 +24,7 @@ MonoBehaviour:
m_MinSize: {x: 300, y: 200}
m_MaxSize: {x: 24288, y: 16192}
vertical: 0
controlID: 21
controlID: 466
--- !u!114 &2
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -45,10 +45,10 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 262
y: 19
width: 794
height: 375
x: 278
y: 73
width: 1206
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: 794, y: 354}
m_TargetSize: {x: 1206, y: 550}
m_TextureFilterMode: 0
m_TextureHideFlags: 61
m_RenderIMGUI: 1
@@ -67,17 +67,17 @@ MonoBehaviour:
m_UseMipMap: 0
m_VSyncEnabled: 0
m_Gizmos: 0
m_Stats: 0
m_Stats: 1
m_SelectedSizes: 00000000000000000000000000000000000000000000000000000000000000000000000000000000
m_ZoomArea:
m_HRangeLocked: 0
m_VRangeLocked: 0
hZoomLockedByDefault: 0
vZoomLockedByDefault: 0
m_HBaseRangeMin: -397
m_HBaseRangeMax: 397
m_VBaseRangeMin: -177
m_VBaseRangeMax: 177
m_HBaseRangeMin: -603
m_HBaseRangeMax: 603
m_VBaseRangeMin: -275
m_VBaseRangeMax: 275
m_HAllowExceedBaseRangeMin: 1
m_HAllowExceedBaseRangeMax: 1
m_VAllowExceedBaseRangeMin: 1
@@ -86,7 +86,7 @@ MonoBehaviour:
m_HSlider: 0
m_VSlider: 0
m_IgnoreScrollWheelUntilClicked: 0
m_EnableMouseInput: 0
m_EnableMouseInput: 1
m_EnableSliderZoomHorizontal: 0
m_EnableSliderZoomVertical: 0
m_UniformScale: 1
@@ -95,23 +95,23 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 21
width: 794
height: 354
width: 1206
height: 550
m_Scale: {x: 1, y: 1}
m_Translation: {x: 397, y: 177}
m_Translation: {x: 603, y: 275}
m_MarginLeft: 0
m_MarginRight: 0
m_MarginTop: 0
m_MarginBottom: 0
m_LastShownAreaInsideMargins:
serializedVersion: 2
x: -397
y: -177
width: 794
height: 354
x: -603
y: -275
width: 1206
height: 550
m_MinimalGUI: 1
m_defaultScale: 1
m_LastWindowPixelSize: {x: 794, y: 375}
m_LastWindowPixelSize: {x: 1206, y: 571}
m_ClearInEditMode: 1
m_NoCameraWarning: 1
m_LowResolutionForAspectRatios: 01000000000000000000
@@ -141,7 +141,7 @@ MonoBehaviour:
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 16192, y: 16192}
vertical: 1
controlID: 50
controlID: 467
--- !u!114 &4
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -162,11 +162,11 @@ MonoBehaviour:
x: 0
y: 0
width: 1486
height: 591
height: 592
m_MinSize: {x: 200, y: 100}
m_MaxSize: {x: 16192, y: 8096}
vertical: 0
controlID: 51
controlID: 445
--- !u!114 &5
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -184,8 +184,8 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 298
height: 591
width: 278
height: 592
m_MinSize: {x: 201, y: 221}
m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 6}
@@ -215,8 +215,8 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 73
width: 297
height: 570
width: 277
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: 1efbffff926100009662000068630000
m_ExpandedIDs: 28fbffff
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@@ -265,12 +265,12 @@ MonoBehaviour:
m_Children: []
m_Position:
serializedVersion: 2
x: 298
x: 278
y: 0
width: 1188
height: 591
m_MinSize: {x: 202, y: 221}
m_MaxSize: {x: 4002, y: 4021}
width: 1208
height: 592
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 2}
m_Panes:
- {fileID: 8}
@@ -297,10 +297,10 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 298
x: 278
y: 73
width: 1186
height: 570
width: 1206
height: 571
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
@@ -311,8 +311,8 @@ MonoBehaviour:
collapsed: 0
displayed: 1
snapOffset: {x: 0, y: 0}
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 0
snapOffsetDelta: {x: -101, y: -26}
snapCorner: 3
id: Tool Settings
index: 0
layout: 1
@@ -321,9 +321,9 @@ MonoBehaviour:
floating: 0
collapsed: 0
displayed: 1
snapOffset: {x: 101, y: 0}
snapOffset: {x: -141, y: 149}
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 0
snapCorner: 1
id: unity-grid-and-snap-toolbar
index: 1
layout: 1
@@ -397,7 +397,7 @@ MonoBehaviour:
containerId: overlay-container--right
floating: 0
collapsed: 0
displayed: 0
displayed: 1
snapOffset: {x: 0, y: 0}
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 0
@@ -557,9 +557,9 @@ MonoBehaviour:
m_PlayAudio: 0
m_AudioPlay: 0
m_Position:
m_Target: {x: 1.097747, y: -5.537953, z: -0.028699528}
m_Target: {x: 4.258875, y: 1.3866613, z: -0.7007158}
speed: 2
m_Value: {x: 1.097747, y: -5.537953, z: -0.028699528}
m_Value: {x: 4.258875, y: 1.3866613, z: -0.7007158}
m_RenderMode: 0
m_CameraMode:
drawMode: 0
@@ -610,15 +610,15 @@ MonoBehaviour:
speed: 2
m_Value: {x: 0, y: 0, z: 0, w: 1}
m_Size:
m_Target: 7.9420705
m_Target: 7.639861
speed: 2
m_Value: 7.9420705
m_Value: 7.639861
m_Ortho:
m_Target: 1
speed: 2
m_Value: 1
m_CameraSettings:
m_Speed: 1.0005
m_Speed: 1
m_SpeedNormalized: 0.5
m_SpeedMin: 0.001
m_SpeedMax: 2
@@ -655,13 +655,13 @@ MonoBehaviour:
m_Position:
serializedVersion: 2
x: 0
y: 591
y: 592
width: 1486
height: 356
height: 355
m_MinSize: {x: 200, y: 100}
m_MaxSize: {x: 16192, y: 8096}
vertical: 0
controlID: 64
controlID: 468
--- !u!114 &10
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -679,10 +679,10 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 749
height: 356
m_MinSize: {x: 230, y: 250}
m_MaxSize: {x: 10000, y: 10000}
width: 759
height: 355
m_MinSize: {x: 231, y: 271}
m_MaxSize: {x: 10001, y: 10021}
m_ActualView: {fileID: 11}
m_Panes:
- {fileID: 11}
@@ -709,9 +709,9 @@ MonoBehaviour:
m_Pos:
serializedVersion: 2
x: 0
y: 664
width: 748
height: 335
y: 665
width: 758
height: 334
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
@@ -729,22 +729,22 @@ MonoBehaviour:
m_SkipHidden: 0
m_SearchArea: 1
m_Folders:
- Assets/Assets/Pics/Dice
- Assets/Scripts
m_Globs: []
m_OriginalText:
m_ViewMode: 1
m_StartGridSize: 55
m_LastFolders:
- Assets/Assets/Pics/Dice
- Assets/Scripts
m_LastFoldersGridSize: 55
m_LastProjectPath: C:\dev\find the source\projekt\FindTheSource
m_LockTracker:
m_IsLocked: 0
m_FolderTreeState:
scrollPos: {x: 0, y: 0}
m_SelectedIDs: 2a730000
m_LastClickedID: 29482
m_ExpandedIDs: 00000000ea650000fc65000026730000
m_SelectedIDs: 3c660000
m_LastClickedID: 26172
m_ExpandedIDs: 0000000028660000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@@ -772,7 +772,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 00000000ea650000
m_ExpandedIDs: 0000000028660000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@@ -797,9 +797,9 @@ MonoBehaviour:
m_Icon: {fileID: 0}
m_ResourceFile:
m_ListAreaState:
m_SelectedInstanceIDs: a85f0000
m_LastClickedInstanceID: 24488
m_HadKeyboardFocusLastEvent: 1
m_SelectedInstanceIDs:
m_LastClickedInstanceID: 0
m_HadKeyboardFocusLastEvent: 0
m_ExpandedInstanceIDs: c623000000000000
m_RenameOverlay:
m_UserAcceptedRename: 0
@@ -843,10 +843,10 @@ MonoBehaviour:
m_Children: []
m_Position:
serializedVersion: 2
x: 749
x: 759
y: 0
width: 737
height: 356
width: 727
height: 355
m_MinSize: {x: 102, y: 121}
m_MaxSize: {x: 4002, y: 4021}
m_ActualView: {fileID: 13}
@@ -874,10 +874,10 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 749
y: 664
width: 735
height: 335
x: 759
y: 665
width: 725
height: 334
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: 24488
m_LastInspectedObjectInstanceID: -1
m_LastVerticalScrollValue: 0
m_GlobalObjectId:
m_InspectorMode: 0