Merge branch 'master' of https://github.com/playmaker1210/PuzzleColorBall
This commit is contained in:
@@ -1,46 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-2758277150226478847
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 2
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 179fc3111e144bc4688dca4038b3265d, type: 3}
|
||||
m_Name: Android Settings
|
||||
m_EditorClassIdentifier:
|
||||
m_LoaderManagerInstance: {fileID: 7951869756074961481}
|
||||
m_InitManagerOnStart: 0
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 2
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: cb0ece14d1f711a4fb9325ca819dee95, type: 3}
|
||||
m_Name: AdaptivePerformanceGeneralSettings
|
||||
m_EditorClassIdentifier:
|
||||
Keys: 07000000
|
||||
Values:
|
||||
- {fileID: -2758277150226478847}
|
||||
--- !u!114 &7951869756074961481
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 2
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 536372c49e1ca914d822849d36de938c, type: 3}
|
||||
m_Name: Android Providers
|
||||
m_EditorClassIdentifier:
|
||||
m_AutomaticLoading: 0
|
||||
m_AutomaticRunning: 0
|
||||
m_Loaders: []
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e470b0a1c0a80ec4eada7630c914d271
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,315 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 2
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b592865877cb54284a5d1d88aec9cfbb, type: 3}
|
||||
m_Name: Simulator Provider Settings
|
||||
m_EditorClassIdentifier:
|
||||
m_Logging: 1
|
||||
m_AutomaticPerformanceModeEnabled: 1
|
||||
m_EnableBoostOnStartup: 1
|
||||
m_StatsLoggingFrequencyInFrames: 50
|
||||
m_IndexerSettings:
|
||||
m_Active: 1
|
||||
m_ThermalActionDelay: 10
|
||||
m_PerformanceActionDelay: 4
|
||||
m_ScalerSettings:
|
||||
m_AdaptiveFramerate:
|
||||
m_Name: Adaptive Framerate
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 2
|
||||
m_Target: 7
|
||||
m_MaxLevel: 45
|
||||
m_MinBound: 15
|
||||
m_MaxBound: 60
|
||||
m_AdaptiveResolution:
|
||||
m_Name: Adaptive Resolution
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 0
|
||||
m_Target: 6
|
||||
m_MaxLevel: 9
|
||||
m_MinBound: 0.5
|
||||
m_MaxBound: 1
|
||||
m_AdaptiveBatching:
|
||||
m_Name: Adaptive Batching
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 1
|
||||
m_Target: 1
|
||||
m_MaxLevel: 1
|
||||
m_MinBound: 0
|
||||
m_MaxBound: 1
|
||||
m_AdaptiveLOD:
|
||||
m_Name: Adaptive LOD
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 2
|
||||
m_Target: 2
|
||||
m_MaxLevel: 3
|
||||
m_MinBound: 0.4
|
||||
m_MaxBound: 1
|
||||
m_AdaptiveLut:
|
||||
m_Name: Adaptive Lut
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 1
|
||||
m_Target: 3
|
||||
m_MaxLevel: 1
|
||||
m_MinBound: 0
|
||||
m_MaxBound: 1
|
||||
m_AdaptiveMSAA:
|
||||
m_Name: Adaptive MSAA
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 1
|
||||
m_Target: 6
|
||||
m_MaxLevel: 2
|
||||
m_MinBound: 0
|
||||
m_MaxBound: 1
|
||||
m_AdaptiveShadowCascade:
|
||||
m_Name: Adaptive Shadow Cascade
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 1
|
||||
m_Target: 3
|
||||
m_MaxLevel: 2
|
||||
m_MinBound: 0
|
||||
m_MaxBound: 1
|
||||
m_AdaptiveShadowDistance:
|
||||
m_Name: Adaptive Shadow Distance
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 0
|
||||
m_Target: 2
|
||||
m_MaxLevel: 3
|
||||
m_MinBound: 0.15
|
||||
m_MaxBound: 1
|
||||
m_AdaptiveShadowmapResolution:
|
||||
m_Name: Adaptive Shadowmap Resolution
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 0
|
||||
m_Target: 2
|
||||
m_MaxLevel: 3
|
||||
m_MinBound: 0.15
|
||||
m_MaxBound: 1
|
||||
m_AdaptiveShadowQuality:
|
||||
m_Name: Adaptive Shadow Quality
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 2
|
||||
m_Target: 3
|
||||
m_MaxLevel: 3
|
||||
m_MinBound: 0
|
||||
m_MaxBound: 1
|
||||
m_AdaptiveSorting:
|
||||
m_Name: Adaptive Sorting
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 1
|
||||
m_Target: 1
|
||||
m_MaxLevel: 1
|
||||
m_MinBound: 0
|
||||
m_MaxBound: 1
|
||||
m_AdaptiveTransparency:
|
||||
m_Name: Adaptive Transparency
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 2
|
||||
m_Target: 2
|
||||
m_MaxLevel: 1
|
||||
m_MinBound: 0
|
||||
m_MaxBound: 1
|
||||
m_AdaptiveViewDistance:
|
||||
m_Name: Adaptive View Distance
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 2
|
||||
m_Target: 2
|
||||
m_MaxLevel: 40
|
||||
m_MinBound: 50
|
||||
m_MaxBound: 1000
|
||||
m_AdaptivePhysics:
|
||||
m_Name: Adaptive Physics
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 0
|
||||
m_Target: 1
|
||||
m_MaxLevel: 5
|
||||
m_MinBound: 0.5
|
||||
m_MaxBound: 1
|
||||
m_AdaptiveDecals:
|
||||
m_Name: Adaptive Decals
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 1
|
||||
m_Target: 2
|
||||
m_MaxLevel: 20
|
||||
m_MinBound: 0.01
|
||||
m_MaxBound: 1
|
||||
m_AdaptiveLayerCulling:
|
||||
m_Name: Adaptive Layer Culling
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 1
|
||||
m_Target: 1
|
||||
m_MaxLevel: 40
|
||||
m_MinBound: 0.01
|
||||
m_MaxBound: 1
|
||||
m_scalerProfileList:
|
||||
- m_AdaptiveFramerate:
|
||||
m_Name: Adaptive Framerate
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 2
|
||||
m_Target: 7
|
||||
m_MaxLevel: 45
|
||||
m_MinBound: 15
|
||||
m_MaxBound: 60
|
||||
m_AdaptiveResolution:
|
||||
m_Name: Adaptive Resolution
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 0
|
||||
m_Target: 6
|
||||
m_MaxLevel: 9
|
||||
m_MinBound: 0.5
|
||||
m_MaxBound: 1
|
||||
m_AdaptiveBatching:
|
||||
m_Name: Adaptive Batching
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 1
|
||||
m_Target: 1
|
||||
m_MaxLevel: 1
|
||||
m_MinBound: 0
|
||||
m_MaxBound: 1
|
||||
m_AdaptiveLOD:
|
||||
m_Name: Adaptive LOD
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 2
|
||||
m_Target: 2
|
||||
m_MaxLevel: 3
|
||||
m_MinBound: 0.4
|
||||
m_MaxBound: 1
|
||||
m_AdaptiveLut:
|
||||
m_Name: Adaptive Lut
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 1
|
||||
m_Target: 3
|
||||
m_MaxLevel: 1
|
||||
m_MinBound: 0
|
||||
m_MaxBound: 1
|
||||
m_AdaptiveMSAA:
|
||||
m_Name: Adaptive MSAA
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 1
|
||||
m_Target: 6
|
||||
m_MaxLevel: 2
|
||||
m_MinBound: 0
|
||||
m_MaxBound: 1
|
||||
m_AdaptiveShadowCascade:
|
||||
m_Name: Adaptive Shadow Cascade
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 1
|
||||
m_Target: 3
|
||||
m_MaxLevel: 2
|
||||
m_MinBound: 0
|
||||
m_MaxBound: 1
|
||||
m_AdaptiveShadowDistance:
|
||||
m_Name: Adaptive Shadow Distance
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 0
|
||||
m_Target: 2
|
||||
m_MaxLevel: 3
|
||||
m_MinBound: 0.15
|
||||
m_MaxBound: 1
|
||||
m_AdaptiveShadowmapResolution:
|
||||
m_Name: Adaptive Shadowmap Resolution
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 0
|
||||
m_Target: 2
|
||||
m_MaxLevel: 3
|
||||
m_MinBound: 0.15
|
||||
m_MaxBound: 1
|
||||
m_AdaptiveShadowQuality:
|
||||
m_Name: Adaptive Shadow Quality
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 2
|
||||
m_Target: 3
|
||||
m_MaxLevel: 3
|
||||
m_MinBound: 0
|
||||
m_MaxBound: 1
|
||||
m_AdaptiveSorting:
|
||||
m_Name: Adaptive Sorting
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 1
|
||||
m_Target: 1
|
||||
m_MaxLevel: 1
|
||||
m_MinBound: 0
|
||||
m_MaxBound: 1
|
||||
m_AdaptiveTransparency:
|
||||
m_Name: Adaptive Transparency
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 2
|
||||
m_Target: 2
|
||||
m_MaxLevel: 1
|
||||
m_MinBound: 0
|
||||
m_MaxBound: 1
|
||||
m_AdaptiveViewDistance:
|
||||
m_Name: Adaptive View Distance
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 2
|
||||
m_Target: 2
|
||||
m_MaxLevel: 40
|
||||
m_MinBound: 50
|
||||
m_MaxBound: 1000
|
||||
m_AdaptivePhysics:
|
||||
m_Name: Adaptive Physics
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 0
|
||||
m_Target: 1
|
||||
m_MaxLevel: 5
|
||||
m_MinBound: 0.5
|
||||
m_MaxBound: 1
|
||||
m_AdaptiveDecals:
|
||||
m_Name: Adaptive Decals
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 1
|
||||
m_Target: 2
|
||||
m_MaxLevel: 20
|
||||
m_MinBound: 0.01
|
||||
m_MaxBound: 1
|
||||
m_AdaptiveLayerCulling:
|
||||
m_Name: Adaptive Layer Culling
|
||||
m_Enabled: 0
|
||||
m_Scale: 1
|
||||
m_VisualImpact: 1
|
||||
m_Target: 1
|
||||
m_MaxLevel: 40
|
||||
m_MinBound: 0.01
|
||||
m_MaxBound: 1
|
||||
m_Name: Default Scaler Profile
|
||||
m_DefaultScalerProfilerIndex: 0
|
||||
k_AssetVersion: 2
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 15f99888c21c02c46b338a1aebdfe4de
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8851c5995be5f704babebf752d60b4e2
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6b0a795f90d876744b921b3441c4a3ce
|
||||
guid: 45f19baf5179cf745ba619186f664b9e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f7d59f7a63599f64b8baffe0fe2e8eac
|
||||
guid: 7fd43fea6e592be348af51e93185cf90
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
4317
Assets/Resources/Prefabs/WorldObjects/World1/haz1.prefab
Normal file
4317
Assets/Resources/Prefabs/WorldObjects/World1/haz1.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 88c6da05db186cb44a4453fd624b31b2
|
||||
DefaultImporter:
|
||||
guid: 801674bb4f54353d3966591ac2876a92
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
2441
Assets/Resources/Prefabs/WorldObjects/World1/haz2.prefab
Normal file
2441
Assets/Resources/Prefabs/WorldObjects/World1/haz2.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3b4dc5f685f8edc4bbba6fb0c8ea39ba
|
||||
DefaultImporter:
|
||||
guid: 8500f6075c56d47809b2a1e2dfb10d39
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
@@ -1389,7 +1389,7 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 601898925}
|
||||
m_LocalRotation: {x: 0.045581307, y: -0.70516795, z: 0.045520626, w: 0.7061079}
|
||||
m_LocalRotation: {x: 0.045581326, y: -0.70516795, z: 0.045520645, w: 0.7061079}
|
||||
m_LocalPosition: {x: 2.27, y: 4.16525, z: 3.82}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
@@ -1704,6 +1704,18 @@ MonoBehaviour:
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
- m_Target: {fileID: 645543792}
|
||||
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
|
||||
m_MethodName: SetActive
|
||||
m_Mode: 6
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!114 &645543795
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1777,7 +1789,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -264.60254, y: 560.00006}
|
||||
m_AnchoredPosition: {x: -291, y: 745}
|
||||
m_SizeDelta: {x: 431.1149, y: 128}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &702512603
|
||||
@@ -1912,7 +1924,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -227, y: 749.9}
|
||||
m_AnchoredPosition: {x: -253.39745, y: 934.9001}
|
||||
m_SizeDelta: {x: 506.3254, y: 168.2041}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &788008818
|
||||
@@ -1935,7 +1947,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: 'Coins: 0'
|
||||
m_text:
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
@@ -1962,7 +1974,7 @@ MonoBehaviour:
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 100
|
||||
m_fontSize: 60
|
||||
m_fontSizeBase: 60
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 1
|
||||
@@ -3276,6 +3288,7 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
loadFrom: []
|
||||
sideObjects: []
|
||||
sideObjectsSpawned: []
|
||||
materials:
|
||||
- {fileID: 2100000, guid: 97cabee3711df3b4b944878d6d30edda, type: 2}
|
||||
- {fileID: 2100000, guid: 197ee10712c66054cb2f88781c8d94f4, type: 2}
|
||||
@@ -3312,7 +3325,7 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
rb: {fileID: 7917514869596290073}
|
||||
jumpforce: 350
|
||||
holdTime: 0.2
|
||||
holdTime: 0.4
|
||||
activeControllType: 1
|
||||
leftButton: {fileID: 2129484388}
|
||||
jumpButton: {fileID: 284201300}
|
||||
@@ -3704,7 +3717,7 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1513686735}
|
||||
m_LocalRotation: {x: 0.22590086, y: 0.0030496013, z: -0.0007071918, w: 0.9741453}
|
||||
m_LocalRotation: {x: 0.22590086, y: 0.0030496388, z: -0.00070720055, w: 0.9741453}
|
||||
m_LocalPosition: {x: -0.28647116, y: 6.2664723, z: 2.6748314}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
@@ -3924,7 +3937,7 @@ RectTransform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1572233529}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -0}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -3933,7 +3946,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 300.03, y: 546}
|
||||
m_AnchoredPosition: {x: 273.63257, y: 731.00006}
|
||||
m_SizeDelta: {x: 400, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1572233531
|
||||
@@ -4615,7 +4628,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 367.5, y: 750}
|
||||
m_AnchoredPosition: {x: 341.10257, y: 935.00006}
|
||||
m_SizeDelta: {x: 265.0578, y: 168.0133}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1890329291
|
||||
@@ -12409,6 +12422,10 @@ PrefabInstance:
|
||||
propertyPath: m_TagString
|
||||
value: Floor
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7191957008091885843, guid: d73ae45b499e5f74ba3e0d287b87893c, type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: 97cabee3711df3b4b944878d6d30edda, type: 2}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: d73ae45b499e5f74ba3e0d287b87893c, type: 3}
|
||||
--- !u!1 &5948498191493442793
|
||||
@@ -13958,6 +13975,7 @@ GameObject:
|
||||
- component: {fileID: 7917514869596290071}
|
||||
- component: {fileID: 7917514869596290073}
|
||||
- component: {fileID: 7917514869596290074}
|
||||
- component: {fileID: 7917514869596290075}
|
||||
m_Layer: 0
|
||||
m_Name: Boby
|
||||
m_TagString: Player
|
||||
@@ -14669,6 +14687,19 @@ CapsuleCollider:
|
||||
m_Height: 6.3698125
|
||||
m_Direction: 1
|
||||
m_Center: {x: -0.03604698, y: 3.18, z: -0.06167984}
|
||||
--- !u!114 &7917514869596290075
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7398140401948337837}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 434812251bf6e1f44a54fa63754df2af, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
isGrounded: 1
|
||||
--- !u!4 &7986884067029569574
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -7,16 +7,20 @@ using System.Text;
|
||||
|
||||
public class CoinCounter : MonoBehaviour
|
||||
{
|
||||
public ulong coin = ulong.MaxValue; //szedje le db-bol a playerhez a coint
|
||||
public ulong coin; //szedje le db-bol a playerhez a coint
|
||||
public TMP_Text coinCounterUI;
|
||||
private string path;
|
||||
private StreamWriter writer;
|
||||
private StreamReader reader;
|
||||
|
||||
private DatabaseData db;
|
||||
private UsernameHandler usernameHandler;
|
||||
|
||||
private void Awake() {
|
||||
db = FindObjectOfType<DatabaseData>();
|
||||
usernameHandler = FindObjectOfType<UsernameHandler>();
|
||||
|
||||
|
||||
/*path = Application.persistentDataPath + "/coins.txt";
|
||||
|
||||
if(!File.Exists(path)){ //ha nincs meg ilyen fajl hozza letre
|
||||
@@ -37,6 +41,10 @@ public class CoinCounter : MonoBehaviour
|
||||
coinCounterUI.text = "Coins: " + coin.ToString();*/
|
||||
}
|
||||
|
||||
public void SetCoin(ulong number){
|
||||
coin = number;
|
||||
coinCounterUI.text = "Coins: " + coin.ToString();
|
||||
}
|
||||
|
||||
public void AddCoin(ulong number){
|
||||
coin += number;
|
||||
@@ -49,7 +57,7 @@ public class CoinCounter : MonoBehaviour
|
||||
|
||||
public void RemoveCoin(ulong number){
|
||||
coin -= number;
|
||||
//coinCounterUI.text = "Coins: " + coin.ToString();
|
||||
coinCounterUI.text = "Coins: " + coin.ToString();
|
||||
|
||||
/*writer = new StreamWriter(path, false, Encoding.Default);
|
||||
writer.Write(coin);
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
public enum Colors {
|
||||
None = -1,
|
||||
Grey,
|
||||
Red,
|
||||
Blue,
|
||||
Green,
|
||||
Yellow,
|
||||
Rainbow
|
||||
};
|
||||
|
||||
public class ColorManager : MonoBehaviour
|
||||
{
|
||||
public Material[] colorMaterials = new Material[Enum.GetNames(typeof(Colors)).Length];
|
||||
|
||||
public void WashColor(GameObject washed) {
|
||||
SetColor(Colors.Grey, washed);
|
||||
}
|
||||
|
||||
public void SetColor(Colors color, GameObject toPaint, Collision collision = null) {
|
||||
if(color == Colors.None) {
|
||||
if (collision.transform.CompareTag("ColorChanger")) {
|
||||
toPaint.GetComponent<Renderer>().material.color = collision.transform.GetComponent<Renderer>().material.color;
|
||||
}
|
||||
} else {
|
||||
toPaint.GetComponent<Renderer>().material.color = colorMaterials[(int)color].color;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void CheckGroundColor(GameObject collided) {
|
||||
if (transform.GetComponent<Renderer>().material.color != collided.transform.GetComponent<Renderer>().material.color) {
|
||||
Debug.Log("The colors are not the same! GroundColor: " + collided.transform.GetComponent<Renderer>().material.color + " PlayerColor: "
|
||||
+ transform.GetComponent<Renderer>().material.color);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnCollisionEnter(Collision collision) {
|
||||
if (collision.collider.CompareTag("Water")) {
|
||||
WashColor(collision.gameObject);
|
||||
} else if (collision.collider.CompareTag("Ground")) {
|
||||
CheckGroundColor(collision.gameObject);
|
||||
} else if (collision.collider.CompareTag("ColorChanger")) {
|
||||
SetColor(Colors.None, transform.gameObject, collision);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,9 +7,11 @@ public class GroundController : MonoBehaviour
|
||||
private GameObject[] ground;
|
||||
public GameObject[] loadFrom;
|
||||
public GameObject[] sideObjects;
|
||||
public GameObject[] sideObjectsSpawned;
|
||||
public Material[] materials;
|
||||
public int materialIndex = 0;
|
||||
public float groundMoveSpeed = 10f;
|
||||
private Vector3 lastSideObjectPos = new Vector3(0,0,0);
|
||||
|
||||
//private CollectibleSpawner cs;
|
||||
|
||||
@@ -18,7 +20,7 @@ public class GroundController : MonoBehaviour
|
||||
|
||||
//Loading modules
|
||||
loadFrom = LoadPrefabs("Prefabs/Modulok");
|
||||
sideObjects = LoadPrefabs("Models/World Objects/World 1");
|
||||
sideObjects = LoadPrefabs("Prefabs/WorldObjects/World1/");
|
||||
Debug.Log("loadFrom length: " + loadFrom.Length);
|
||||
Debug.Log("sideObjects Length: " + sideObjects.Length);
|
||||
|
||||
@@ -33,15 +35,27 @@ public class GroundController : MonoBehaviour
|
||||
|
||||
private void Update() {
|
||||
ground = GameObject.FindGameObjectsWithTag("Ground"); //torles miatt ujra le kell kerni a ground objecteket
|
||||
OrderGroundArrayByZ(); //rendezzuk z szerint hogy sorba legyenek
|
||||
sideObjectsSpawned = GameObject.FindGameObjectsWithTag("SideObject");
|
||||
|
||||
OrderArrayByZ(ground); //rendezzuk z szerint a talajt
|
||||
OrderArrayByZ(sideObjectsSpawned);
|
||||
|
||||
if(sideObjectsSpawned.Length > 0){
|
||||
lastSideObjectPos = sideObjectsSpawned[sideObjectsSpawned.Length-1].transform.position;
|
||||
}
|
||||
|
||||
for (int i = 0; i < ground.Length; i++){ //ground objecteket mozgatja
|
||||
ground[i].transform.position = ground[i].transform.position + new Vector3(0,0, -groundMoveSpeed * Time.deltaTime);
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < sideObjectsSpawned.Length; i++){
|
||||
sideObjectsSpawned[i].transform.position = sideObjectsSpawned[i].transform.position + new Vector3(0,0, -groundMoveSpeed * Time.deltaTime);
|
||||
}
|
||||
|
||||
//uj ground letrehozas
|
||||
if(ground[ground.Length-1].transform.position.z <= 120){
|
||||
CreateNewGround();
|
||||
CreateNewSideObjects(false);
|
||||
|
||||
ground = GameObject.FindGameObjectsWithTag("Ground");
|
||||
|
||||
@@ -79,6 +93,23 @@ public class GroundController : MonoBehaviour
|
||||
return arr;
|
||||
}
|
||||
|
||||
private void CreateNewSideObjects(bool isLeftSide){
|
||||
int random = UnityEngine.Random.Range(0, sideObjects.Length);
|
||||
|
||||
GameObject inst = sideObjects[random];
|
||||
Vector3 pos = new Vector3(0,0,0);
|
||||
|
||||
if(inst.name == "haz1" && !isLeftSide){
|
||||
pos = new Vector3(4,0,0); //check pos in editor TODO!!
|
||||
}else if(inst.name == "haz2"){
|
||||
pos = new Vector3(9,0,0);
|
||||
}
|
||||
|
||||
if(isLeftSide) pos.x = -pos.x;
|
||||
|
||||
Instantiate(inst, lastSideObjectPos + pos, ground[0].transform.rotation);
|
||||
}
|
||||
|
||||
public void changeMaterialIndex(){
|
||||
|
||||
}
|
||||
@@ -93,14 +124,14 @@ public class GroundController : MonoBehaviour
|
||||
return false; //nem torolheto
|
||||
}
|
||||
|
||||
private void OrderGroundArrayByZ(){
|
||||
private void OrderArrayByZ(GameObject[] array){
|
||||
GameObject csere;
|
||||
for (int i = 0; i < ground.Length; i++){
|
||||
for (int i = 0; i < array.Length; i++){
|
||||
for(int j = 0; j < i; j++){
|
||||
if(ground[j].transform.position.z > ground[j+1].transform.position.z){
|
||||
csere = ground[j];
|
||||
ground[j] = ground[j+1];
|
||||
ground[j+1] = csere;
|
||||
if(array[j].transform.position.z > array[j+1].transform.position.z){
|
||||
csere = array[j];
|
||||
array[j] = array[j+1];
|
||||
array[j+1] = csere;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
13
Assets/Scripts/IsGrounded.cs
Normal file
13
Assets/Scripts/IsGrounded.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class IsGrounded : MonoBehaviour
|
||||
{
|
||||
public bool isGrounded = true;
|
||||
|
||||
private void OnCollisionEnter(Collision other) {
|
||||
//Debug.Log("pc <color=blue>"+other.gameObject.name+"</color>");
|
||||
isGrounded = true;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ab4fe611c9713254e9fcc6e0de77f87f
|
||||
guid: 434812251bf6e1f44a54fa63754df2af
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@@ -21,17 +21,38 @@ public class DatabaseData : MonoBehaviour
|
||||
|
||||
public ulong coins = 0;
|
||||
|
||||
|
||||
private bool forceLocalUrl = true;
|
||||
private const int PORT = 24002;
|
||||
|
||||
#if UNITY_EDITOR || UNITY_EDITOR_64
|
||||
private string url = "localhost:" + PORT.ToString();
|
||||
#else
|
||||
private string url = "nodejs.dszcbaross.edu.hu:" + PORT.ToString();
|
||||
#endif
|
||||
|
||||
private void Awake() {
|
||||
hst = FindObjectOfType<HighScoreTable>(); //High Score Table referencia
|
||||
htdc = new HighScoreTableDataContainer(); //High Score Table Container objektum
|
||||
|
||||
htdc = new HighScoreTableDataContainer(); //High Score Table Container objektum
|
||||
coinc = FindObjectOfType<CoinCounter>();
|
||||
|
||||
//writer = new StreamWriter(Application.persistentDataPath + "/coins.txt", false, Encoding.Default);
|
||||
|
||||
/*if((Application.platform == RuntimePlatform.WindowsEditor || Application.platform == RuntimePlatform.LinuxEditor || Application.platform == RuntimePlatform.OSXEditor) && forceLocalUrl){
|
||||
//ha az editorba van
|
||||
url = "http://localhost:" + PORT.ToString();
|
||||
}else if(!forceLocalUrl){
|
||||
url = "nodejs.dszcbaross.edu.hu:" + PORT.ToString();
|
||||
}else{
|
||||
url = "nodejs.dszcbaross.edu.hu:" + PORT.ToString();
|
||||
}*/
|
||||
|
||||
url = "nodejs.dszcbaross.edu.hu:" + PORT.ToString();
|
||||
Debug.Log("<color=pink>url: </color>" + url);
|
||||
}
|
||||
|
||||
private void Start() {
|
||||
GetHighScoreData();
|
||||
//StartCoroutine(GetCoinData(1));
|
||||
GetHighScoreData(); //highscore scenehez
|
||||
}
|
||||
|
||||
public void jsonParser(string jsondata) { //beerkezo json adat eltarolasa
|
||||
@@ -44,6 +65,7 @@ public class DatabaseData : MonoBehaviour
|
||||
}
|
||||
|
||||
public void ParserCoin(string jsondata){
|
||||
//Debug.Log("<color=orange>JsonDataCoin:" + jsondata + "</color>");
|
||||
string data = "";
|
||||
for (int i = 0; i < jsondata.Length; i++)
|
||||
{
|
||||
@@ -51,8 +73,10 @@ public class DatabaseData : MonoBehaviour
|
||||
data += jsondata[i]; //kiszedi a szamokat a stringbol
|
||||
}
|
||||
}
|
||||
Debug.Log(data);
|
||||
Debug.Log("data coin: " + data);
|
||||
coins = ulong.Parse(data);
|
||||
Debug.Log("<color=orange>db coins: " + coins + "</color>");
|
||||
coinc.SetCoin(coins);
|
||||
}
|
||||
|
||||
//fuggvenyek amik meghivjak a rutint
|
||||
@@ -62,14 +86,19 @@ public class DatabaseData : MonoBehaviour
|
||||
public void PostNewScoreData(int playerid, ulong score, string time) => StartCoroutine(IPostNewScoreData(playerid, score, time));
|
||||
public void PostNewPalyaData() => StartCoroutine(IPostNewPalyaData());
|
||||
|
||||
public void GetCoinDataCall(int userid) => StartCoroutine(GetCoinData(userid));
|
||||
public void PostNewCoinData(ulong coins, int userid) => StartCoroutine(IPostNewCoinData(coins, userid));
|
||||
|
||||
public ulong GetCoins(int userid){
|
||||
StartCoroutine(GetCoinData(userid));
|
||||
|
||||
Debug.Log("<color=orange> Return coin: " + coins + "</color>");
|
||||
|
||||
return coins;
|
||||
}
|
||||
|
||||
private IEnumerator GetCoinData(int userid){
|
||||
string uri = "http://localhost:3000/coinget";
|
||||
string uri = url + "/coinget";
|
||||
|
||||
var uwr = new UnityWebRequest(uri, "GET");
|
||||
byte[] jsonToSend = new System.Text.UTF8Encoding().GetBytes("{\"bevitel1\":"+userid+"}");
|
||||
@@ -92,7 +121,7 @@ public class DatabaseData : MonoBehaviour
|
||||
private IEnumerator IGetPlayerData() {
|
||||
//input.text = "Loading..."; //ideiglenes szoveg amig nem jelenik meg az adat szoveg
|
||||
|
||||
string uri = "http://localhost:3000/player"; //backend vegpont linkje
|
||||
string uri = url + "/player"; //backend vegpont linkje
|
||||
|
||||
using (UnityWebRequest request = UnityWebRequest.Get(uri)) { //uj webrequest objektum letrehozasa, aminek megadjuk hogy ez egy get-es lekerdezes
|
||||
yield return request.SendWebRequest(); //amig be nem fejezodik az fv ide fog visszaterni
|
||||
@@ -120,7 +149,7 @@ public class DatabaseData : MonoBehaviour
|
||||
|
||||
|
||||
private IEnumerator IGetCurretPlayer(int userid){
|
||||
string uri = "http://localhost:3000/currentplayer";
|
||||
string uri = url + "/currentplayer";
|
||||
|
||||
var uwr = new UnityWebRequest(uri, "POST");
|
||||
byte[] jsonToSend = new System.Text.UTF8Encoding().GetBytes("{\"bevitel1\":"+userid+"}"); //palya id megadasa
|
||||
@@ -144,7 +173,7 @@ public class DatabaseData : MonoBehaviour
|
||||
}
|
||||
|
||||
private IEnumerator IGetHighScoreData(){
|
||||
string uri = "http://localhost:3000/toplist";
|
||||
string uri = url + "/toplist";
|
||||
|
||||
var uwr = new UnityWebRequest(uri, "GET");
|
||||
//byte[] jsonToSend = new System.Text.UTF8Encoding().GetBytes("{\"bevitel1\":"+palya_id+"}"); //palya id megadasa
|
||||
@@ -167,7 +196,7 @@ public class DatabaseData : MonoBehaviour
|
||||
|
||||
|
||||
private IEnumerator IGetHighScoreDataNew(){
|
||||
string uri = "http://localhost:3000/toplist";
|
||||
string uri = url + "/toplist";
|
||||
|
||||
var uwr = new UnityWebRequest(uri, "GET");
|
||||
uwr.downloadHandler = (DownloadHandler)new DownloadHandlerBuffer();
|
||||
@@ -188,7 +217,7 @@ public class DatabaseData : MonoBehaviour
|
||||
|
||||
|
||||
private IEnumerator IGetPlayerCoins(string username){
|
||||
string uri = "http://localhost:3000/coinget";
|
||||
string uri = url + "/coinget";
|
||||
|
||||
var uwr = new UnityWebRequest(uri, "POST");
|
||||
byte[] jsonToSend = new System.Text.UTF8Encoding().GetBytes("{\"bevitel1\":"+username+"}"); //palya id megadasa
|
||||
@@ -211,7 +240,7 @@ public class DatabaseData : MonoBehaviour
|
||||
private IEnumerator IPostNewPlayerData() {
|
||||
//input.text = "loading...";
|
||||
|
||||
string uri = "http://localhost:3000/newplayer";
|
||||
string uri = url + "/newplayer";
|
||||
|
||||
var uwr = new UnityWebRequest(uri, "POST"); //post beallitasa
|
||||
byte[] jsonToSend = new System.Text.UTF8Encoding().GetBytes("{ \"bevitel1\":\"postusername\"}"); //felviteli json
|
||||
@@ -232,7 +261,7 @@ public class DatabaseData : MonoBehaviour
|
||||
private IEnumerator IPostNewScoreData(int playerid, ulong score, string time) {
|
||||
//input.text = "loading...";
|
||||
|
||||
string uri = "http://localhost:3000/newscore";
|
||||
string uri = url + "/newscore";
|
||||
|
||||
//felhasznalonevet ki kell irni fajlba
|
||||
//ha username keresve lenne es ha nincs akkor kap egy uj id-t ami ideiglenesen tarolodik (ures string a visszateres?)
|
||||
@@ -261,7 +290,7 @@ public class DatabaseData : MonoBehaviour
|
||||
private IEnumerator IPostNewPalyaData() {
|
||||
//input.text = "loading...";
|
||||
|
||||
string uri = "http://localhost:3000/newpalya";
|
||||
string uri = url + "/newpalya";
|
||||
|
||||
var uwr = new UnityWebRequest(uri, "POST");
|
||||
byte[] jsonToSend = new System.Text.UTF8Encoding().GetBytes("{ \"bevitel1\":\"Easy3\"}");
|
||||
@@ -271,6 +300,25 @@ public class DatabaseData : MonoBehaviour
|
||||
|
||||
yield return uwr.SendWebRequest();
|
||||
|
||||
if (uwr.isNetworkError) {
|
||||
Debug.Log(uwr.error);
|
||||
} else {
|
||||
//input.text = uwr.downloadHandler.text;
|
||||
Debug.Log(uwr.downloadHandler.text);
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerator IPostNewCoinData(ulong coins, int userid) {
|
||||
string uri = url + "/coinUpdate";
|
||||
|
||||
var uwr = new UnityWebRequest(uri, "POST");
|
||||
byte[] jsonToSend = new System.Text.UTF8Encoding().GetBytes("{\"bevitel1\":"+coins+",\"bevitel2\":"+userid+"}");
|
||||
uwr.uploadHandler = (UploadHandler)new UploadHandlerRaw(jsonToSend);
|
||||
uwr.downloadHandler = (DownloadHandler)new DownloadHandlerBuffer();
|
||||
uwr.SetRequestHeader("Content-Type", "application/json");
|
||||
|
||||
yield return uwr.SendWebRequest();
|
||||
|
||||
if (uwr.isNetworkError) {
|
||||
Debug.Log(uwr.error);
|
||||
} else {
|
||||
|
||||
@@ -7,6 +7,8 @@ public class PlayerController : MonoBehaviour
|
||||
{
|
||||
public Rigidbody rb; //jatekos teste
|
||||
private CameraController cc;
|
||||
private IsGrounded isGrounded;
|
||||
|
||||
public float jumpforce = 5f; //mekkorat tudjon ugorni
|
||||
private float sideMovement = 3f; //oldalra mennyit mozogjon
|
||||
private Vector3 direction; //jatkos pozicio
|
||||
@@ -17,13 +19,13 @@ public class PlayerController : MonoBehaviour
|
||||
private Vector2 startTouchPosition; //erintes kezdo pozicio
|
||||
private Vector2 endTouchPosition; //erintes vegpozicio
|
||||
|
||||
public ControllType activeControllType; //ezt kell atallitani hogy swipe-os vagy button-os legyen a mozgas
|
||||
public ControlType activeControllType; //ezt kell atallitani hogy swipe-os vagy button-os legyen a mozgas
|
||||
|
||||
public Button leftButton;
|
||||
public Button jumpButton;
|
||||
public Button rightButton;
|
||||
|
||||
public enum ControllType
|
||||
public enum ControlType
|
||||
{
|
||||
Swipe,
|
||||
Button
|
||||
@@ -31,16 +33,18 @@ public class PlayerController : MonoBehaviour
|
||||
|
||||
private void Awake() {
|
||||
cc = FindObjectOfType<CameraController>(); //kamera vezerlo referencia
|
||||
activeControllType = ControllType.Button;
|
||||
isGrounded = FindObjectOfType<IsGrounded>();
|
||||
|
||||
//activeControllType = ControlType.Button;
|
||||
}
|
||||
|
||||
public void setControllType(ControllType controlltype){
|
||||
public void setControllType(ControlType controlltype){
|
||||
activeControllType = controlltype;
|
||||
}
|
||||
|
||||
private void Update(){
|
||||
|
||||
if(activeControllType == ControllType.Swipe){
|
||||
if(activeControllType == ControlType.Swipe){
|
||||
leftButton.gameObject.SetActive(false);
|
||||
jumpButton.gameObject.SetActive(false);
|
||||
rightButton.gameObject.SetActive(false);
|
||||
@@ -59,7 +63,7 @@ public class PlayerController : MonoBehaviour
|
||||
timeSinceLastTap = 0f;
|
||||
}
|
||||
|
||||
if(isTapped && rb.transform.position.y <= 0.16f){
|
||||
if(isTapped && isGrounded.isGrounded){
|
||||
if(Time.time - timeSinceLastTap >= holdTime){ //ha nyomva tartotta a beallitott ideig
|
||||
Debug.Log("Long tapped");
|
||||
jump();
|
||||
@@ -84,7 +88,7 @@ public class PlayerController : MonoBehaviour
|
||||
goRight();
|
||||
}
|
||||
}
|
||||
}else if(activeControllType == ControllType.Button){
|
||||
}else if(activeControllType == ControlType.Button){
|
||||
//jumpforce = 100;
|
||||
/*leftButton.onClick.AddListener(goRight);
|
||||
jumpButton.onClick.AddListener(jump);
|
||||
@@ -119,9 +123,13 @@ public class PlayerController : MonoBehaviour
|
||||
}
|
||||
|
||||
public void jump(){
|
||||
if(rb.transform.position.y <= 0.16f)
|
||||
if(isGrounded.isGrounded){
|
||||
rb.AddForce(new Vector3(0, jumpforce, 0)); //ugras
|
||||
|
||||
isGrounded.isGrounded = false;
|
||||
}
|
||||
|
||||
Debug.Log("jumped");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -19,11 +19,13 @@ public class UsernameHandler : MonoBehaviour
|
||||
private StreamReader reader;
|
||||
private DatabaseData db;
|
||||
private PlayerList playerList;
|
||||
private CoinCounter cc;
|
||||
|
||||
private void Awake() {
|
||||
input.gameObject.SetActive(false);
|
||||
inputBackground.SetActive(false);
|
||||
path = Application.persistentDataPath + "/username.txt";
|
||||
cc = FindObjectOfType<CoinCounter>();
|
||||
db = FindObjectOfType<DatabaseData>();
|
||||
db.GetPlayerData();
|
||||
}
|
||||
@@ -54,6 +56,8 @@ public class UsernameHandler : MonoBehaviour
|
||||
userid = item.player_id;
|
||||
}
|
||||
}
|
||||
|
||||
db.GetCoinDataCall(userid);
|
||||
}
|
||||
|
||||
private void usernameCheck(){
|
||||
@@ -85,7 +89,11 @@ public class UsernameHandler : MonoBehaviour
|
||||
username = data;
|
||||
Debug.Log("username: " + username);
|
||||
|
||||
getId();
|
||||
getId();
|
||||
|
||||
//StartCoroutine(waitForCoins());
|
||||
|
||||
|
||||
|
||||
input.gameObject.SetActive(false);
|
||||
inputBackground.SetActive(false);
|
||||
@@ -93,4 +101,11 @@ public class UsernameHandler : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerator waitForCoins(){
|
||||
yield return new WaitUntil(() => db.coins != 0);
|
||||
|
||||
cc.SetCoin(db.GetCoins(userid));
|
||||
Debug.Log("uh coin"+cc.coin);
|
||||
}
|
||||
}
|
||||
@@ -34,6 +34,7 @@ public class jatekmanager : MonoBehaviour
|
||||
private UsernameHandler usernameHandler;
|
||||
private Score score;
|
||||
private Timer timer;
|
||||
private CoinCounter cc;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
@@ -44,6 +45,7 @@ public class jatekmanager : MonoBehaviour
|
||||
usernameHandler = FindObjectOfType<UsernameHandler>();
|
||||
score = FindObjectOfType<Score>();
|
||||
timer = FindObjectOfType<Timer>();
|
||||
cc = FindObjectOfType<CoinCounter>();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
@@ -156,6 +158,7 @@ public class jatekmanager : MonoBehaviour
|
||||
homeGomb.SetActive(false);
|
||||
settingsGomb.SetActive(false);
|
||||
shopGomb.SetActive(false);
|
||||
playButton.SetActive(false);
|
||||
UpdateGameState(GameState.Game);
|
||||
}
|
||||
|
||||
@@ -167,15 +170,18 @@ public class jatekmanager : MonoBehaviour
|
||||
|
||||
private async void HandleGame()
|
||||
{
|
||||
playButton.SetActive(false);
|
||||
StartCoroutine(TimerGame());
|
||||
|
||||
GetComponent <GroundController> ().enabled = true;
|
||||
GetComponent <PlayerController>().enabled = true;
|
||||
|
||||
goLeftButton.SetActive(true);
|
||||
jumpButton.SetActive(true);
|
||||
goRightButton.SetActive(true);
|
||||
scoreText.gameObject.SetActive(true);
|
||||
timerText.gameObject.SetActive(true);
|
||||
playButton.SetActive(false);
|
||||
|
||||
timer.playTime.Start();
|
||||
}
|
||||
|
||||
@@ -193,9 +199,11 @@ public class jatekmanager : MonoBehaviour
|
||||
//toltse fel az adatokat a run-rol
|
||||
db.PostNewScoreData(usernameHandler.userid, score.score, timer.convertTimeToString());
|
||||
|
||||
//coin feltoltes
|
||||
db.PostNewCoinData(cc.coin, usernameHandler.userid);
|
||||
|
||||
SceneUIManager.LoadScene(1); //HighScore scene
|
||||
|
||||
//
|
||||
|
||||
/*playButton.SetActive(false);
|
||||
homeGomb.SetActive(true);
|
||||
|
||||
@@ -11,6 +11,7 @@ TagManager:
|
||||
- Obstacle
|
||||
- Collectible
|
||||
- DeathCollider
|
||||
- SideObject
|
||||
layers:
|
||||
- Default
|
||||
- TransparentFX
|
||||
|
||||
9
README.md
Normal file
9
README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# PuzzleColorBall
|
||||
|
||||
Záródolgozat. Balogh Bence Benedekkel készítve.
|
||||
|
||||
A cél egy endless runner játék elkészítése Unityben C# használatával.
|
||||
|
||||
Backend repo link: https://github.com/bance23/zarobackend.git
|
||||
|
||||
Frontend link: https://github.com/bance23/zarofrontend.git
|
||||
@@ -6,17 +6,17 @@ EditorUserSettings:
|
||||
serializedVersion: 4
|
||||
m_ConfigSettings:
|
||||
RecentlyUsedSceneGuid-0:
|
||||
value: 5a5757560101590a5d0c0e24427b5d44434e4c7a7b7a23677f2b4565b7b5353a
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-1:
|
||||
value: 5401000201035c0f5d5e582648710644464f4f2f7a7d24607c2f1b36bab66468
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-2:
|
||||
RecentlyUsedSceneGuid-1:
|
||||
value: 5357075101505a0f5b5e0f7745740d4446161a7d79787035287f4a32b3e3303e
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-3:
|
||||
RecentlyUsedSceneGuid-2:
|
||||
value: 5b55515706060d025a5f0d2043260744414f482c7e2b7263747d4a32b0b9313b
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-3:
|
||||
value: 5a5757560101590a5d0c0e24427b5d44434e4c7a7b7a23677f2b4565b7b5353a
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-4:
|
||||
value: 51520d5f55010c0f085d5f7142770e424216487e7b2e2035752b4864b1e36d3d
|
||||
flags: 0
|
||||
|
||||
Reference in New Issue
Block a user