@ -1,5 +1,5 @@ | |||
fileFormatVersion: 2 | |||
guid: 85233f4a34a589945870b124282bf234 | |||
guid: fbb382cd1cd301046ad6790c048b0c6c | |||
folderAsset: yes | |||
DefaultImporter: | |||
externalObjects: {} |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: 9132b80b553bb3f40b9a29cc65955c79 | |||
folderAsset: yes | |||
DefaultImporter: | |||
externalObjects: {} | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
@ -0,0 +1,41 @@ | |||
%YAML 1.1 | |||
%TAG !u! tag:unity3d.com,2011: | |||
--- !u!21 &2100000 | |||
Material: | |||
serializedVersion: 6 | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_Name: monster_0 | |||
m_Shader: {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} | |||
m_ShaderKeywords: | |||
m_LightmapFlags: 4 | |||
m_EnableInstancingVariants: 0 | |||
m_DoubleSidedGI: 0 | |||
m_CustomRenderQueue: -1 | |||
stringTagMap: {} | |||
disabledShaderPasses: [] | |||
m_SavedProperties: | |||
serializedVersion: 3 | |||
m_TexEnvs: | |||
- _AlphaTex: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _MainTex: | |||
<<<<<<< HEAD | |||
m_Texture: {fileID: 2800000, guid: 4f66e39be2d476f46bb700a5268dcfb8, type: 3} | |||
======= | |||
m_Texture: {fileID: 2800000, guid: 6ba5faafd9a8ff44b8f96dbe81c4f0f2, type: 3} | |||
>>>>>>> 77db7eb71343ea6a91583afc81271a936526016c | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
m_Floats: | |||
- PixelSnap: 0 | |||
- _EnableExternalAlpha: 0 | |||
m_Colors: | |||
- _Color: {r: 1, g: 1, b: 1, a: 1} | |||
- _Flip: {r: 1, g: 1, b: 1, a: 1} | |||
- _RendererColor: {r: 1, g: 1, b: 1, a: 1} | |||
m_BuildTextureStacks: [] |
@ -0,0 +1,12 @@ | |||
fileFormatVersion: 2 | |||
<<<<<<< HEAD | |||
guid: 4cfcd558d1d29fe49a8f2d60afff1640 | |||
======= | |||
guid: ca80fac3bd969f84eaf173691c89d17a | |||
>>>>>>> 77db7eb71343ea6a91583afc81271a936526016c | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 2100000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 855 |
size 787 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: 3f6b88bc87c349d4c846678526efec67 | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 11400000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 789 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: dedb652534fdf8e479c2c9e13c289cb3 | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 11400000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 788 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: ceaa9ad119734f445adb9d2afe46c5b5 | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 11400000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 787 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: dc21ae937ccab774e877f26dc76e3663 | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 11400000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 789 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: 20053426a2883e840acf35a3daf6e2c7 | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 11400000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 791 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: 468577ca5eb83ee4fa2dcf002db111bb | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 11400000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 791 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: 42887f6d5043c584cbeba66d2c292997 | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 11400000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 792 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: 17b5769bf11658642aa1398c84b52de5 | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 11400000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 793 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: b89b2c71c6d19024d8a0e8b8d4dffae0 | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 11400000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 792 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: 608a5dae37280714f8cf223d1e55af36 | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 11400000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 792 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: 4d5934146a24cc448807d80ee0ea7ac4 | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 11400000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 785 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: 4a791de422e6b974ebabf5477f5e6910 | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 11400000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 785 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: 5db14b24781d4604ebf310a4506120e2 | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 11400000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 787 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: ae0527ae03ebba64c844879e3ae11f07 | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 11400000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 787 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: 4ec242bb4dc92dd4891f18687f108d10 | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 11400000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 786 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: 75af4365a47098c47813c84ba5591cac | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 11400000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 784 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: 82d8acd40f132eb41b356d9628d41ff5 | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 11400000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 785 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: fc758a4a2e9715f4182e31a103aebed3 | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 11400000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 1440 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: 801e7deada1d1f74aa59f589a72283ba | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 11400000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 1133 |
@ -0,0 +1,473 @@ | |||
%YAML 1.1 | |||
%TAG !u! tag:unity3d.com,2011: | |||
--- !u!1 &4668322654876184655 | |||
GameObject: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
serializedVersion: 6 | |||
m_Component: | |||
- component: {fileID: 4668322654876184626} | |||
- component: {fileID: 4668322654876184653} | |||
- component: {fileID: 4668322654876184652} | |||
- component: {fileID: 4668322654876184627} | |||
- component: {fileID: 4668322654876184630} | |||
- component: {fileID: 4668322654876184625} | |||
- component: {fileID: 4668322654876184624} | |||
- component: {fileID: 4668322654876184631} | |||
- component: {fileID: -4453463038580551382} | |||
m_Layer: 7 | |||
m_Name: Player | |||
m_TagString: Player | |||
m_Icon: {fileID: 0} | |||
m_NavMeshLayer: 0 | |||
m_StaticEditorFlags: 0 | |||
m_IsActive: 1 | |||
--- !u!4 &4668322654876184626 | |||
Transform: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 4668322654876184655} | |||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | |||
m_LocalPosition: {x: -13.03, y: -5.21, z: -0.17} | |||
m_LocalScale: {x: 0.6, y: 0.6, z: 0.6} | |||
m_Children: | |||
- {fileID: 4668322656625073464} | |||
- {fileID: 4668322656710469013} | |||
- {fileID: 4668322655870949457} | |||
- {fileID: 4668322655423990997} | |||
m_Father: {fileID: 0} | |||
m_RootOrder: 0 | |||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} | |||
--- !u!212 &4668322654876184653 | |||
SpriteRenderer: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 4668322654876184655} | |||
m_Enabled: 0 | |||
m_CastShadows: 0 | |||
m_ReceiveShadows: 0 | |||
m_DynamicOccludee: 1 | |||
m_MotionVectors: 1 | |||
m_LightProbeUsage: 1 | |||
m_ReflectionProbeUsage: 1 | |||
m_RayTracingMode: 0 | |||
m_RayTraceProcedural: 0 | |||
m_RenderingLayerMask: 1 | |||
m_RendererPriority: 0 | |||
m_Materials: | |||
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} | |||
m_StaticBatchInfo: | |||
firstSubMesh: 0 | |||
subMeshCount: 0 | |||
m_StaticBatchRoot: {fileID: 0} | |||
m_ProbeAnchor: {fileID: 0} | |||
m_LightProbeVolumeOverride: {fileID: 0} | |||
m_ScaleInLightmap: 1 | |||
m_ReceiveGI: 1 | |||
m_PreserveUVs: 0 | |||
m_IgnoreNormalsForChartDetection: 0 | |||
m_ImportantGI: 0 | |||
m_StitchLightmapSeams: 1 | |||
m_SelectedEditorRenderState: 0 | |||
m_MinimumChartSize: 4 | |||
m_AutoUVMaxDistance: 0.5 | |||
m_AutoUVMaxAngle: 89 | |||
m_LightmapParameters: {fileID: 0} | |||
m_SortingLayerID: 0 | |||
m_SortingLayer: 0 | |||
m_SortingOrder: 0 | |||
m_Sprite: {fileID: -9095717837082945937, guid: bd3cb4af8406d4436a2ae8c2aafe1f8d, type: 3} | |||
m_Color: {r: 1, g: 1, b: 1, a: 1} | |||
m_FlipX: 0 | |||
m_FlipY: 0 | |||
m_DrawMode: 0 | |||
m_Size: {x: 1, y: 2} | |||
m_AdaptiveModeThreshold: 0.5 | |||
m_SpriteTileMode: 0 | |||
m_WasSpriteAssigned: 1 | |||
m_MaskInteraction: 0 | |||
m_SpriteSortPoint: 0 | |||
--- !u!50 &4668322654876184652 | |||
Rigidbody2D: | |||
serializedVersion: 4 | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 4668322654876184655} | |||
m_BodyType: 0 | |||
m_Simulated: 1 | |||
m_UseFullKinematicContacts: 0 | |||
m_UseAutoMass: 0 | |||
m_Mass: 1 | |||
m_LinearDrag: 0 | |||
m_AngularDrag: 0.05 | |||
m_GravityScale: 1 | |||
m_Material: {fileID: 6200000, guid: 6c2f9af082941ef45abc8e6a22e1c9ef, type: 2} | |||
m_Interpolate: 0 | |||
m_SleepingMode: 1 | |||
m_CollisionDetection: 0 | |||
m_Constraints: 4 | |||
--- !u!70 &4668322654876184627 | |||
CapsuleCollider2D: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 4668322654876184655} | |||
m_Enabled: 1 | |||
m_Density: 1 | |||
m_Material: {fileID: 0} | |||
m_IsTrigger: 0 | |||
m_UsedByEffector: 0 | |||
m_UsedByComposite: 0 | |||
m_Offset: {x: 0, y: 0} | |||
m_Size: {x: 1, y: 2} | |||
m_Direction: 0 | |||
--- !u!114 &4668322654876184630 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 4668322654876184655} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 0 | |||
m_Script: {fileID: 11500000, guid: 62899f850307741f2a39c98a8b639597, type: 3} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
m_Actions: {fileID: -944628639613478452, guid: 34d55f77ac416ab45b29345bb7e6a913, type: 3} | |||
m_NotificationBehavior: 2 | |||
m_UIInputModule: {fileID: 0} | |||
m_DeviceLostEvent: | |||
m_PersistentCalls: | |||
m_Calls: [] | |||
m_DeviceRegainedEvent: | |||
m_PersistentCalls: | |||
m_Calls: [] | |||
m_ControlsChangedEvent: | |||
m_PersistentCalls: | |||
m_Calls: [] | |||
m_ActionEvents: | |||
- m_PersistentCalls: | |||
m_Calls: | |||
- m_Target: {fileID: 4668322654876184624} | |||
m_TargetAssemblyTypeName: CharacterInputController, Assembly-CSharp | |||
m_MethodName: OnMove | |||
m_Mode: 0 | |||
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 | |||
m_ActionId: d1943f36-92e5-4335-a3f3-dd2e9e553ba6 | |||
m_ActionName: Level/Move[/Keyboard/w,/Keyboard/s,/Keyboard/a,/Keyboard/d,/Keyboard/upArrow,/Keyboard/downArrow,/Keyboard/leftArrow,/Keyboard/rightArrow] | |||
- m_PersistentCalls: | |||
m_Calls: | |||
- m_Target: {fileID: 4668322654876184624} | |||
m_TargetAssemblyTypeName: CharacterInputController, Assembly-CSharp | |||
m_MethodName: OnJump | |||
m_Mode: 0 | |||
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 | |||
m_ActionId: e7ae7276-c64d-43bb-8719-ef3178e194a0 | |||
m_ActionName: Level/Jump[/Keyboard/space,/Keyboard/w] | |||
m_NeverAutoSwitchControlSchemes: 0 | |||
m_DefaultControlScheme: | |||
m_DefaultActionMap: Level | |||
m_SplitScreenIndex: -1 | |||
m_Camera: {fileID: 0} | |||
--- !u!114 &4668322654876184625 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 4668322654876184655} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 0 | |||
m_Script: {fileID: 11500000, guid: 32250bba13a1233448b3ff49db05c141, type: 3} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
m_JumpForce: 100 | |||
m_WallJumpMultiplier: 3 | |||
m_CrouchSpeed: 0.36 | |||
m_MovementSmoothing: 0.05 | |||
m_AirControl: 1 | |||
m_WhatIsGround: | |||
serializedVersion: 2 | |||
m_Bits: 512 | |||
m_GroundCheck: {fileID: 4668322656625073464} | |||
m_CeilingCheck: {fileID: 4668322656710469013} | |||
m_WallCheck: {fileID: 4668322655870949457} | |||
m_CrouchDisableCollider: {fileID: 0} | |||
OnLandEvent: | |||
m_PersistentCalls: | |||
m_Calls: [] | |||
OnCrouchEvent: | |||
m_PersistentCalls: | |||
m_Calls: [] | |||
--- !u!114 &4668322654876184624 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 4668322654876184655} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 0 | |||
m_Script: {fileID: 11500000, guid: b0511d3cc433b7e41906b4911f68a962, type: 3} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
m_characterController: {fileID: 4668322654876184625} | |||
m_playerInput: | |||
Variable: {fileID: 11400000, guid: ae129d59580dbe94fa385299e3dfb47d, type: 2} | |||
m_useLocal: 0 | |||
m_localValue: 0 | |||
m_noInputAllowed: | |||
Variable: {fileID: 11400000, guid: ea1cffffa7e1ed34ca1fe3d3af13777c, type: 2} | |||
m_useLocal: 0 | |||
m_localValue: 0 | |||
m_speed: 2 | |||
--- !u!95 &4668322654876184631 | |||
Animator: | |||
serializedVersion: 3 | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 4668322654876184655} | |||
m_Enabled: 1 | |||
m_Avatar: {fileID: 0} | |||
m_Controller: {fileID: 0} | |||
m_CullingMode: 0 | |||
m_UpdateMode: 0 | |||
m_ApplyRootMotion: 0 | |||
m_LinearVelocityBlending: 0 | |||
m_WarningMessage: | |||
m_HasTransformHierarchy: 1 | |||
m_AllowConstantClipSamplingOptimization: 1 | |||
m_KeepAnimatorControllerStateOnDisable: 0 | |||
--- !u!114 &-4453463038580551382 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 4668322654876184655} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 0 | |||
m_Script: {fileID: 11500000, guid: 49dda9eea2761864e9eac5cdb5c83f57, type: 3} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
m_isPlayerDead: | |||
Variable: {fileID: 11400000, guid: a1586014535831a4e80b30178ff5ced4, type: 2} | |||
m_useLocal: 0 | |||
m_localValue: 0 | |||
--- !u!1 &4668322655423990996 | |||
GameObject: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
serializedVersion: 6 | |||
m_Component: | |||
- component: {fileID: 4668322655423990997} | |||
- component: {fileID: 4668322655423991003} | |||
- component: {fileID: 4668322655423991002} | |||
m_Layer: 7 | |||
m_Name: char_dude_sheet_0 | |||
m_TagString: Untagged | |||
m_Icon: {fileID: 0} | |||
m_NavMeshLayer: 0 | |||
m_StaticEditorFlags: 0 | |||
m_IsActive: 1 | |||
--- !u!4 &4668322655423990997 | |||
Transform: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 4668322655423990996} | |||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} | |||
m_LocalPosition: {x: 0.063, y: 0.383, z: 0} | |||
m_LocalScale: {x: 1.6666665, y: 1.6666665, z: 1.6666665} | |||
m_Children: [] | |||
m_Father: {fileID: 4668322654876184626} | |||
m_RootOrder: 3 | |||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} | |||
--- !u!212 &4668322655423991003 | |||
SpriteRenderer: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 4668322655423990996} | |||
m_Enabled: 1 | |||
m_CastShadows: 0 | |||
m_ReceiveShadows: 0 | |||
m_DynamicOccludee: 1 | |||
m_MotionVectors: 1 | |||
m_LightProbeUsage: 1 | |||
m_ReflectionProbeUsage: 1 | |||
m_RayTracingMode: 0 | |||
m_RayTraceProcedural: 0 | |||
m_RenderingLayerMask: 1 | |||
m_RendererPriority: 0 | |||
m_Materials: | |||
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} | |||
m_StaticBatchInfo: | |||
firstSubMesh: 0 | |||
subMeshCount: 0 | |||
m_StaticBatchRoot: {fileID: 0} | |||
m_ProbeAnchor: {fileID: 0} | |||
m_LightProbeVolumeOverride: {fileID: 0} | |||
m_ScaleInLightmap: 1 | |||
m_ReceiveGI: 1 | |||
m_PreserveUVs: 0 | |||
m_IgnoreNormalsForChartDetection: 0 | |||
m_ImportantGI: 0 | |||
m_StitchLightmapSeams: 1 | |||
m_SelectedEditorRenderState: 0 | |||
m_MinimumChartSize: 4 | |||
m_AutoUVMaxDistance: 0.5 | |||
m_AutoUVMaxAngle: 89 | |||
m_LightmapParameters: {fileID: 0} | |||
m_SortingLayerID: 0 | |||
m_SortingLayer: 0 | |||
m_SortingOrder: 0 | |||
m_Sprite: {fileID: 8758575904115477578, guid: aa8c58dcbc4c4a44891bacb2bc1e3480, type: 3} | |||
m_Color: {r: 1, g: 1, b: 1, a: 1} | |||
m_FlipX: 0 | |||
m_FlipY: 0 | |||
m_DrawMode: 0 | |||
m_Size: {x: 0.23, y: 0.25} | |||
m_AdaptiveModeThreshold: 0.5 | |||
m_SpriteTileMode: 0 | |||
m_WasSpriteAssigned: 1 | |||
m_MaskInteraction: 0 | |||
m_SpriteSortPoint: 0 | |||
--- !u!95 &4668322655423991002 | |||
Animator: | |||
serializedVersion: 3 | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 4668322655423990996} | |||
m_Enabled: 1 | |||
m_Avatar: {fileID: 0} | |||
m_Controller: {fileID: 9100000, guid: 49a569a83db15b14bb24e4093bd3b6de, type: 2} | |||
m_CullingMode: 0 | |||
m_UpdateMode: 0 | |||
m_ApplyRootMotion: 0 | |||
m_LinearVelocityBlending: 0 | |||
m_WarningMessage: | |||
m_HasTransformHierarchy: 1 | |||
m_AllowConstantClipSamplingOptimization: 1 | |||
m_KeepAnimatorControllerStateOnDisable: 0 | |||
--- !u!1 &4668322655870949456 | |||
GameObject: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
serializedVersion: 6 | |||
m_Component: | |||
- component: {fileID: 4668322655870949457} | |||
m_Layer: 7 | |||
m_Name: Hand | |||
m_TagString: Untagged | |||
m_Icon: {fileID: 0} | |||
m_NavMeshLayer: 0 | |||
m_StaticEditorFlags: 0 | |||
m_IsActive: 1 | |||
--- !u!4 &4668322655870949457 | |||
Transform: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 4668322655870949456} | |||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | |||
m_LocalPosition: {x: 0.5, y: -0.3, z: 0} | |||
m_LocalScale: {x: 1, y: 1, z: 1} | |||
m_Children: [] | |||
m_Father: {fileID: 4668322654876184626} | |||
m_RootOrder: 2 | |||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} | |||
--- !u!1 &4668322656625073467 | |||
GameObject: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
serializedVersion: 6 | |||
m_Component: | |||
- component: {fileID: 4668322656625073464} | |||
m_Layer: 7 | |||
m_Name: Feet | |||
m_TagString: Untagged | |||
m_Icon: {fileID: 0} | |||
m_NavMeshLayer: 0 | |||
m_StaticEditorFlags: 0 | |||
m_IsActive: 1 | |||
--- !u!4 &4668322656625073464 | |||
Transform: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 4668322656625073467} | |||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | |||
m_LocalPosition: {x: 0, y: -1, z: 0} | |||
m_LocalScale: {x: 1, y: 1, z: 1} | |||
m_Children: [] | |||
m_Father: {fileID: 4668322654876184626} | |||
m_RootOrder: 0 | |||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} | |||
--- !u!1 &4668322656710469012 | |||
GameObject: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
serializedVersion: 6 | |||
m_Component: | |||
- component: {fileID: 4668322656710469013} | |||
m_Layer: 7 | |||
m_Name: Head | |||
m_TagString: Untagged | |||
m_Icon: {fileID: 0} | |||
m_NavMeshLayer: 0 | |||
m_StaticEditorFlags: 0 | |||
m_IsActive: 1 | |||
--- !u!4 &4668322656710469013 | |||
Transform: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 4668322656710469012} | |||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | |||
m_LocalPosition: {x: 0, y: 0.61, z: 0} | |||
m_LocalScale: {x: 1, y: 1, z: 1} | |||
m_Children: [] | |||
m_Father: {fileID: 4668322654876184626} | |||
m_RootOrder: 1 | |||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
@ -0,0 +1,7 @@ | |||
fileFormatVersion: 2 | |||
guid: b4a65ba6dfdde8742903c22557f538a1 | |||
PrefabImporter: | |||
externalObjects: {} | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
@ -0,0 +1,211 @@ | |||
%YAML 1.1 | |||
%TAG !u! tag:unity3d.com,2011: | |||
--- !u!1 &2568405382520894643 | |||
GameObject: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
serializedVersion: 6 | |||
m_Component: | |||
- component: {fileID: 8078117592371321287} | |||
- component: {fileID: 1043124044502169818} | |||
- component: {fileID: 1793437425226485100} | |||
- component: {fileID: 5792353894968254291} | |||
m_Layer: 0 | |||
m_Name: spikes_3 | |||
m_TagString: Untagged | |||
m_Icon: {fileID: 0} | |||
m_NavMeshLayer: 0 | |||
m_StaticEditorFlags: 0 | |||
m_IsActive: 1 | |||
--- !u!4 &8078117592371321287 | |||
Transform: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 2568405382520894643} | |||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | |||
m_LocalPosition: {x: -8.62, y: -4.87, z: 0} | |||
m_LocalScale: {x: 1, y: 1, z: 1} | |||
m_Children: | |||
- {fileID: 6045522938640616061} | |||
m_Father: {fileID: 0} | |||
m_RootOrder: 0 | |||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} | |||
--- !u!212 &1043124044502169818 | |||
SpriteRenderer: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 2568405382520894643} | |||
m_Enabled: 1 | |||
m_CastShadows: 0 | |||
m_ReceiveShadows: 0 | |||
m_DynamicOccludee: 1 | |||
m_MotionVectors: 1 | |||
m_LightProbeUsage: 1 | |||
m_ReflectionProbeUsage: 1 | |||
m_RayTracingMode: 0 | |||
m_RayTraceProcedural: 0 | |||
m_RenderingLayerMask: 1 | |||
m_RendererPriority: 0 | |||
m_Materials: | |||
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} | |||
m_StaticBatchInfo: | |||
firstSubMesh: 0 | |||
subMeshCount: 0 | |||
m_StaticBatchRoot: {fileID: 0} | |||
m_ProbeAnchor: {fileID: 0} | |||
m_LightProbeVolumeOverride: {fileID: 0} | |||
m_ScaleInLightmap: 1 | |||
m_ReceiveGI: 1 | |||
m_PreserveUVs: 0 | |||
m_IgnoreNormalsForChartDetection: 0 | |||
m_ImportantGI: 0 | |||
m_StitchLightmapSeams: 1 | |||
m_SelectedEditorRenderState: 0 | |||
m_MinimumChartSize: 4 | |||
m_AutoUVMaxDistance: 0.5 | |||
m_AutoUVMaxAngle: 89 | |||
m_LightmapParameters: {fileID: 0} | |||
m_SortingLayerID: 0 | |||
m_SortingLayer: 0 | |||
m_SortingOrder: 0 | |||
m_Sprite: {fileID: -8328159106608433595, guid: d593933f03721d04b8e6a35a8ff8d5e3, type: 3} | |||
m_Color: {r: 1, g: 1, b: 1, a: 1} | |||
m_FlipX: 0 | |||
m_FlipY: 0 | |||
m_DrawMode: 0 | |||
m_Size: {x: 1, y: 1} | |||
m_AdaptiveModeThreshold: 0.5 | |||
m_SpriteTileMode: 0 | |||
m_WasSpriteAssigned: 1 | |||
m_MaskInteraction: 0 | |||
m_SpriteSortPoint: 0 | |||
--- !u!61 &1793437425226485100 | |||
BoxCollider2D: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 2568405382520894643} | |||
m_Enabled: 1 | |||
m_Density: 1 | |||
m_Material: {fileID: 0} | |||
m_IsTrigger: 1 | |||
m_UsedByEffector: 0 | |||
m_UsedByComposite: 0 | |||
m_Offset: {x: 0, y: 0} | |||
m_SpriteTilingProperty: | |||
border: {x: 0, y: 0, z: 0, w: 0} | |||
pivot: {x: 0.5, y: 0.5} | |||
oldSize: {x: 1, y: 1} | |||
newSize: {x: 1, y: 1} | |||
adaptiveTilingThreshold: 0.5 | |||
drawMode: 0 | |||
adaptiveTiling: 0 | |||
m_AutoTiling: 0 | |||
serializedVersion: 2 | |||
m_Size: {x: 1, y: 1} | |||
m_EdgeRadius: 0 | |||
--- !u!114 &5792353894968254291 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 2568405382520894643} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 0 | |||
m_Script: {fileID: 11500000, guid: 1ac34d7ad4f935b4a92bff7901ea1180, type: 3} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
m_isDead: | |||
Variable: {fileID: 0} | |||
m_useLocal: 1 | |||
m_localValue: 0 | |||
--- !u!1 &2740308402194940216 | |||
GameObject: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
serializedVersion: 6 | |||
m_Component: | |||
- component: {fileID: 6045522938640616061} | |||
- component: {fileID: 2090863402335022966} | |||
m_Layer: 0 | |||
m_Name: we | |||
m_TagString: Untagged | |||
m_Icon: {fileID: 0} | |||
m_NavMeshLayer: 0 | |||
m_StaticEditorFlags: 0 | |||
m_IsActive: 1 | |||
--- !u!4 &6045522938640616061 | |||
Transform: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 2740308402194940216} | |||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | |||
m_LocalPosition: {x: 0.47, y: 0.79, z: 0} | |||
m_LocalScale: {x: 1, y: 1, z: 1} | |||
m_Children: [] | |||
m_Father: {fileID: 8078117592371321287} | |||
m_RootOrder: 0 | |||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} | |||
--- !u!212 &2090863402335022966 | |||
SpriteRenderer: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 2740308402194940216} | |||
m_Enabled: 1 | |||
m_CastShadows: 0 | |||
m_ReceiveShadows: 0 | |||
m_DynamicOccludee: 1 | |||
m_MotionVectors: 1 | |||
m_LightProbeUsage: 1 | |||
m_ReflectionProbeUsage: 1 | |||
m_RayTracingMode: 0 | |||
m_RayTraceProcedural: 0 | |||
m_RenderingLayerMask: 1 | |||
m_RendererPriority: 0 | |||
m_Materials: | |||
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} | |||
m_StaticBatchInfo: | |||
firstSubMesh: 0 | |||
subMeshCount: 0 | |||
m_StaticBatchRoot: {fileID: 0} | |||
m_ProbeAnchor: {fileID: 0} | |||
m_LightProbeVolumeOverride: {fileID: 0} | |||
m_ScaleInLightmap: 1 | |||
m_ReceiveGI: 1 | |||
m_PreserveUVs: 0 | |||
m_IgnoreNormalsForChartDetection: 0 | |||
m_ImportantGI: 0 | |||
m_StitchLightmapSeams: 1 | |||
m_SelectedEditorRenderState: 0 | |||
m_MinimumChartSize: 4 | |||
m_AutoUVMaxDistance: 0.5 | |||
m_AutoUVMaxAngle: 89 | |||
m_LightmapParameters: {fileID: 0} | |||
m_SortingLayerID: 0 | |||
m_SortingLayer: 0 | |||
m_SortingOrder: 0 | |||
m_Sprite: {fileID: -2413806693520163455, guid: ebe73ca9363db456bacf42c025bb4847, type: 3} | |||
m_Color: {r: 1, g: 1, b: 1, a: 1} | |||
m_FlipX: 0 | |||
m_FlipY: 0 | |||
m_DrawMode: 0 | |||
m_Size: {x: 1, y: 1} | |||
m_AdaptiveModeThreshold: 0.5 | |||
m_SpriteTileMode: 0 | |||
m_WasSpriteAssigned: 1 | |||
m_MaskInteraction: 0 | |||
m_SpriteSortPoint: 0 |
@ -0,0 +1,7 @@ | |||
fileFormatVersion: 2 | |||
guid: bbc251b61efff9b49a4a402c3cdc304c | |||
PrefabImporter: | |||
externalObjects: {} | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 285040 |
@ -0,0 +1,37 @@ | |||
using System.Collections; | |||
using System.Collections.Generic; | |||
using UnityEngine; | |||
using Variables; | |||
public class CharacterReset : MonoBehaviour, IResettable | |||
{ | |||
[SerializeField, Header("References")] | |||
Reference<bool> m_isPlayerDead; | |||
private Vector3 m_startPosition; | |||
private Quaternion m_startRotation; | |||
public void OnLevelLoad() | |||
{ | |||
m_startPosition = transform.position; | |||
m_startRotation = transform.rotation; | |||
} | |||
public void OnResetEnd() | |||
{ | |||
} | |||
public IEnumerator OnResetStart(float time) | |||
{ | |||
transform.position = m_startPosition; | |||
transform.rotation = m_startRotation; | |||
m_isPlayerDead.Value = false; | |||
yield break; | |||
} | |||
} |
@ -0,0 +1,11 @@ | |||
fileFormatVersion: 2 | |||
guid: 49dda9eea2761864e9eac5cdb5c83f57 | |||
MonoImporter: | |||
externalObjects: {} | |||
serializedVersion: 2 | |||
defaultReferences: [] | |||
executionOrder: 0 | |||
icon: {instanceID: 0} | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
@ -0,0 +1,14 @@ | |||
using System.Collections; | |||
using System.Collections.Generic; | |||
using UnityEngine; | |||
public interface IResettable | |||
{ | |||
public void OnLevelLoad(); | |||
public IEnumerator OnResetStart(float time); | |||
public void OnResetEnd(); | |||
} |
@ -0,0 +1,11 @@ | |||
fileFormatVersion: 2 | |||
guid: ad996d168724ecc4e88b3854210fcbfc | |||
MonoImporter: | |||
externalObjects: {} | |||
serializedVersion: 2 | |||
defaultReferences: [] | |||
executionOrder: 0 | |||
icon: {instanceID: 0} | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
@ -0,0 +1,19 @@ | |||
using System.Collections; | |||
using System.Collections.Generic; | |||
using UnityEngine; | |||
using Variables; | |||
public class KillPlayer : MonoBehaviour | |||
{ | |||
[SerializeField] | |||
private Reference<bool> m_isDead; | |||
private void OnTriggerEnter2D(Collider2D collision) | |||
{ | |||
if (collision.CompareTag("Player")) | |||
m_isDead.Value = true; | |||
} | |||
} |
@ -0,0 +1,11 @@ | |||
fileFormatVersion: 2 | |||
guid: 1ac34d7ad4f935b4a92bff7901ea1180 | |||
MonoImporter: | |||
externalObjects: {} | |||
serializedVersion: 2 | |||
defaultReferences: [] | |||
executionOrder: 0 | |||
icon: {instanceID: 0} | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
@ -0,0 +1,113 @@ | |||
using System.Collections; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using UnityEngine; | |||
using NaughtyAttributes; | |||
using Variables; | |||
public class LevelManager : MonoBehaviour | |||
{ | |||
[SerializeField, Header("References")] | |||
Reference<bool> m_isPlayerDead; | |||
[SerializeField] | |||
Reference<bool> m_freezePlayer; | |||
[SerializeField] | |||
Reference<bool> m_isVictory; | |||
[SerializeField] | |||
Reference<float> m_timer; | |||
[SerializeField, BoxGroup("Level Settings")] | |||
private string m_levelName = "Level 1"; | |||
[SerializeField, BoxGroup("Level Settings")] | |||
private float m_timeInLevel = 10; | |||
[SerializeField] | |||
private float m_resetTime = 1; | |||
[SerializeField] | |||
private string m_nextSceneToLoad = "Level 2"; | |||
private IResettable[] m_allResetable; | |||
private void Start() | |||
{ | |||
m_allResetable = FindObjectsOfType<MonoBehaviour>().OfType<IResettable>().ToArray(); | |||
m_timer.Value = m_timeInLevel; | |||
foreach (IResettable resettable in m_allResetable) | |||
{ | |||
resettable.OnLevelLoad(); | |||
} | |||
} | |||
private void Update() | |||
{ | |||
if (!m_freezePlayer) | |||
m_timer.Value -= Time.deltaTime; | |||
} | |||
private void OnEnable() | |||
{ | |||
m_isPlayerDead.OnValueChanged += OnPlayerDeadChange; | |||
m_isVictory.OnValueChanged += OnPlayerVictoryChange; | |||
} | |||
private void OnDisable() | |||
{ | |||
m_isPlayerDead.OnValueChanged -= OnPlayerDeadChange; | |||
m_isVictory.OnValueChanged -= OnPlayerVictoryChange; | |||
} | |||
private IEnumerator DeathRoutine() | |||
{ | |||
m_freezePlayer.Value = true; | |||
m_timer.Value = m_timeInLevel; | |||
foreach (IResettable resettable in m_allResetable) | |||
StartCoroutine(resettable.OnResetStart(m_resetTime)); | |||
yield return new WaitForSeconds(m_resetTime); | |||
foreach (IResettable resettable in m_allResetable) | |||
resettable.OnResetEnd(); | |||
m_freezePlayer.Value = false; | |||
} | |||
private void OnPlayerDeadChange(bool value) | |||
{ | |||
if (value) | |||
{ | |||
StartCoroutine(DeathRoutine()); | |||
} | |||
} | |||
private void OnPlayerVictoryChange(bool value) | |||
{ | |||
} | |||
} |
@ -0,0 +1,11 @@ | |||
fileFormatVersion: 2 | |||
guid: 2022aae2eff786945bf401469695230a | |||
MonoImporter: | |||
externalObjects: {} | |||
serializedVersion: 2 | |||
defaultReferences: [] | |||
executionOrder: 0 | |||
icon: {instanceID: 0} | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
@ -0,0 +1,62 @@ | |||
using System.Collections; | |||
using System.Collections.Generic; | |||
using UnityEngine; | |||
using Variables; | |||
public class SneakyTextController : MonoBehaviour | |||
{ | |||
[SerializeField] | |||
private Reference<float> m_lightLevel; | |||
[SerializeField] | |||
private Reference<bool> m_freezePlayer; | |||
[SerializeField] | |||
private float m_time = 10; | |||
[SerializeField] | |||
private TMPro.TextMeshProUGUI m_text; | |||
private bool m_hasTriggered = false; | |||
private void OnEnable() | |||
{ | |||
m_lightLevel.OnValueChanged += OnLightChange; | |||
} | |||
private void OnDisable() | |||
{ | |||
m_lightLevel.OnValueChanged -= OnLightChange; | |||
} | |||
private void Start() | |||
{ | |||
m_text.gameObject.SetActive(false); | |||
} | |||
private void OnLightChange(float value) | |||
{ | |||
Color color = m_text.color; | |||
color.a = 1 - m_lightLevel; | |||
m_text.color = color; | |||
if (!m_hasTriggered && !m_freezePlayer) | |||
{ | |||
m_hasTriggered = true; | |||
StartCoroutine(Timer( m_time)); | |||
} | |||
} | |||
private IEnumerator Timer(float time) | |||
{ | |||
Debug.Log("here"); | |||
m_text.gameObject.SetActive(true); | |||
yield return new WaitForSeconds(time); | |||
m_text.gameObject.SetActive(false); | |||
} | |||
} |
@ -0,0 +1,11 @@ | |||
fileFormatVersion: 2 | |||
guid: d6f991527b7c3d5419b9f5e0f73d598d | |||
MonoImporter: | |||
externalObjects: {} | |||
serializedVersion: 2 | |||
defaultReferences: [] | |||
executionOrder: 0 | |||
icon: {instanceID: 0} | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
@ -0,0 +1,34 @@ | |||
using System.Collections; | |||
using System.Collections.Generic; | |||
using UnityEngine; | |||
using TMPro; | |||
using Variables; | |||
public class TimerController : MonoBehaviour | |||
{ | |||
[SerializeField] | |||
private Reference<float> m_time; | |||
private Color m_defaultColor; | |||
private void OnEnable() | |||
{ | |||
m_time.OnValueChanged += OnTimeChange; | |||
} | |||
private void OnDisable() | |||
{ | |||
m_time.OnValueChanged -= OnTimeChange; | |||
} | |||
private void OnTimeChange(float value) | |||
{ | |||
} | |||
} |
@ -0,0 +1,11 @@ | |||
fileFormatVersion: 2 | |||
guid: 5e65af424b40dd845ae91bb2d24af0c9 | |||
MonoImporter: | |||
externalObjects: {} | |||
serializedVersion: 2 | |||
defaultReferences: [] | |||
executionOrder: 0 | |||
icon: {instanceID: 0} | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 465 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: ca17925be533f0e488952f6fe4d4563b | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 11400000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 459 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: a36c9e2ffbc2b20429e4486eba03312a | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 11400000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 466 |
size 463 |
size 466 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: a1586014535831a4e80b30178ff5ced4 | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 11400000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |