01Many changes

This commit is contained in:
Rabidus 2023-07-28 11:48:57 +03:00
parent c420b01f93
commit 473b402547
40 changed files with 17572 additions and 8670 deletions

View File

@ -0,0 +1,350 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &-6820942250325231075
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Recorded
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 5.016667
value: 3
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_PathPosition
path: cm
classID: 114
script: {fileID: 11500000, guid: 418e42c7d0405cc48a7b83f63ea53bb3, type: 3}
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 1007302526
attribute: 2871404689
script: {fileID: 11500000, guid: 418e42c7d0405cc48a7b83f63ea53bb3, type: 3}
typeID: 114
customType: 0
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 5.016667
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 0
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 5.016667
value: 3
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_PathPosition
path: cm
classID: 114
script: {fileID: 11500000, guid: 418e42c7d0405cc48a7b83f63ea53bb3, type: 3}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []
--- !u!114 &-4726290731646128747
MonoBehaviour:
m_ObjectHideFlags: 1
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: 15c38f6fa1940124db1ab7f6fe7268d1, type: 3}
m_Name: Signal Emitter
m_EditorClassIdentifier:
m_Time: 0.23333333333333334
m_Retroactive: 0
m_EmitOnce: 0
m_Asset: {fileID: 11400000, guid: b9b7ecdc9900a0f408e9f9e1ef15a777, type: 2}
--- !u!114 &-3822608875321680757
MonoBehaviour:
m_ObjectHideFlags: 1
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: d21dcc2386d650c4597f3633c75a1f98, type: 3}
m_Name: Animation Track (1)
m_EditorClassIdentifier:
m_Version: 3
m_AnimClip: {fileID: 0}
m_Locked: 0
m_Muted: 0
m_CustomPlayableFullTypename:
m_Curves: {fileID: 0}
m_Parent: {fileID: 11400000}
m_Children: []
m_Clips: []
m_Markers:
m_Objects: []
m_InfiniteClipPreExtrapolation: 1
m_InfiniteClipPostExtrapolation: 1
m_InfiniteClipOffsetPosition: {x: 0, y: 0, z: 0}
m_InfiniteClipOffsetEulerAngles: {x: 0, y: 0, z: 0}
m_InfiniteClipTimeOffset: 0
m_InfiniteClipRemoveOffset: 0
m_InfiniteClipApplyFootIK: 1
mInfiniteClipLoop: 0
m_MatchTargetFields: 63
m_Position: {x: 0, y: 0, z: 0}
m_EulerAngles: {x: 0, y: 0, z: 0}
m_AvatarMask: {fileID: 0}
m_ApplyAvatarMask: 1
m_TrackOffset: 0
m_InfiniteClip: {fileID: -1052092550266895353}
m_OpenClipOffsetRotation: {x: 0, y: 0, z: 0, w: 1}
m_Rotation: {x: 0, y: 0, z: 0, w: 1}
m_ApplyOffsets: 0
--- !u!74 &-1052092550266895353
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Recorded (1)
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1.0166667
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Color.a
path:
classID: 114
script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 0
attribute: 304273561
script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
typeID: 114
customType: 0
isPPtrCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 1.0166667
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 0
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1.0166667
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Color.a
path:
classID: 114
script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: bfda56da833e2384a9677cd3c976a436, type: 3}
m_Name: TimeLine
m_EditorClassIdentifier:
m_Version: 0
m_Tracks:
- {fileID: 3139024901344664434}
- {fileID: -3822608875321680757}
m_FixedDuration: 0
m_EditorSettings:
m_Framerate: 60
m_ScenePreview: 1
m_DurationMode: 0
m_MarkerTrack: {fileID: 0}
--- !u!114 &3139024901344664434
MonoBehaviour:
m_ObjectHideFlags: 1
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: d21dcc2386d650c4597f3633c75a1f98, type: 3}
m_Name: Animation Track
m_EditorClassIdentifier:
m_Version: 3
m_AnimClip: {fileID: 0}
m_Locked: 0
m_Muted: 0
m_CustomPlayableFullTypename:
m_Curves: {fileID: 0}
m_Parent: {fileID: 11400000}
m_Children: []
m_Clips: []
m_Markers:
m_Objects: []
m_InfiniteClipPreExtrapolation: 1
m_InfiniteClipPostExtrapolation: 1
m_InfiniteClipOffsetPosition: {x: 0, y: 0, z: 0}
m_InfiniteClipOffsetEulerAngles: {x: 0, y: 0, z: 0}
m_InfiniteClipTimeOffset: 0
m_InfiniteClipRemoveOffset: 0
m_InfiniteClipApplyFootIK: 1
mInfiniteClipLoop: 0
m_MatchTargetFields: 63
m_Position: {x: 0, y: 0, z: 0}
m_EulerAngles: {x: 0, y: 0, z: 0}
m_AvatarMask: {fileID: 0}
m_ApplyAvatarMask: 1
m_TrackOffset: 0
m_InfiniteClip: {fileID: -6820942250325231075}
m_OpenClipOffsetRotation: {x: 0, y: 0, z: 0, w: 1}
m_Rotation: {x: 0, y: 0, z: 0, w: 1}
m_ApplyOffsets: 0

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3ba55970cce434640b5f07ee75509081
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -2,14 +2,15 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: gloves_half
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _NORMALMAP _PARALLAXMAP
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
@ -55,6 +56,7 @@ Material:
m_Texture: {fileID: 2800000, guid: cec6f0f909b2a01448f96ba89a7b4ae2, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
@ -75,3 +77,4 @@ Material:
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []

View File

@ -0,0 +1,39 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!84 &8400000
RenderTexture:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: CamTexture
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
m_IsAlphaChannelOptional: 0
serializedVersion: 5
m_Width: 1920
m_Height: 1080
m_AntiAliasing: 1
m_MipCount: -1
m_DepthStencilFormat: 94
m_ColorFormat: 8
m_MipMap: 0
m_GenerateMips: 1
m_SRGB: 0
m_UseDynamicScale: 0
m_BindMS: 0
m_EnableCompatibleFormat: 1
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 0
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1
m_ShadowSamplingMode: 2

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f87ca08caa63ba04fbae7b39db55fb79
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 8400000
userData:
assetBundleName:
assetBundleVariant:

16
Assets/CheckPoint.cs Normal file
View File

@ -0,0 +1,16 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Playables;
public class CheckPoint : MonoBehaviour
{
public UnityEvent OnCheckpointPass;
[ContextMenu("Debug Checkpoint")]
public void CheckPointPass()
{
OnCheckpointPass?.Invoke();
}
}

11
Assets/CheckPoint.cs.meta Normal file
View File

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

View File

@ -0,0 +1,38 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Playables;
public class CutsceneController : MonoBehaviour
{
private ShipMoveSides _shipMoveSides;
private PreviewModule _previewModule;
[Header("Cutscene Settings")]
[SerializeField]
public PlayableDirector _cutscene;
[SerializeField]
private float _cutsceneAfterDelay = 1.4f;
private void Awake()
{
_shipMoveSides = FindObjectOfType<ShipMoveSides>();
_previewModule = FindObjectOfType<PreviewModule>();
}
public void ShowCutscene()
{
StartCoroutine(CutsceneCoroutine());
}
private IEnumerator CutsceneCoroutine()
{
_shipMoveSides.ToggleInput(false);
_previewModule.TogglePanel(true);
_cutscene.Play();
yield return new WaitForSeconds((float)_cutscene.duration + _cutsceneAfterDelay);
_shipMoveSides.ToggleInput(true);
_previewModule.TogglePanel(false);
}
}

View File

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

30
Assets/EnergyText.cs Normal file
View File

@ -0,0 +1,30 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EnergyText : MonoBehaviour
{
private EnergyController _energyController;
private TMPro.TextMeshProUGUI _text;
private void Awake()
{
_energyController = FindObjectOfType<EnergyController>();
_text = GetComponent<TMPro.TextMeshProUGUI>();
}
private void OnEnable()
{
_energyController.OnEnergyChange += UpdateText;
}
private void OnDisable()
{
_energyController.OnEnergyChange -= UpdateText;
}
private void UpdateText(float energy)
{
_text.SetText(energy.ToString());
}
}

11
Assets/EnergyText.cs.meta Normal file
View File

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

View File

@ -15,14 +15,16 @@ MonoBehaviour:
version: 5
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Shield_Blue
m_Shader: {fileID: -6465566751694194690, guid: 2042cc78722596b498292332b772eb66, type: 3}
m_ShaderKeywords:
m_Shader: {fileID: -6465566751694194690, guid: 2042cc78722596b498292332b772eb66,
type: 3}
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
@ -33,7 +35,7 @@ Material:
serializedVersion: 3
m_TexEnvs:
- MainTex_:
m_Texture: {fileID: 2800000, guid: 40ac06a85bf13c94a84cf01fe62ce493, type: 3}
m_Texture: {fileID: 2800000, guid: fb5730e24283d0c489e5c7d0bee023d9, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- Texture2D_3e7e8515ac094eb7a8e8ddeb9af4576c:
@ -54,11 +56,11 @@ Material:
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- ColorBreathing_: 0.66
- ColorBreathing_: 1
- FresnelPower_: 4
- SphereHardness_: 0.21
- SphereHardness_: 0
- SphereMask_: 0
- SphereRadius_: 0.32
- SphereRadius_: 0.1
- Vector1_5b7f725f9c624db9bcbfaa4d7a5ad6af: 10
- Vector1_623017abf9cd44e6b0ec5df12afc60be: 0.48
- Vector1_774715637d544e0c9f3f50368badd1f8: 1
@ -68,14 +70,16 @@ Material:
- _QueueControl: 0
- _QueueOffset: 0
m_Colors:
- BackColor_: {r: 0.058250275, g: 0.18095653, b: 0.7264151, a: 1}
- Color_3ebb7b9585f5437bb735fd8c57eb02b6: {r: 0.06145063, g: 0.23897468, b: 0.495019, a: 1}
- Color_6e7a62ebab2e450081e0f60ce3e576e9: {r: 0.80698234, g: 3.1606808, b: 6.4222345, a: 1}
- BackColor_: {r: 0.008009966, g: 0.06848054, b: 0.33962262, a: 1}
- Color_3ebb7b9585f5437bb735fd8c57eb02b6: {r: 0.06145063, g: 0.23897468, b: 0.495019,
a: 1}
- Color_6e7a62ebab2e450081e0f60ce3e576e9: {r: 0.80698234, g: 3.1606808, b: 6.4222345,
a: 1}
- Color_72ba699fb399443a93d030fece79cc27: {r: 16.062746, g: 0, b: 766.9961, a: 1}
- FresnelColor_: {r: 271.17407, g: 75.522934, b: 29.814945, a: 1}
- FrontColor_: {r: 1.1587243, g: 3.5534213, b: 14.290933, a: 1}
- FresnelColor_: {r: 29.814945, g: 178.16696, b: 271.17407, a: 1}
- FrontColor_: {r: 0, g: 1.1848832, b: 6.4798346, a: 1}
- SphereCenter_: {r: 0, g: 0, b: 0, a: 0}
- Vector3_eea253efaca94a80a0ae58b284238f33: {r: 0.05, g: 0.05, b: 0.05, a: 0}
- VertexAmount_: {r: 0.2, g: 0.2, b: 0.2, a: 0}
- VertexBreathing_: {r: -0.66, g: 1, b: 0, a: 0}
- VertexAmount_: {r: 0, g: 0, b: 0, a: 0}
- VertexBreathing_: {r: 1, g: 1, b: 0, a: 0}
m_BuildTextureStacks: []

View File

@ -56,7 +56,7 @@ Material:
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- ColorBreathing_: 0.668
- ColorBreathing_: 0.763
- FresnelPower_: 50
- SphereHardness_: 0.21
- SphereMask_: 0
@ -70,14 +70,14 @@ Material:
- _QueueControl: 0
- _QueueOffset: 0
m_Colors:
- BackColor_: {r: 0.058250275, g: 0.18095653, b: 0.7264151, a: 1}
- BackColor_: {r: 0.7254902, g: 0.34980252, b: 0.058823537, a: 1}
- Color_3ebb7b9585f5437bb735fd8c57eb02b6: {r: 0.06145063, g: 0.23897468, b: 0.495019,
a: 1}
- Color_6e7a62ebab2e450081e0f60ce3e576e9: {r: 0.80698234, g: 3.1606808, b: 6.4222345,
a: 1}
- Color_72ba699fb399443a93d030fece79cc27: {r: 16.062746, g: 0, b: 766.9961, a: 1}
- FresnelColor_: {r: 130.34921, g: 29.814945, b: 271.17407, a: 1}
- FrontColor_: {r: 1.1587243, g: 3.5534213, b: 14.290933, a: 1}
- FresnelColor_: {r: 271.17407, g: 46.67883, b: 29.814945, a: 1}
- FrontColor_: {r: 14.29093, g: 6.603818, b: 1.1971457, a: 1}
- SphereCenter_: {r: 0, g: 0, b: 0, a: 0}
- Vector3_eea253efaca94a80a0ae58b284238f33: {r: 0.05, g: 0.05, b: 0.05, a: 0}
- VertexAmount_: {r: 0.5, g: 0.5, b: 0.5, a: 0}

View File

@ -0,0 +1,34 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MonumentController : MonoBehaviour
{
[SerializeField]
private float _energyToUnlock;
[SerializeField]
private float _unlockTime = 1;
[SerializeField]
private LeanTweenType _ease;
private EnergyController _energyController;
private float _currentEnergy;
private void Awake()
{
_energyController = FindObjectOfType<EnergyController>();
_currentEnergy = _energyToUnlock;
}
public void UnlockMonument()
{
var totalEnergy = _energyController.Energy;
LeanTween.value(totalEnergy, 0, _unlockTime).setEase(_ease).setOnUpdate((float x)=>
{
_energyController.Energy = x;
_currentEnergy = Mathf.Clamp(_energyToUnlock - (totalEnergy - x), 0, int.MaxValue);
Debug.Log($"Clamped energy value: {_currentEnergy / _energyToUnlock}");
});
}
}

View File

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

View File

@ -15,7 +15,7 @@ GameObject:
- component: {fileID: 5801705962282800395}
- component: {fileID: 3598344221402252609}
m_Layer: 12
m_Name: Coin
m_Name: EnergyItem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -184,6 +184,11 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -7511558181221131132, guid: dbb62d1ec0be2a04899a933981a59b48,
type: 3}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: 2100000, guid: c56f0bee3ee184d46a43f7dfe8ddd51e, type: 2}
- target: {fileID: 919132149155446097, guid: dbb62d1ec0be2a04899a933981a59b48,
type: 3}
propertyPath: m_Name

View File

@ -1,5 +1,247 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1439389038
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1439389039}
- component: {fileID: 1439389041}
- component: {fileID: 1439389040}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1439389039
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1439389038}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0.035615444}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1319590887960717848}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0.041137695, y: -0.005554199}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1439389041
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1439389038}
m_CullTransparentMesh: 1
--- !u!114 &1439389040
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1439389038}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &1670522527
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1670522528}
- component: {fileID: 1670522530}
- component: {fileID: 1670522529}
m_Layer: 5
m_Name: RawImage
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1670522528
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1670522527}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0.035615444}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1319590887960717848}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0.041137695, y: -0.005554199}
m_SizeDelta: {x: -77.4, y: -43.6}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1670522530
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1670522527}
m_CullTransparentMesh: 1
--- !u!114 &1670522529
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1670522527}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Texture: {fileID: 8400000, guid: f87ca08caa63ba04fbae7b39db55fb79, type: 2}
m_UVRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
--- !u!1 &1319590887960717849
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1319590887960717848}
- component: {fileID: 1319590887960717858}
- component: {fileID: 1319590887960717862}
- component: {fileID: 2406462465895963678}
m_Layer: 5
m_Name: PreviewPanel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1319590887960717848
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1319590887960717849}
m_LocalRotation: {x: 0.06789549, y: 0.40507007, z: 0.031185206, w: -0.91122764}
m_LocalPosition: {x: 0, y: 0, z: 1.663}
m_LocalScale: {x: 0.00045788175, y: 0.00045788175, z: 0.00045788175}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1439389039}
- {fileID: 1670522528}
m_Father: {fileID: 7985013476015715686}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: -52.939, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: -0.661, y: 1.11}
m_SizeDelta: {x: 1920, y: 1080}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!223 &1319590887960717858
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1319590887960717849}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 2
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 25
m_SortingLayerID: 0
m_SortingOrder: 1
m_TargetDisplay: 0
--- !u!222 &1319590887960717862
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1319590887960717849}
m_CullTransparentMesh: 0
--- !u!114 &2406462465895963678
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1319590887960717849}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 2
m_PresetInfoIsWorld: 1
--- !u!1 &1365031489492970875
GameObject:
m_ObjectHideFlags: 0
@ -10430,6 +10672,7 @@ MonoBehaviour:
_value: 0
_speed: 40
_rollAngle: 25
_isEnable: 1
--- !u!1 &7985013475257117732
GameObject:
m_ObjectHideFlags: 0
@ -10820,7 +11063,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!4 &7985013475720511625
Transform:
m_ObjectHideFlags: 0
@ -11583,6 +11826,8 @@ Transform:
- {fileID: 3917174828974650836}
- {fileID: 2379869280185189697}
- {fileID: 7985013475720511625}
- {fileID: 3463281361434675032}
- {fileID: 1319590887960717848}
m_Father: {fileID: 7985013475254128920}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -12025,6 +12270,7 @@ GameObject:
- component: {fileID: 7985013476349946335}
- component: {fileID: 7985013476349946333}
- component: {fileID: 7985013476349946330}
- component: {fileID: 1776897261}
m_Layer: 0
m_Name: Player
m_TagString: Untagged
@ -12080,16 +12326,16 @@ MonoBehaviour:
useClippedPercent: 0
keys: []
_clipFromSample:
position: {x: -606.65485, y: 288.06433, z: -464.5491}
up: {x: 0.072695054, y: 0.99126023, z: 0.1100838}
forward: {x: -0.6239391, y: -0.03606533, z: 0.7806404}
position: {x: 104.326294, y: -5.5460205, z: -1932.3633}
up: {x: 0, y: 1, z: 0}
forward: {x: -0.001450564, y: 0.002455365, z: 0.99999595}
color: {r: 1, g: 1, b: 1, a: 1}
size: 1
percent: 0
_clipToSample:
position: {x: -606.65485, y: 288.06433, z: -464.5491}
up: {x: 0.072694965, y: 0.99126023, z: 0.11008376}
forward: {x: -0.6239391, y: -0.03606533, z: 0.7806404}
position: {x: -74.14575, y: 526.9452, z: 1171.6927}
up: {x: 0, y: 1, z: 0}
forward: {x: -0.07148356, y: 0.08994536, z: 0.99337804}
color: {r: 1, g: 1, b: 1, a: 1}
size: 1
percent: 1
@ -12102,7 +12348,7 @@ MonoBehaviour:
buildOnAwake: 0
buildOnEnable: 0
applyDirectionRotation: 1
useTriggers: 0
useTriggers: 1
triggerGroup: 0
_direction: 1
_dontLerpDirection: 0
@ -12134,16 +12380,16 @@ MonoBehaviour:
targetRigidbody2D: {fileID: 0}
targetTransform: {fileID: 7985013476349946332}
_result:
position: {x: -606.65485, y: 288.06433, z: -464.5491}
up: {x: 0.072695054, y: 0.99126023, z: 0.1100838}
forward: {x: -0.6239391, y: -0.03606533, z: 0.7806404}
position: {x: 104.326294, y: -5.5460205, z: -1932.3633}
up: {x: 0, y: 1, z: 0}
forward: {x: -0.001450564, y: 0.002455365, z: 0.99999595}
color: {r: 1, g: 1, b: 1, a: 1}
size: 1
percent: 0
_finalResult:
position: {x: -606.65485, y: 288.06433, z: -464.5491}
up: {x: 0.072695054, y: 0.99126023, z: 0.1100838}
forward: {x: -0.6239391, y: -0.03606533, z: 0.7806404}
position: {x: 104.326294, y: -5.5460205, z: -1932.3633}
up: {x: 0, y: 1, z: 0}
forward: {x: -0.001450564, y: 0.002455365, z: 0.99999595}
color: {r: 1, g: 1, b: 1, a: 1}
size: 1
percent: 0
@ -12153,7 +12399,7 @@ MonoBehaviour:
_follow: 1
_startPosition: 0
preserveUniformSpeedWithOffset: 1
_followSpeed: 11.929097
_followSpeed: 0
_followDuration: 1
_speedModifier:
blend: 1
@ -12172,7 +12418,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7985013476349946145}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6953b8e14a3f3c440989f27f67aaf8fd, type: 3}
m_Name:
@ -12250,6 +12496,19 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8e304112f5eef844d8ac0940245ea193, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &1776897261
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7985013476349946145}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1fbd8fa8d84ca5a45ab58b35d8693c46, type: 3}
m_Name:
m_EditorClassIdentifier:
_previewPanel: {fileID: 1319590887960717849}
--- !u!1 &7985013476361284345
GameObject:
m_ObjectHideFlags: 0
@ -13112,6 +13371,16 @@ PrefabInstance:
propertyPath: m_LocalRotation.z
value: 0.12731433
objectReference: {fileID: 0}
- target: {fileID: 881022847667941508, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalPosition.x
value: -0.030877931
objectReference: {fileID: 0}
- target: {fileID: 881022847667941508, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.04147109
objectReference: {fileID: 0}
- target: {fileID: 881022847667941508, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalRotation.w
@ -13152,6 +13421,16 @@ PrefabInstance:
propertyPath: m_LocalRotation.z
value: 5.1618946e-15
objectReference: {fileID: 0}
- target: {fileID: 881022847667941512, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.00000023005764
objectReference: {fileID: 0}
- target: {fileID: 881022847667941512, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalPosition.z
value: 0.00000026507698
objectReference: {fileID: 0}
- target: {fileID: 881022847667941512, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalRotation.w
@ -13382,6 +13661,41 @@ PrefabInstance:
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 881022847667941548, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalPosition.x
value: -0.07351066
objectReference: {fileID: 0}
- target: {fileID: 881022847667941548, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.013962139
objectReference: {fileID: 0}
- target: {fileID: 881022847667941548, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalPosition.z
value: -0.023953618
objectReference: {fileID: 0}
- target: {fileID: 881022847667941548, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalRotation.w
value: -0.15543854
objectReference: {fileID: 0}
- target: {fileID: 881022847667941548, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalRotation.x
value: 0.57018894
objectReference: {fileID: 0}
- target: {fileID: 881022847667941548, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalRotation.y
value: 0.016357053
objectReference: {fileID: 0}
- target: {fileID: 881022847667941548, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalRotation.z
value: 0.8065085
objectReference: {fileID: 0}
- target: {fileID: 881022847667941552, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalRotation.w
@ -13477,6 +13791,11 @@ PrefabInstance:
propertyPath: m_LocalRotation.z
value: -6.958466e-38
objectReference: {fileID: 0}
- target: {fileID: 881022847667941562, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalPosition.y
value: -0.00000017799228
objectReference: {fileID: 0}
- target: {fileID: 881022847667941562, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalRotation.w
@ -13830,6 +14149,16 @@ PrefabInstance:
propertyPath: m_LocalRotation.z
value: 0.12731433
objectReference: {fileID: 0}
- target: {fileID: 881022847667941508, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalPosition.x
value: -0.030877931
objectReference: {fileID: 0}
- target: {fileID: 881022847667941508, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.04147109
objectReference: {fileID: 0}
- target: {fileID: 881022847667941508, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalRotation.w
@ -13865,6 +14194,16 @@ PrefabInstance:
propertyPath: m_LocalRotation.z
value: 5.1618946e-15
objectReference: {fileID: 0}
- target: {fileID: 881022847667941512, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.00000023005764
objectReference: {fileID: 0}
- target: {fileID: 881022847667941512, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalPosition.z
value: 0.00000026507698
objectReference: {fileID: 0}
- target: {fileID: 881022847667941512, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalRotation.w
@ -14090,6 +14429,41 @@ PrefabInstance:
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 881022847667941548, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalPosition.x
value: -0.07351066
objectReference: {fileID: 0}
- target: {fileID: 881022847667941548, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.013962139
objectReference: {fileID: 0}
- target: {fileID: 881022847667941548, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalPosition.z
value: -0.023953618
objectReference: {fileID: 0}
- target: {fileID: 881022847667941548, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalRotation.w
value: -0.15543854
objectReference: {fileID: 0}
- target: {fileID: 881022847667941548, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalRotation.x
value: 0.57018894
objectReference: {fileID: 0}
- target: {fileID: 881022847667941548, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalRotation.y
value: 0.016357053
objectReference: {fileID: 0}
- target: {fileID: 881022847667941548, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalRotation.z
value: 0.8065085
objectReference: {fileID: 0}
- target: {fileID: 881022847667941552, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalRotation.w
@ -14185,6 +14559,11 @@ PrefabInstance:
propertyPath: m_LocalRotation.z
value: -6.958466e-38
objectReference: {fileID: 0}
- target: {fileID: 881022847667941562, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalPosition.y
value: -0.00000017799228
objectReference: {fileID: 0}
- target: {fileID: 881022847667941562, guid: 9bf6018d1335b0e47a3c20da159f235d,
type: 3}
propertyPath: m_LocalRotation.w
@ -14640,22 +15019,22 @@ PrefabInstance:
- target: {fileID: 4199356647246366888, guid: 79d6eb9496d140a4c953d23ac9677d1c,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0.0000020284206
value: -0.009504974
objectReference: {fileID: 0}
- target: {fileID: 7965783791829060510, guid: 79d6eb9496d140a4c953d23ac9677d1c,
type: 3}
propertyPath: m_AnchorMax.x
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7965783791829060510, guid: 79d6eb9496d140a4c953d23ac9677d1c,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7965783791829060510, guid: 79d6eb9496d140a4c953d23ac9677d1c,
type: 3}
propertyPath: m_AnchorMin.x
value: 0
value: 0.000058352947
objectReference: {fileID: 0}
- target: {fileID: 8785980203958729632, guid: 79d6eb9496d140a4c953d23ac9677d1c,
type: 3}
@ -14776,6 +15155,156 @@ GameObject:
type: 3}
m_PrefabInstance: {fileID: 7985013476047517472}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &7985013476078318034
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 7985013476015715686}
m_Modifications:
- target: {fileID: 2001639865935457382, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
propertyPath: m_IsTrigger
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6827592822984139054, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
propertyPath: SnapDegrees
value: 90
objectReference: {fileID: 0}
- target: {fileID: 6827592822984139054, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
propertyPath: onHingeSnapChange.m_PersistentCalls.m_Calls.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6827592822984139054, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
propertyPath: onHingeSnapChange.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6827592822984139054, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
propertyPath: onHingeSnapChange.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 0}
- target: {fileID: 6827592822984139054, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
propertyPath: onHingeSnapChange.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
value: 2
objectReference: {fileID: 0}
- target: {fileID: 6827592822984139054, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
propertyPath: onHingeSnapChange.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: OnStartGame
objectReference: {fileID: 0}
- target: {fileID: 6827592822984139054, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
propertyPath: onHingeSnapChange.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
value: GameManager, Assembly-CSharp
objectReference: {fileID: 0}
- target: {fileID: 6827592822984139054, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
propertyPath: onHingeSnapChange.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 6827592822984139056, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
propertyPath: m_IsTrigger
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6827592823468029577, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
propertyPath: m_Enabled
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6827592823468029578, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
propertyPath: m_RootOrder
value: 4
objectReference: {fileID: 0}
- target: {fileID: 6827592823468029578, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
propertyPath: m_LocalScale.x
value: 0.54918
objectReference: {fileID: 0}
- target: {fileID: 6827592823468029578, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
propertyPath: m_LocalScale.y
value: 0.54918
objectReference: {fileID: 0}
- target: {fileID: 6827592823468029578, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
propertyPath: m_LocalScale.z
value: 0.54918
objectReference: {fileID: 0}
- target: {fileID: 6827592823468029578, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6827592823468029578, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.5269
objectReference: {fileID: 0}
- target: {fileID: 6827592823468029578, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
propertyPath: m_LocalPosition.z
value: 1.3342
objectReference: {fileID: 0}
- target: {fileID: 6827592823468029578, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.86602557
objectReference: {fileID: 0}
- target: {fileID: 6827592823468029578, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
propertyPath: m_LocalRotation.x
value: -0.49999976
objectReference: {fileID: 0}
- target: {fileID: 6827592823468029578, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 6827592823468029578, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
propertyPath: m_LocalRotation.z
value: -0.000000013038516
objectReference: {fileID: 0}
- target: {fileID: 6827592823468029578, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: -60
objectReference: {fileID: 0}
- target: {fileID: 6827592823468029578, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6827592823468029578, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6827592823468029579, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
propertyPath: m_Name
value: Knob
objectReference: {fileID: 0}
- target: {fileID: 6827592823468029582, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
propertyPath: m_IsTrigger
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: b6d8d2fe17aa0e845b409cde025ad27d, type: 3}
--- !u!4 &3463281361434675032 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 6827592823468029578, guid: b6d8d2fe17aa0e845b409cde025ad27d,
type: 3}
m_PrefabInstance: {fileID: 7985013476078318034}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &7985013476232888891
PrefabInstance:
m_ObjectHideFlags: 0
@ -14953,10 +15482,15 @@ PrefabInstance:
propertyPath: m_HDR
value: 1
objectReference: {fileID: 0}
- target: {fileID: 966261301284021888, guid: dc03a465cabc90746a8ab420688757d1,
type: 3}
propertyPath: field of view
value: 60
objectReference: {fileID: 0}
- target: {fileID: 966261301284021888, guid: dc03a465cabc90746a8ab420688757d1,
type: 3}
propertyPath: far clip plane
value: 2000
value: 5000
objectReference: {fileID: 0}
- target: {fileID: 2695909064958027348, guid: dc03a465cabc90746a8ab420688757d1,
type: 3}
@ -15118,7 +15652,7 @@ MonoBehaviour:
m_Bits: 1
m_VolumeTrigger: {fileID: 0}
m_VolumeFrameworkUpdateModeOption: 2
m_RenderPostProcessing: 0
m_RenderPostProcessing: 1
m_Antialiasing: 0
m_AntialiasingQuality: 2
m_StopNaN: 0

File diff suppressed because it is too large Load Diff

40
Assets/PreviewModule.cs Normal file
View File

@ -0,0 +1,40 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PreviewModule : MonoBehaviour
{
[SerializeField]
private GameObject _previewPanel;
private bool _isShow = false;
private void Start()
{
TogglePanel(false);
}
public void TogglePanel(bool value)
{
_isShow = value;
if (_isShow)
{
ShowPanel();
}
else
{
HidePanel();
}
}
private void ShowPanel()
{
_previewPanel.SetActive(true);
}
private void HidePanel()
{
_previewPanel.SetActive(false);
}
}

View File

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

View File

@ -9,15 +9,18 @@ Material:
m_PrefabAsset: {fileID: 0}
m_Name: SCSM_Track_Blue
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ValidKeywords: []
m_ValidKeywords:
- _SURFACE_TYPE_TRANSPARENT
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Opaque
disabledShaderPasses: []
RenderType: Transparent
disabledShaderPasses:
- DepthOnly
- SHADOWCASTER
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
@ -88,7 +91,7 @@ Material:
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlend: 10
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0.5
@ -102,14 +105,14 @@ Material:
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Surface: 0
- _SrcBlend: 5
- _Surface: 1
- _UVSec: 0
- _WorkflowMode: 1
- _ZWrite: 1
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 0.09839965, g: 0.19815654, b: 0.25735292, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _BaseColor: {r: 0.09839962, g: 0.1981565, b: 0.2573529, a: 0.39607844}
- _Color: {r: 0.09839959, g: 0.19815648, b: 0.25735286, a: 0.39607844}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@ -34,6 +34,7 @@ Material:
RenderType: Transparent
disabledShaderPasses:
- DepthOnly
- SHADOWCASTER
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
@ -125,7 +126,7 @@ Material:
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 1, g: 0.8093306, b: 0.3088235, a: 0.403}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 0.8093306, b: 0.30882347, a: 0.403}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@ -109,7 +109,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.17647055, g: 0.17647055, b: 0.17647055, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 0.17647052, g: 0.17647052, b: 0.17647052, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@ -59,7 +59,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Texture: {fileID: 2800000, guid: 4af098033bd35384aa46a904a77b787a, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:

File diff suppressed because one or more lines are too long

View File

@ -1,19 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Coin : MonoBehaviour, ICollectable
{
private CoinCounter _coinCounter;
private void Awake()
{
_coinCounter = FindObjectOfType<CoinCounter>();
}
public void Collect()
{
_coinCounter.CollectCoin();
Destroy(gameObject);
}
}

View File

@ -1,19 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
public class CoinCounter : MonoBehaviour
{
[SerializeField]
private int _coinCount;
public event UnityAction<int> OnValueChanged;
public int CoinCount => _coinCount;
public void CollectCoin()
{
_coinCount++;
OnValueChanged?.Invoke(_coinCount);
}
}

View File

@ -0,0 +1,22 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
public class EnergyController : MonoBehaviour
{
[SerializeField]
private float _energy;
public event UnityAction<float> OnEnergyChange;
public float Energy
{
get => _energy;
set
{
_energy = value;
OnEnergyChange?.Invoke(_energy);
}
}
}

View File

@ -0,0 +1,22 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EnergyItem : MonoBehaviour, ICollectable
{
[SerializeField]
private float _energy = 1;
private EnergyController _energyController;
private void Awake()
{
_energyController = FindObjectOfType<EnergyController>();
}
public void Collect()
{
_energyController.Energy += _energy;
Destroy(gameObject);
}
}

View File

@ -18,10 +18,7 @@ public class GameManager : MonoBehaviour
public static GameManager Instance { get; private set; }
private PlayerSetup _playerSetup;
private CoinCounter _coinCounter;
[SerializeField]
private Button _startButton;
private EnergyController _energyController;
[SerializeField]
private TMPro.TMP_InputField _inputField;
@ -50,14 +47,14 @@ public class GameManager : MonoBehaviour
private void InitReferences()
{
_playerSetup = FindObjectOfType<PlayerSetup>();
_coinCounter = FindObjectOfType<CoinCounter>();
_energyController = FindObjectOfType<EnergyController>();
}
private void Start()
{
_inputField.text = $"Player_{Random.Range(0, 1000)}";
}
public void ChangeState(GameState newState)
{
CurrentGameState = newState;
@ -79,7 +76,7 @@ public class GameManager : MonoBehaviour
break;
case GameState.Ended:
{
_playerSetup.AddScore(_coinCounter.CoinCount);
_playerSetup.AddScore(_energyController.Energy);
OnGameEnded?.Invoke();
ChangeState(GameState.None);
}
@ -87,6 +84,7 @@ public class GameManager : MonoBehaviour
}
}
[ContextMenu("Debug Start")]
public void OnStartGame()
{
ChangeState(GameState.Started);

View File

@ -6,7 +6,7 @@ using UnityEngine;
public class Player
{
public string Name;
public int Score;
public float Score;
public Player(string name)
{

View File

@ -14,7 +14,7 @@ public class PlayerSetup : MonoBehaviour
_playerInfo.Players.Add(_currentPlayer);
}
public void AddScore(int ammount)
public void AddScore(float ammount)
{
_currentPlayer.Score = ammount;
}

View File

@ -13,19 +13,38 @@ public class ShipMoveSides : MonoBehaviour
private float _speed;
[SerializeField]
private float _rollAngle = 45;
[SerializeField]
private bool _isEnable = true;
public float Radius => _radius;
private void Update()
{
if (!_isEnable)
ResetInput();
ApplyMovement();
}
public void ToggleInput(bool value)
{
_isEnable = value;
}
private void ResetInput()
{
_value = Mathf.Lerp(_value, 0, Time.deltaTime);
}
public void UpdateInput(float val)
{
if (!_isEnable)
return;
_value = -val;
}
private void ApplyMovement()
{
var newPos = transform.localPosition + _value * Vector3.right;

View File

@ -6,6 +6,8 @@ public class TimeBonus : MonoBehaviour, ICollectable
{
[SerializeField]
private int _timeBonus;
[SerializeField]
private bool _selfDestroy = true;
private vTimerCounter _timerCounter;
@ -17,6 +19,7 @@ public class TimeBonus : MonoBehaviour, ICollectable
public void Collect()
{
_timerCounter.AddTime(_timeBonus);
Destroy(gameObject);
if (_selfDestroy)
Destroy(gameObject);
}
}

View File

@ -1,5 +1,6 @@
{
"dependencies": {
"com.unity.cinemachine": "2.8.9",
"com.unity.collab-proxy": "1.17.2",
"com.unity.ext.nunit": "1.0.0",
"com.unity.feature.development": "1.0.1",

View File

@ -9,6 +9,15 @@
},
"url": "https://packages.unity.com"
},
"com.unity.cinemachine": {
"version": "2.8.9",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.test-framework": "1.1.31"
},
"url": "https://packages.unity.com"
},
"com.unity.collab-proxy": {
"version": "1.17.2",
"depth": 0,

View File

@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &1
MonoBehaviour:
m_ObjectHideFlags: 61
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: a287be6c49135cd4f9b2b8666c39d999, type: 3}
m_Name:
m_EditorClassIdentifier:
assetDefaultFramerate: 60
m_DefaultFrameRate: 60