diff --git a/Assets/Prefabs/Abilities/CrowsForesightPrefab.prefab b/Assets/Prefabs/Abilities/CrowsForesightPrefab.prefab index ce98eec2..82be392e 100644 --- a/Assets/Prefabs/Abilities/CrowsForesightPrefab.prefab +++ b/Assets/Prefabs/Abilities/CrowsForesightPrefab.prefab @@ -45,7 +45,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3} m_Name: m_EditorClassIdentifier: - GlobalObjectIdHash: 17096565 + GlobalObjectIdHash: 1807401839 InScenePlacedSourceGlobalObjectIdHash: 0 AlwaysReplicateAsRoot: 0 SynchronizeTransform: 1 @@ -66,4 +66,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 24b344d29ff558b4197f1bb01ec11343, type: 3} m_Name: m_EditorClassIdentifier: - Ability: {fileID: 11400000, guid: 6b4485e4bc8be814db7fc22a6778fbd5, type: 2} + LinePrefab: {fileID: 7889671876836792639, guid: f76245e183e27164b945e77d80de8c0c, type: 3} diff --git a/Assets/Prefabs/ForeSightLineRenderer.prefab b/Assets/Prefabs/ForeSightLineRenderer.prefab new file mode 100644 index 00000000..7121ff28 --- /dev/null +++ b/Assets/Prefabs/ForeSightLineRenderer.prefab @@ -0,0 +1,155 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &7889671876836792639 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2190496012411949397} + - component: {fileID: 9057376229307534297} + - component: {fileID: 7429976590137184792} + m_Layer: 0 + m_Name: ForeSightLineRenderer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2190496012411949397 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7889671876836792639} + serializedVersion: 2 + 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: 1 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!120 &9057376229307534297 +LineRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7889671876836792639} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 0 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 77e5ea3a019674146a9f2b3ed629b386, type: 2} + 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: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Positions: + - {x: 0, y: 0, z: 0} + - {x: 0, y: 0, z: 1} + m_Parameters: + serializedVersion: 3 + widthMultiplier: 1 + widthCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + colorGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_ColorSpace: -1 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + numCornerVertices: 0 + numCapVertices: 0 + alignment: 0 + textureMode: 0 + textureScale: {x: 1, y: 1} + shadowBias: 0.5 + generateLightingData: 0 + m_MaskInteraction: 0 + m_UseWorldSpace: 1 + m_Loop: 0 + m_ApplyActiveColorSpace: 1 +--- !u!114 &7429976590137184792 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7889671876836792639} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1e6412647fb95594eb08353a0c8edd79, type: 3} + m_Name: + m_EditorClassIdentifier: + lineRenderer: {fileID: 9057376229307534297} + scrollingMaterial: {fileID: 2100000, guid: 77e5ea3a019674146a9f2b3ed629b386, type: 2} + speed: 1 + tiling: 0.28 diff --git a/Assets/Prefabs/ForeSightLineRenderer.prefab.meta b/Assets/Prefabs/ForeSightLineRenderer.prefab.meta new file mode 100644 index 00000000..297c36c3 --- /dev/null +++ b/Assets/Prefabs/ForeSightLineRenderer.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f76245e183e27164b945e77d80de8c0c +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/RightArrow.png b/Assets/RightArrow.png new file mode 100644 index 00000000..fd39ebe2 Binary files /dev/null and b/Assets/RightArrow.png differ diff --git a/Assets/RightArrow.png.meta b/Assets/RightArrow.png.meta new file mode 100644 index 00000000..709aa14e --- /dev/null +++ b/Assets/RightArrow.png.meta @@ -0,0 +1,114 @@ +fileFormatVersion: 2 +guid: 09aebc1469fdd064baac1bb748179611 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/BossRoom.unity b/Assets/Scenes/BossRoom.unity index c7a0429f..02c9946f 100644 --- a/Assets/Scenes/BossRoom.unity +++ b/Assets/Scenes/BossRoom.unity @@ -12536,11 +12536,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 1676734515771252668, guid: 0193228de87741d40a42e561901c9083, type: 3} propertyPath: m_LocalRotation.y - value: 0.28987604 + value: 0.28987613 objectReference: {fileID: 0} - target: {fileID: 1676734515771252668, guid: 0193228de87741d40a42e561901c9083, type: 3} propertyPath: m_LocalRotation.z - value: -0.1815203 + value: -0.18152039 objectReference: {fileID: 0} - target: {fileID: 1676734516302391364, guid: 0193228de87741d40a42e561901c9083, type: 3} propertyPath: m_UpdateMethod diff --git a/Assets/Scripts/Gameplay/CrowsForesightPrefab.cs b/Assets/Scripts/Gameplay/CrowsForesightPrefab.cs index e19b7a8d..3061a33c 100644 --- a/Assets/Scripts/Gameplay/CrowsForesightPrefab.cs +++ b/Assets/Scripts/Gameplay/CrowsForesightPrefab.cs @@ -9,6 +9,7 @@ public class CrowsForesightPrefab : NetworkBehaviour private Dictionary foresightLines = new Dictionary(); private ulong crowClientId; private Coroutine destroyCoroutine; + public GameObject LinePrefab; private void Start() { if (IsServer) @@ -131,11 +132,13 @@ public class CrowsForesightPrefab : NetworkBehaviour private LineRenderer CreateLine() { - GameObject lineObj = new GameObject("ForesightLine"); + //GameObject lineObj = new GameObject("ForesightLine"); + + GameObject lineObj = Instantiate(LinePrefab); LineRenderer line = lineObj.AddComponent(); - line.startWidth = 0.1f; - line.endWidth = 0.1f; - line.material = new Material(Shader.Find("Sprites/Default")); + line.startWidth = 0.7f; + line.endWidth = 0.7f; + //line.material = new Material(Shader.Find("Sprites/Default")); line.transform.SetParent(transform); return line; } diff --git a/Assets/ScrollingLineMaterial..mat b/Assets/ScrollingLineMaterial..mat new file mode 100644 index 00000000..6b4a0207 --- /dev/null +++ b/Assets/ScrollingLineMaterial..mat @@ -0,0 +1,58 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ScrollingLineMaterial. + m_Shader: {fileID: 4800000, guid: 05686b96e6140824aaa8a5a993e01e93, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: + - _SURFACE_TYPE_TRANSPARENT + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 1 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: + - DepthOnly + - SHADOWCASTER + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 2800000, guid: 09aebc1469fdd064baac1bb748179611, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: 09aebc1469fdd064baac1bb748179611, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AlphaClip: 0 + - _AlphaToMask: 0 + - _Blend: 0 + - _BlendOp: 0 + - _Cull: 2 + - _Cutoff: 0.5 + - _DstBlend: 10 + - _DstBlendAlpha: 10 + - _QueueOffset: 0 + - _SampleGI: 0 + - _Speed: 1 + - _SrcBlend: 5 + - _SrcBlendAlpha: 1 + - _Surface: 1 + - _Tiling: 1 + - _ZWrite: 0 + m_Colors: + - _BaseColor: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/ScrollingLineMaterial..mat.meta b/Assets/ScrollingLineMaterial..mat.meta new file mode 100644 index 00000000..adf8a3e1 --- /dev/null +++ b/Assets/ScrollingLineMaterial..mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 77e5ea3a019674146a9f2b3ed629b386 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ScrollingLineRenderer.cs b/Assets/ScrollingLineRenderer.cs new file mode 100644 index 00000000..c5bafeca --- /dev/null +++ b/Assets/ScrollingLineRenderer.cs @@ -0,0 +1,19 @@ +using UnityEngine; + +public class ScrollingLineRenderer : MonoBehaviour +{ + public LineRenderer lineRenderer; + public Material scrollingMaterial; + public float speed = 1.0f; // Adjust speed in Inspector + public float tiling = 1.0f; // Controls how many arrows fit in the line + + void Update() + { + if (scrollingMaterial == null) return; + + // Scroll texture over time + float offset = Time.time * -speed; + scrollingMaterial.SetFloat("_Speed", speed); + scrollingMaterial.SetFloat("_Tiling", tiling); + } +} diff --git a/Assets/ScrollingLineRenderer.cs.meta b/Assets/ScrollingLineRenderer.cs.meta new file mode 100644 index 00000000..05b8c4ea --- /dev/null +++ b/Assets/ScrollingLineRenderer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1e6412647fb95594eb08353a0c8edd79 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ScrollingLineShader.shader b/Assets/ScrollingLineShader.shader new file mode 100644 index 00000000..7f239876 --- /dev/null +++ b/Assets/ScrollingLineShader.shader @@ -0,0 +1,60 @@ +Shader "Custom/ScrollingLine" +{ + Properties + { + _MainTex ("Texture", 2D) = "white" {} + _Speed ("Scroll Speed", Float) = 1.0 + _Tiling ("Texture Tiling", Float) = 1.0 + _Color ("Color Tint", Color) = (1,1,1,1) // Add color support + } + + SubShader + { + Tags { "RenderPipeline" = "UniversalRenderPipeline" "Queue"="Transparent" } + Pass + { + Blend SrcAlpha OneMinusSrcAlpha // Enable transparency + Cull Off + ZWrite Off // Prevent depth writing (helps transparency) + + HLSLPROGRAM + #pragma vertex vert + #pragma fragment frag + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + + struct appdata_t + { + float4 position : POSITION; + float2 uv : TEXCOORD0; + }; + + struct v2f + { + float4 position : SV_POSITION; + float2 uv : TEXCOORD0; + }; + + sampler2D _MainTex; + float4 _MainTex_ST; + float _Speed; + float _Tiling; + float4 _Color; // Color support + + v2f vert (appdata_t v) + { + v2f o; + o.position = TransformObjectToHClip(v.position); + float2 offset = float2(_Time.y * _Speed, 0); // Scroll the texture horizontally + o.uv = TRANSFORM_TEX(v.uv, _MainTex) * float2(_Tiling, 1) + offset; + return o; + } + + half4 frag (v2f i) : SV_Target + { + half4 texColor = tex2D(_MainTex, i.uv); + return texColor * _Color; // Apply color tint + } + ENDHLSL + } + } +} diff --git a/Assets/ScrollingLineShader.shader.meta b/Assets/ScrollingLineShader.shader.meta new file mode 100644 index 00000000..ce62f5ba --- /dev/null +++ b/Assets/ScrollingLineShader.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 05686b96e6140824aaa8a5a993e01e93 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: