diff --git a/Assets/Scenes/Level_01.unity b/Assets/Scenes/Level_01.unity index 71a73361efcb2b0e0aba49b37c2ea89f74d3d7c7..45fbe8c7638ad63497b4e3019f27c942ffe54a27 100644 --- a/Assets/Scenes/Level_01.unity +++ b/Assets/Scenes/Level_01.unity @@ -1859,6 +1859,141 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 226974167} m_CullTransparentMesh: 1 +--- !u!1 &247868484 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 247868485} + - component: {fileID: 247868487} + - component: {fileID: 247868486} + m_Layer: 5 + m_Name: ShopUna + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &247868485 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 247868484} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1939156175} + m_RootOrder: 16 + 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: 0.000011444, y: 8.8983} + m_SizeDelta: {x: 525.2267, y: 77.7965} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &247868486 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 247868484} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: SHOP UNAVAILABLE + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2100000, guid: 79459efec17a4d00a321bdcc27bbc385, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4278190335 + m_fontColor: {r: 1, g: 0, b: 0, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 50 + m_fontSizeBase: 50 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 4.1735997, y: -8.650192, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &247868487 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 247868484} + m_CullTransparentMesh: 1 --- !u!1 &255530816 GameObject: m_ObjectHideFlags: 0 @@ -8593,6 +8728,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: speed: 6 + shop: {fileID: 429290763} pet: 0 shotgun: 0 sword: 0 @@ -8602,6 +8738,7 @@ MonoBehaviour: - {fileID: 47640732} - {fileID: 1318841538} oneHit: 0 + fail: {fileID: 247868484} --- !u!82 &624092164 AudioSource: m_ObjectHideFlags: 0 @@ -17623,7 +17760,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &1560026321 RectTransform: m_ObjectHideFlags: 0 @@ -19510,6 +19647,7 @@ RectTransform: - {fileID: 1987641287} - {fileID: 1866292404} - {fileID: 845946675} + - {fileID: 247868485} m_Father: {fileID: 0} m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Scripts/Player/PlayerMovement.cs b/Assets/Scripts/Player/PlayerMovement.cs index 887d34a15a63c812320cd49b396fc2f1ca144f56..0536704d0428ac3aac32bc68fa942d5ca3484809 100644 --- a/Assets/Scripts/Player/PlayerMovement.cs +++ b/Assets/Scripts/Player/PlayerMovement.cs @@ -1,9 +1,11 @@ using UnityEngine; +using System.Collections; public class PlayerMovement : MonoBehaviour { private bool DoubleSpeed = false; public float speed = 6f; + public GameObject shop; Vector3 movement; Animator anim; Rigidbody playerRigidbody; @@ -15,6 +17,7 @@ public class PlayerMovement : MonoBehaviour public int bow = 0; public GameObject[] Pets; public bool oneHit = false; + public GameObject fail; private void Awake() { if (pet==1){ @@ -51,6 +54,10 @@ public class PlayerMovement : MonoBehaviour void Update() { + if (Input.GetKeyDown("e") && shop.activeSelf == false) + { + StartCoroutine(FailShop()); + } if (Input.GetKeyDown("k") && !oneHit){ Debug.Log("one kill hit mode activated"); oneHit = true; @@ -125,4 +132,10 @@ public class PlayerMovement : MonoBehaviour { this.pet = petIdx; } + private IEnumerator FailShop() + { + fail.SetActive(true); + yield return new WaitForSeconds(0.75f); + fail.SetActive(false); + } } diff --git a/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Outline.mat b/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Outline.mat index cca8ce8933c86f8dfcef4c8cc18b3136e53256ef..94484bc6f77744866ebdc4e5d01affd3eee11d80 100644 --- a/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Outline.mat +++ b/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Outline.mat @@ -2,14 +2,16 @@ %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: LiberationSans SDF - Outline m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3} - m_ShaderKeywords: OUTLINE_ON + m_ValidKeywords: + - OUTLINE_ON + m_InvalidKeywords: [] m_LightmapFlags: 5 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 @@ -32,14 +34,14 @@ Material: m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MainTex: - m_Texture: {fileID: 28684132378477856, guid: 8f586378b4e144a9851e7b34d9b748ee, - type: 2} + m_Texture: {fileID: 28684132378477856, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _OutlineTex: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + m_Ints: [] m_Floats: - _Ambient: 0.5 - _Bevel: 0.5 @@ -50,6 +52,7 @@ Material: - _BumpFace: 0 - _BumpOutline: 0 - _ColorMask: 15 + - _CullMode: 0 - _Diffuse: 0.5 - _FaceDilate: 0.1 - _FaceUVSpeedX: 0 @@ -97,8 +100,9 @@ Material: - _FaceColor: {r: 1, g: 1, b: 1, a: 1} - _GlowColor: {r: 0, g: 1, b: 0, a: 0.5} - _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767} - - _OutlineColor: {r: 0, g: 0, b: 0, a: 1} + - _OutlineColor: {r: 0.8926573, g: 1, b: 0, a: 1} - _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1} - _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5} + m_BuildTextureStacks: []