diff --git a/Assets/Audio/Augments/boomBardier.meta b/Assets/Audio/Augments/boomBardier.meta new file mode 100644 index 000000000..5012c84d5 --- /dev/null +++ b/Assets/Audio/Augments/boomBardier.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3bcc4d4c12161e9469aef4133ef076a2 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Audio/Augments/boomBardier/BoomBardier.asset b/Assets/Audio/Augments/boomBardier/BoomBardier.asset new file mode 100644 index 000000000..5aa0d56ce --- /dev/null +++ b/Assets/Audio/Augments/boomBardier/BoomBardier.asset @@ -0,0 +1,25 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !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: aa94d7cf98a253641a478b6ab78a05e3, type: 3} + m_Name: BoomBardier + m_EditorClassIdentifier: + sounds: + - {fileID: 8300000, guid: 25ffafe1977fbde459c8cd438086b78a, type: 3} + semitoneRange: + min: -5 + max: 0 + continuousPitchBend: 0 + volumeRange: + min: 0.8990219 + max: 1 + is3D: 1 + shouldPlayInSplitscreen: 1 diff --git a/Assets/Audio/Augments/boomBardier/BoomBardier.asset.meta b/Assets/Audio/Augments/boomBardier/BoomBardier.asset.meta new file mode 100644 index 000000000..083f12370 --- /dev/null +++ b/Assets/Audio/Augments/boomBardier/BoomBardier.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 83ebc3c9a2cdc6049822b4ea1e94340d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Audio/Augments/boomBardier/boomBardierShot.mp3 b/Assets/Audio/Augments/boomBardier/boomBardierShot.mp3 new file mode 100644 index 000000000..a00b82ce4 Binary files /dev/null and b/Assets/Audio/Augments/boomBardier/boomBardierShot.mp3 differ diff --git a/Assets/Audio/Augments/boomBardier/boomBardierShot.mp3.meta b/Assets/Audio/Augments/boomBardier/boomBardierShot.mp3.meta new file mode 100644 index 000000000..aa8ee4701 --- /dev/null +++ b/Assets/Audio/Augments/boomBardier/boomBardierShot.mp3.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 25ffafe1977fbde459c8cd438086b78a +AudioImporter: + externalObjects: {} + serializedVersion: 7 + defaultSettings: + serializedVersion: 2 + loadType: 2 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/GunParts/Bullets/StickyDynamiteStick.prefab b/Assets/Prefabs/GunParts/Bullets/StickyDynamiteStick.prefab index f0924f2ae..4926e0fe5 100644 --- a/Assets/Prefabs/GunParts/Bullets/StickyDynamiteStick.prefab +++ b/Assets/Prefabs/GunParts/Bullets/StickyDynamiteStick.prefab @@ -333,6 +333,120 @@ VFXRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 +--- !u!1 &3373628028266271307 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4153152802966413163} + - component: {fileID: 7822331909276670013} + - component: {fileID: 6997668613973519752} + m_Layer: 3 + m_Name: ShockWave + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4153152802966413163 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3373628028266271307} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.51, y: 0.51, z: 0.51} + m_ConstrainProportionsScale: 1 + m_Children: [] + m_Father: {fileID: 6344376435459863123} + m_RootOrder: -1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!2083052967 &7822331909276670013 +VisualEffect: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3373628028266271307} + m_Enabled: 0 + m_Asset: {fileID: 8926484042661614526, guid: 6981c21faa5329a468335451ba63132b, type: 3} + m_InitialEventName: OnPlay + m_InitialEventNameOverriden: 1 + m_StartSeed: 0 + m_ResetSeedOnPlay: 1 + m_AllowInstancing: 1 + m_ResourceVersion: 1 + m_PropertySheet: + m_Float: + m_Array: + - m_Value: 0.1 + m_Name: Size + m_Overridden: 0 + m_Vector2f: + m_Array: [] + m_Vector3f: + m_Array: [] + m_Vector4f: + m_Array: [] + m_Uint: + m_Array: [] + m_Int: + m_Array: [] + m_Matrix4x4f: + m_Array: [] + m_AnimationCurve: + m_Array: [] + m_Gradient: + m_Array: [] + m_NamedObject: + m_Array: [] + m_Bool: + m_Array: [] +--- !u!73398921 &6997668613973519752 +VFXRenderer: + serializedVersion: 1 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3373628028266271307} + m_Enabled: 0 + m_CastShadows: 0 + m_ReceiveShadows: 0 + 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_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 --- !u!1 &6250359422203994716 GameObject: m_ObjectHideFlags: 0 @@ -364,7 +478,8 @@ Transform: m_LocalPosition: {x: 0, y: 0.5, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: [] + m_Children: + - {fileID: 4153152802966413163} m_Father: {fileID: 526888926941635231} m_RootOrder: -1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Prefabs/GunParts/DynamiteBarrel.prefab b/Assets/Prefabs/GunParts/DynamiteBarrel.prefab index c20773776..5af921c73 100644 --- a/Assets/Prefabs/GunParts/DynamiteBarrel.prefab +++ b/Assets/Prefabs/GunParts/DynamiteBarrel.prefab @@ -124,6 +124,8 @@ GameObject: - component: {fileID: 4593536943137362801} - component: {fileID: -4580984059022627980} - component: {fileID: 2432424435679735251} + - component: {fileID: 409957007994980770} + - component: {fileID: 7122751467370419192} m_Layer: 0 m_Name: DynamiteBarrel m_TagString: Untagged @@ -182,12 +184,13 @@ MonoBehaviour: outputs: - {fileID: 4039450451453750485} midpoint: {fileID: 9063465194214752546} - crossHairMode: 0 + crossHairMode: 3 attachmentPoints: - {fileID: 5295543331499923172} muzzleFlash: {fileID: 2901028697059851447} stickyModifer: {fileID: 2432424435679735251} explodingBarrelMesh: {fileID: 2750013030952444713, guid: 225f0cc88b163c5469afdd1e4ab9b70c, type: 3} + meshProjectiles: {fileID: 4593536943137362801} --- !u!114 &4593536943137362801 MonoBehaviour: m_ObjectHideFlags: 0 @@ -247,12 +250,122 @@ MonoBehaviour: stuckObject: {fileID: 1164456291252445790, guid: 2eb9af49dc0f4124a8d06d0a77c5b22c, type: 3} isDespawnedAfterTime: 0 stuckLifeTime: 5 + maxObjects: 20 triggerOnHit: 0 onHitInterval: 1 affectedLayers: serializedVersion: 2 m_Bits: 4294967295 priority: 4 +--- !u!82 &409957007994980770 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5146486171313696063} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 0} + m_PlayOnAwake: 1 + m_Volume: 1 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + reverbZoneMixCustomCurve: + 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 +--- !u!114 &7122751467370419192 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5146486171313696063} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: aae53bd787064924e95013b68e33af86, type: 3} + m_Name: + m_EditorClassIdentifier: + firingSound: {fileID: 11400000, guid: 83ebc3c9a2cdc6049822b4ea1e94340d, type: 2} --- !u!1 &5383569926040901172 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Prefabs/Input/AITargetPosition.prefab b/Assets/Prefabs/Input/AITargetPosition.prefab index 2e9710862..6feae2c5e 100644 --- a/Assets/Prefabs/Input/AITargetPosition.prefab +++ b/Assets/Prefabs/Input/AITargetPosition.prefab @@ -14,7 +14,7 @@ GameObject: - component: {fileID: 3354261919955842085} m_Layer: 2 m_Name: AITargetPosition - m_TagString: Untagged + m_TagString: NoDecal m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 diff --git a/Assets/Prefabs/UI/LoadingScreen.prefab b/Assets/Prefabs/UI/LoadingScreen.prefab index 3e6803343..9a3917099 100644 --- a/Assets/Prefabs/UI/LoadingScreen.prefab +++ b/Assets/Prefabs/UI/LoadingScreen.prefab @@ -165,6 +165,15 @@ MonoBehaviour: - The pan extension can do a super slide by performing a leap directly into a pan skate! - Some barrels grant extra damage on headshots! + - Combining the BOOM-bardier barrel with the Fire + extension lets you detonate the dynamites before + they hit the ground! + - Combining the BOOM-bardier barrel with the Fire + extension lets you detonate the dynamites before + they hit the ground! + - Combining the BOOM-bardier barrel with the Enlarger + extension turns your dynamites into explosive + barrels. Trick your opponents by hiding them well! background: {fileID: 8814292908430132048} mandatoryDuration: 4 normalRotationSpeed: 60 diff --git a/Assets/ScriptableObjects/Items/SecretNames/SecretNamesStaticStorage.asset b/Assets/ScriptableObjects/Items/SecretNames/SecretNamesStaticStorage.asset index d0a051d79..45dbd8e5f 100644 --- a/Assets/ScriptableObjects/Items/SecretNames/SecretNamesStaticStorage.asset +++ b/Assets/ScriptableObjects/Items/SecretNames/SecretNamesStaticStorage.asset @@ -118,3 +118,18 @@ MonoBehaviour: Extension: {fileID: 11400000, guid: 6955edf1e31801642a2f47defb820d36, type: 2} Name: The Turbocharged Point&Click Adventure Achievement: 20 + - Body: {fileID: 11400000, guid: bdea3807a64796f4da3038c849234215, type: 2} + Barrel: {fileID: 11400000, guid: 42441b7c0dcc82c43a745456680f2693, type: 2} + Extension: {fileID: 11400000, guid: a0f539379f7384445bc1535317457198, type: 2} + Name: The Unpatient S'ploder + Achievement: 21 + - Body: {fileID: 11400000, guid: 63bf1979c291d114b8dfb8d01bb407a9, type: 2} + Barrel: {fileID: 11400000, guid: 42441b7c0dcc82c43a745456680f2693, type: 2} + Extension: {fileID: 11400000, guid: 1e8a76909fc7b284dae3c37ebcf4d7ce, type: 2} + Name: The Barrel Imposter + Achievement: 22 + - Body: {fileID: 11400000, guid: a99e4b806f963ac45a0635c34182107a, type: 2} + Barrel: {fileID: 11400000, guid: 42441b7c0dcc82c43a745456680f2693, type: 2} + Extension: {fileID: 11400000, guid: 87e98f42380f122a486cd5034ef1d278, type: 2} + Name: The Tactical Strike + Achievement: 23 diff --git a/Assets/Scripts/Augment/AugmentImplementations/DynamiteBarrel.cs b/Assets/Scripts/Augment/AugmentImplementations/DynamiteBarrel.cs index 5e6fba6bb..9290dd350 100644 --- a/Assets/Scripts/Augment/AugmentImplementations/DynamiteBarrel.cs +++ b/Assets/Scripts/Augment/AugmentImplementations/DynamiteBarrel.cs @@ -1,3 +1,4 @@ +using Mirror; using System.Collections; using System.Collections.Generic; using System.Linq; @@ -14,6 +15,9 @@ public class DynamiteBarrel : GunBarrel private bool isDetonatableEarly = false; [SerializeField] private MeshProjectileController meshProjectiles; + private SateliteUplink sateliteUplink; + + void Start() { gunController = transform.parent.GetComponent(); @@ -28,17 +32,20 @@ void Start() GetComponent().Vfx.SetMesh("Mesh", explodingBarrelMesh); // If fire extension, dynamites should be able to explode while in air - //if (gunController.GetComponentInChildren()) - // isDetonatableEarly = true; + if (gunController.GetComponentInChildren()) + isDetonatableEarly = true; + else + sateliteUplink = gunController.GetComponentInChildren(); if (gunController.Player is AIManager) { StartCoroutine(TryDetonating()); return; - } - + } + syncDirection = SyncDirection.ClientToServer; gunController.Player.GetComponent().ResetZoom(); - gunController.Player.inputManager.onZoomPerformed += OnZoom; + if (gunController.Player.inputManager) + gunController.Player.inputManager.onZoomPerformed += OnZoom; } private void AddDynamite(StuckObject stuckObject) @@ -47,6 +54,7 @@ private void AddDynamite(StuckObject stuckObject) return; var stuckDynamite = (StickyDynamite)stuckObject; activeDynamites.Add(stuckDynamite); + stuckDynamite.ResetDynamite(); if (Projectile.stats.ProjectileScale >= 3) stuckDynamite.SetBarrel(); @@ -66,12 +74,39 @@ private IEnumerator TryDetonating() private void OnZoom(InputAction.CallbackContext ctx) { + if (authority) + CmdDetonate(); + } + + [Command] + private void CmdDetonate() + { + RpcDetonate(); + } + + [ClientRpc] + private void RpcDetonate() + { + if (isDetonatableEarly) + { + var explosivePositions = meshProjectiles.ProjectilePositions; + explosivePositions.ToList().ForEach(position => + { + var dynamite = (StickyDynamite)stickyModifer.InstantiateManual(position); + dynamite.Explosion.Init(); + activeDynamites.Add(dynamite); + }); + meshProjectiles.ClearProjectiles(); + } + else if (sateliteUplink) + sateliteUplink.TargetManual(activeDynamites + .Select(dynamite => dynamite.transform.position)); + + if (authority && activeDynamites.Count > 0 && gunController.Player.HUDController) + gunController.Player.HUDController.CrossHairDetonationAnimation(); + activeDynamites.ForEach(dynamite => dynamite.Detonate(gunController.Player)); activeDynamites.Clear(); - if (!isDetonatableEarly) - return; - var explosivePositions = meshProjectiles.ProjectilePositions; - meshProjectiles.ClearProjectiles(); } private void OnDeath(PlayerManager killer, PlayerManager victim, DamageInfo info) @@ -84,7 +119,7 @@ private void OnDeath(PlayerManager killer, PlayerManager victim, DamageInfo info stickyModifer.OnStuckToTarget -= AddDynamite; - if (gunController.Player is not AIManager) + if (gunController.Player is not AIManager && gunController.Player.inputManager) gunController.Player.inputManager.onZoomPerformed -= OnZoom; } @@ -98,7 +133,7 @@ private void OnDestroy() stickyModifer.OnStuckToTarget -= AddDynamite; - if (gunController.Player is not AIManager) + if (gunController.Player is not AIManager && gunController.Player.inputManager) gunController.Player.inputManager.onZoomPerformed -= OnZoom; } } diff --git a/Assets/Scripts/Augment/AugmentImplementations/Hat/MeshProjectileController.cs b/Assets/Scripts/Augment/AugmentImplementations/Hat/MeshProjectileController.cs index c29b6208d..47909ebf1 100644 --- a/Assets/Scripts/Augment/AugmentImplementations/Hat/MeshProjectileController.cs +++ b/Assets/Scripts/Augment/AugmentImplementations/Hat/MeshProjectileController.cs @@ -34,7 +34,9 @@ public class MeshProjectileController : ProjectileController private ProjectileState[] projectiles; - public Vector3[] ProjectilePositions => projectiles.Select(p => p.position).ToArray(); + public Vector3[] ProjectilePositions => + projectiles.Where(p => p != null && p.active == true) + .Select(p => p.position).ToArray(); private ProjectileState loadedProjectile; @@ -106,7 +108,9 @@ private void FireProjectile() public void ClearProjectiles() { - projectiles.ToList().Clear(); + for (int i = 0; i < maxProjectiles; i++) + if (projectiles[i] != null) + projectiles[i].active = false; } [Command] diff --git a/Assets/Scripts/Augment/AugmentImplementations/SateliteUplink.cs b/Assets/Scripts/Augment/AugmentImplementations/SateliteUplink.cs index afdeb186e..458b47f4c 100644 --- a/Assets/Scripts/Augment/AugmentImplementations/SateliteUplink.cs +++ b/Assets/Scripts/Augment/AugmentImplementations/SateliteUplink.cs @@ -5,6 +5,7 @@ using TMPro; using UnityEngine; using Mirror; +using System.Linq; public class SateliteUplink : NetworkBehaviour, ProjectileModifier { @@ -123,7 +124,7 @@ public void Detach(ProjectileController projectile) { projectile.OnProjectileInit -= Track; projectile.OnColliderHit -= Target; - projectile.OnRicochet += Target; + projectile.OnRicochet -= Target; garbagePool.Flush(); garbagePool = null; targetingReticlePool.Flush(); @@ -155,6 +156,14 @@ private void Target(RaycastHit hit, ref ProjectileState state) Launch(hit.point); } + public void TargetManual(IEnumerable positions) + { + if (!isReady) + return; + positions.ToList().ForEach(position => Launch(position)); + RestartCooldown(); + } + private void Launch(Vector3 target) { if (!gunController) diff --git a/Assets/Scripts/Augment/AugmentImplementations/StickyDynamite.cs b/Assets/Scripts/Augment/AugmentImplementations/StickyDynamite.cs index a69ff2e67..1dcf6a28a 100644 --- a/Assets/Scripts/Augment/AugmentImplementations/StickyDynamite.cs +++ b/Assets/Scripts/Augment/AugmentImplementations/StickyDynamite.cs @@ -16,6 +16,23 @@ public class StickyDynamite : StuckObject private VisualEffect[] barrelSmoke; [SerializeField] private ExplosionController explosion; + public ExplosionController Explosion => explosion; + + private void OnEnable() + { + ResetDynamite(); + } + + public void ResetDynamite() + { + explosion.StopAllCoroutines(); + mesh.enabled = true; + smoke.enabled = true; + if (explosion.transform.parent) + explosion.transform.parent.gameObject.SetActive(true); + explosion.gameObject.SetActive(true); + explosion.Init(); + } public void SetBarrel() { @@ -31,7 +48,11 @@ public void Detonate(PlayerManager sourcePlayer) explosiveBarrel.enabled = false; smoke.enabled = false; barrelSmoke.ToList().ForEach(smoke => smoke.enabled = false); - explosion.Explode(sourcePlayer); - explosion.transform.parent.parent = null; + // Double check that dynamite hasn't been taken by the pool before exploding + if (explosion.gameObject.activeSelf) + { + explosion.Explode(sourcePlayer); + explosion.transform.parent.parent = null; + } } } diff --git a/Assets/Scripts/Augment/BulletModifiers/DecalModifier.cs b/Assets/Scripts/Augment/BulletModifiers/DecalModifier.cs index dd25b9a5f..bd66c33fc 100644 --- a/Assets/Scripts/Augment/BulletModifiers/DecalModifier.cs +++ b/Assets/Scripts/Augment/BulletModifiers/DecalModifier.cs @@ -94,6 +94,8 @@ private Quaternion DetermineRotation(Collider target, ProjectileState state) private void OnDestroy() { + if (decalPool == null) + return; decalPool.Flush(); decalPool = null; } diff --git a/Assets/Scripts/Augment/BulletModifiers/StickyProjectileModifier.cs b/Assets/Scripts/Augment/BulletModifiers/StickyProjectileModifier.cs index 7b215d4cc..e6f600196 100644 --- a/Assets/Scripts/Augment/BulletModifiers/StickyProjectileModifier.cs +++ b/Assets/Scripts/Augment/BulletModifiers/StickyProjectileModifier.cs @@ -15,6 +15,8 @@ public class StickyProjectileModifier : MonoBehaviour, ProjectileModifier private bool isDespawnedAfterTime = true; [SerializeField] private float stuckLifeTime = 5f; + [SerializeField] + private int maxObjects = 70; // Does stuck object trigger onHit? [SerializeField] private bool triggerOnHit = true; @@ -43,7 +45,7 @@ public Priority GetPriority() public void Attach(ProjectileController projectile) { - stuckObjects = new ObjectPool(stuckObject); + stuckObjects = new ObjectPool(stuckObject, maxObjects); projectile.OnColliderHit += StickToTarget; scale = stuckObject.transform.localScale * projectile.stats.ProjectileScale; source = projectile.player; @@ -64,7 +66,7 @@ public void StickToTarget(RaycastHit hit, ref ProjectileState state) var stuck = isDespawnedAfterTime ? stuckObjects.GetAndReturnLater(stuckLifeTime) - : stuckObjects.Get(); + : stuckObjects.Get(); stuck.transform.position = hit.ClosestPoint(state.oldPosition); stuck.transform.localScale = scale; @@ -76,6 +78,17 @@ public void StickToTarget(RaycastHit hit, ref ProjectileState state) continuousDamage.source = source; } + public StuckObject InstantiateManual(Vector3 position) + { + var stuck = isDespawnedAfterTime ? + stuckObjects.GetAndReturnLater(stuckLifeTime) + : stuckObjects.Get(); + + stuck.transform.position = position; + stuck.transform.localScale = scale; + return stuck; + } + private void OnDestroy() { if (stuckObjects == null) diff --git a/Assets/Scripts/Augment/FiringSound.cs b/Assets/Scripts/Augment/FiringSound.cs index dd6ad2272..100b2275b 100644 --- a/Assets/Scripts/Augment/FiringSound.cs +++ b/Assets/Scripts/Augment/FiringSound.cs @@ -18,7 +18,8 @@ private void Start() private void OnDestroy() { - projectile.OnProjectileInit -= PlaySound; + if (projectile != null) + projectile.OnProjectileInit -= PlaySound; } private void PlaySound(ref ProjectileState state, GunStats stats) diff --git a/Assets/Scripts/Augment/GunStats.cs b/Assets/Scripts/Augment/GunStats.cs index 536ea4d13..18e047de7 100644 --- a/Assets/Scripts/Augment/GunStats.cs +++ b/Assets/Scripts/Augment/GunStats.cs @@ -156,6 +156,7 @@ public enum CrossHairModes Default, Shotgun, Hat, + Dynamite, } public CrossHairModes CrossHairMode { get; set; } [SerializeField] diff --git a/Assets/Scripts/ExplosionController.cs b/Assets/Scripts/ExplosionController.cs index 52b9de526..f283e01b4 100644 --- a/Assets/Scripts/ExplosionController.cs +++ b/Assets/Scripts/ExplosionController.cs @@ -1,5 +1,7 @@ -using System.Collections.Generic; +using System.Collections; +using System.Collections.Generic; using System.Linq; +using System.Runtime.CompilerServices; using UnityEngine; using UnityEngine.VFX; @@ -73,10 +75,26 @@ public void OnDrawGizmos() if (shouldBeReturned) hits.Add((target, scaledDamage)); } - Destroy(gameObject, 4); + if (gameObject.activeSelf) + StartCoroutine(WaitAndDeactivate()); return hits; } + private IEnumerator WaitAndDeactivate() + { + yield return new WaitForSeconds(4); + if (transform.parent) + transform.parent.gameObject.SetActive(false); + else + gameObject.SetActive(false); + } + + private void OnDisable() + { + visualEffects.ForEach(vfx => vfx.enabled = false); + StopAllCoroutines(); + } + private void DealDamage(Collider target, PlayerManager sourcePlayer, out bool shouldBeReturned, out float scaledDamage) { scaledDamage = 0; diff --git a/Assets/Scripts/Gamestate/PlayerManager.cs b/Assets/Scripts/Gamestate/PlayerManager.cs index 1411823dd..40e82ac29 100644 --- a/Assets/Scripts/Gamestate/PlayerManager.cs +++ b/Assets/Scripts/Gamestate/PlayerManager.cs @@ -178,7 +178,11 @@ private void UpdateAimAngleRpc(float yAngle) private void OnDamageTaken(HealthController healthController, float damage, DamageInfo info) { if (hudController) - hudController.OnDamageTaken(damage, healthController.CurrentHealth, healthController.MaxHealth); + hudController.OnDamageTaken(healthController.CurrentHealth, healthController.MaxHealth); + + if (info.damageType == DamageType.Explosion) + ScreenShake(info.damage * 0.005f); + if (info.sourcePlayer != this) { lastPlayerThatHitMe = info.sourcePlayer; @@ -446,6 +450,20 @@ private void ScreenShake(GunStats stats) screenShakeTween = inputManager.PlayerCamera.gameObject.LeanMoveLocal(new Vector3(0.02f, 0.02f, 0f) * stats.ScreenShakeFactor, 0.1f).setEaseShake().id; } + private void ScreenShake(float amount) + { + if (!inputManager) + return; + if (LeanTween.isTweening(screenShakeTween)) + { + LeanTween.cancel(screenShakeTween); + inputManager.PlayerCamera.gameObject.transform.localPosition = Vector3.zero; + } + var viewDirection = inputManager.PlayerCamera.transform.up; + screenShakeTween = inputManager.PlayerCamera.gameObject + .LeanMoveLocal(viewDirection * amount, 0.2f).setEaseShake().id; + } + public virtual void SetLayer(int playerIndex) { layerIndex = playerIndex; diff --git a/Assets/Scripts/UI/PlayerHUDController.cs b/Assets/Scripts/UI/PlayerHUDController.cs index 6c2ccccea..d349d3c09 100644 --- a/Assets/Scripts/UI/PlayerHUDController.cs +++ b/Assets/Scripts/UI/PlayerHUDController.cs @@ -109,12 +109,14 @@ public class PlayerHUDController : MonoBehaviour // Dampen how much vertical velocity should influence center of speedlines private const float lineVelocityDampeningY = 0.1f; private float crosshairCrossScale = 1.0f; + private float initialCrosshairRadius; [SerializeField] private RectTransform scopeZoom; private int scopeTween; private int hitTween; private int hitMarkTween; + private int crosshairRadiusTween; private void Awake() { @@ -204,7 +206,7 @@ public void AnimateHudJump() .id; } - public void OnDamageTaken(float damage, float currentHealth, float maxHealth) + public void OnDamageTaken(float currentHealth, float maxHealth) { UpdateHealthBar(currentHealth, maxHealth); LeanTween.value(gameObject, UpdateDamageBorder, 0f, 1f, damageBorderFlashDuration); @@ -308,6 +310,8 @@ public void DisplayDeathScreen(PlayerIdentity killer) spectateHintText.gameObject.SetActive(false); ammoHud.parent.gameObject.SetActive(false); speedLines.gameObject.SetActive(false); + // Disable crosshair when spectating + crosshair.rectTransform.sizeDelta *= 0; } public void DisplaySpectateHint() @@ -373,9 +377,27 @@ private void SetHitmarkScale(float scale) crosshairMaterial.SetFloat("_HitMarkerRadius", scale); } + private void SetCrosshairRadius(float radius) + { + crosshairMaterial.SetFloat("_Radius", radius); + } + + public void CrossHairDetonationAnimation() + { + if (LeanTween.isTweening(crosshairRadiusTween)) + { + LeanTween.cancel(crosshairRadiusTween); + crosshairMaterial.SetFloat("_Radius", initialCrosshairRadius); + } + crosshairRadiusTween = LeanTween.value(crosshair.gameObject, SetCrosshairRadius, initialCrosshairRadius, 0f, 0.3f) + .setEaseOutQuint() + .setOnComplete(() => SetCrosshairRadius(initialCrosshairRadius)).id; + } + public void UpdateOnInitialize(GunStats stats) { - crosshairMaterial.SetFloat("_Radius", stats.CrosshairRadius.Value() == 0f ? 0f : 1f / stats.CrosshairRadius.Value()); + initialCrosshairRadius = stats.CrosshairRadius.Value() == 0f ? 0f : 1f / stats.CrosshairRadius.Value(); + crosshairMaterial.SetFloat("_Radius", initialCrosshairRadius); // Has to be done this way as enum keywords in reality are a set of boolean keywords... foreach (CrossHairModes mode in Enum.GetValues(typeof(CrossHairModes))) diff --git a/Assets/Scripts/Utils/SteamManager.cs b/Assets/Scripts/Utils/SteamManager.cs index 7d4f3893b..9944b66a8 100644 --- a/Assets/Scripts/Utils/SteamManager.cs +++ b/Assets/Scripts/Utils/SteamManager.cs @@ -27,6 +27,9 @@ public enum SecretCombinationType Nuke, MadHatter, PointNClick, + UnpatientSploder, + BarrelImposter, + TacticalStrike, } public enum AchievementType @@ -196,6 +199,9 @@ private void RequestStats() { SecretCombinationType.Nuke, "WEAPON_NUKE" }, { SecretCombinationType.MadHatter, "WEAPON_MAD_HATTER" }, { SecretCombinationType.PointNClick, "WEAPON_POINT_CLICK" }, + { SecretCombinationType.UnpatientSploder, "WEAPON_UNPATIENT_SPLODER" }, + { SecretCombinationType.BarrelImposter, "WEAPON_BARREL_IMPOSTER" }, + { SecretCombinationType.TacticalStrike, "WEAPON_TACTICAL_STRIKE" }, }; private readonly Dictionary achievementNames = new() diff --git a/Assets/Shaders/Crosshairs.meta b/Assets/Shaders/Crosshairs.meta new file mode 100644 index 000000000..2fe316897 --- /dev/null +++ b/Assets/Shaders/Crosshairs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 774c98b9c1a2a524297f952a43cbf856 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/CrossHair.hlsl b/Assets/Shaders/Crosshairs/CrossHair.hlsl similarity index 100% rename from Assets/Shaders/CrossHair.hlsl rename to Assets/Shaders/Crosshairs/CrossHair.hlsl diff --git a/Assets/Shaders/CrossHair.hlsl.meta b/Assets/Shaders/Crosshairs/CrossHair.hlsl.meta similarity index 100% rename from Assets/Shaders/CrossHair.hlsl.meta rename to Assets/Shaders/Crosshairs/CrossHair.hlsl.meta diff --git a/Assets/Shaders/Crosshairs/CrossHairDynamite.hlsl b/Assets/Shaders/Crosshairs/CrossHairDynamite.hlsl new file mode 100644 index 000000000..c778ef1d5 --- /dev/null +++ b/Assets/Shaders/Crosshairs/CrossHairDynamite.hlsl @@ -0,0 +1,76 @@ +float2 rotateUVDynamite_float(float2 position, float degrees) +{ + float sinX = sin(degrees); + float cosX = cos(degrees); + float sinY = sin(degrees); + float2x2 rotationMatrix = float2x2(cosX, -sinX, sinY, cosX); + return mul(position, rotationMatrix); +} + +float sphereSDFDynamite_float(float2 pos) +{ + return abs(length(pos) - 1.)-0.05; +} + +float sdCrossDynamite_float(in float2 p, in float2 b, float r) +{ + p = abs(p); p = (p.y>p.x) ? p.yx : p.xy; + float2 q = p - b; + float k = max(q.y,q.x); + float2 w = (k>0.0) ? q : float2(b.y-p.x,-k); + return sign(k)*length(max(w,0.0)) + r; +} + +float sdRoundedXDynamite_float(float2 p, float w, float r) +{ + p = abs(p); + return max(length(p-min(p.x+p.y,w)*0.5) - r, -1. * (length(p) - 0.5)); +} + +float crossSDFDynamite_float(float2 pos, float r) +{ + return abs(sdCrossDynamite_float(pos, float2(0.5 * r, 0.1 * r), 0.1 * r)) - 0.05 * r; +} + + +float sdBoxDynamite_float(float2 p, float2 b) +{ + float2 d = abs(p)-b; + return abs(length(max(d, 0.0)) + min(max(d.x, d.y), 0.0)) - 0.045; +} + +float sdStringDynamite_float(float2 p, float2 b) +{ + float2 d = abs(p) - b; + return length(max(d, 0.0)) + min(max(d.x, d.y), 0.0); +} + +float sdHexagonDynamite_float(float2 p, in float r) +{ + float3 k = float3(-0.866025404,0.5,0.577350269); + p = abs(p); + p -= 2.0*min(dot(k.xy,p),0.0)*k.xy; + p -= float2(clamp(p.x, -k.z*r, k.z*r), r); + return length(p)*sign(p.y); +} + +float sdArcDynamite_float(float2 p, float2 sc, in float ra, float rb) +{ + p.x = abs(p.x); + return ((sc.y*p.x>sc.x*p.y) ? length(p-sc*ra) : + abs(length(p)-ra)) - rb; +} + +float dynamite_float(float2 pos) +{ + float2 rotatedPos = rotateUVDynamite_float(pos, -0.1); + return min( + min(sphereSDFDynamite_float(pos), sdBoxDynamite_float(rotateUVDynamite_float(pos + float2(0.6, -1.), 0.5), 0.2)), + sdStringDynamite_float(float2(rotatedPos.x + sin((rotatedPos -0.15).y * 1.), (rotatedPos.y - 1.85) * 0.1) * 10.8, 0.8)); + +} + +void CrossHairDynamite_float(float2 UV, float crossSize, float circleRadius, float hitMarkerRadius, out float Distance) +{ + Distance = min(dynamite_float(UV * circleRadius * 1.8), crossSDFDynamite_float(UV * 2.8, crossSize)); +} diff --git a/Assets/Shaders/Crosshairs/CrossHairDynamite.hlsl.meta b/Assets/Shaders/Crosshairs/CrossHairDynamite.hlsl.meta new file mode 100644 index 000000000..8a738d80d --- /dev/null +++ b/Assets/Shaders/Crosshairs/CrossHairDynamite.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e685d5027224b4f4f9f7cebfd7e0e43e +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/CrossHairHat.hlsl b/Assets/Shaders/Crosshairs/CrossHairHat.hlsl similarity index 100% rename from Assets/Shaders/CrossHairHat.hlsl rename to Assets/Shaders/Crosshairs/CrossHairHat.hlsl diff --git a/Assets/Shaders/CrossHairHat.hlsl.meta b/Assets/Shaders/Crosshairs/CrossHairHat.hlsl.meta similarity index 100% rename from Assets/Shaders/CrossHairHat.hlsl.meta rename to Assets/Shaders/Crosshairs/CrossHairHat.hlsl.meta diff --git a/Assets/Shaders/CrossHairShotgun.hlsl b/Assets/Shaders/Crosshairs/CrossHairShotgun.hlsl similarity index 100% rename from Assets/Shaders/CrossHairShotgun.hlsl rename to Assets/Shaders/Crosshairs/CrossHairShotgun.hlsl diff --git a/Assets/Shaders/CrossHairShotgun.hlsl.meta b/Assets/Shaders/Crosshairs/CrossHairShotgun.hlsl.meta similarity index 100% rename from Assets/Shaders/CrossHairShotgun.hlsl.meta rename to Assets/Shaders/Crosshairs/CrossHairShotgun.hlsl.meta diff --git a/Assets/Shaders/Crosshair.shadergraph b/Assets/Shaders/Crosshairs/Crosshair.shadergraph similarity index 91% rename from Assets/Shaders/Crosshair.shadergraph rename to Assets/Shaders/Crosshairs/Crosshair.shadergraph index 53c6ca5ee..9ada43bd1 100644 --- a/Assets/Shaders/Crosshair.shadergraph +++ b/Assets/Shaders/Crosshairs/Crosshair.shadergraph @@ -99,6 +99,9 @@ }, { "m_Id": "4d1bf82061c14550a5894919d00b5ec5" + }, + { + "m_Id": "5e14cbcb16ea4175822beec00dda6c67" } ], "m_GroupDatas": [], @@ -164,6 +167,20 @@ "m_SlotId": 1 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "347bc1c64428488085911aea9ecd6920" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "5e14cbcb16ea4175822beec00dda6c67" + }, + "m_SlotId": 1 + } + }, { "m_OutputSlot": { "m_Node": { @@ -234,6 +251,34 @@ "m_SlotId": 1 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "5e14cbcb16ea4175822beec00dda6c67" + }, + "m_SlotId": 4 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "2b5cf5822378467c8ffa4e4037ea7b1f" + }, + "m_SlotId": 5 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "69ee95579277414b976cc4f92ccee9b9" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "5e14cbcb16ea4175822beec00dda6c67" + }, + "m_SlotId": 3 + } + }, { "m_OutputSlot": { "m_Node": { @@ -332,6 +377,20 @@ "m_SlotId": 2 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "bd1450a953c049f0a08aab0a999ef74f" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "5e14cbcb16ea4175822beec00dda6c67" + }, + "m_SlotId": 2 + } + }, { "m_OutputSlot": { "m_Node": { @@ -430,6 +489,20 @@ "m_SlotId": 3 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "f36957f8bb334884ae1c5cfd6aa3f78c" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "5e14cbcb16ea4175822beec00dda6c67" + }, + "m_SlotId": 0 + } + }, { "m_OutputSlot": { "m_Node": { @@ -682,6 +755,27 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "0f96ecddfa594b16ab72b9972edb31f6", + "m_Id": 0, + "m_DisplayName": "UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.TilingAndOffsetNode", @@ -748,6 +842,21 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "1735833bcca8468f979a7c1aa400bb3b", + "m_Id": 1, + "m_DisplayName": "CrossSize", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "CrossSize", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + { "m_SGVersion": 1, "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", @@ -1053,6 +1162,9 @@ }, { "m_Id": "fffbf0a1a01b47c1aa24fb74af11cd4a" + }, + { + "m_Id": "34129ca3f8834325b4ac754d544521c6" } ], "synonyms": [], @@ -1126,6 +1238,30 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "34129ca3f8834325b4ac754d544521c6", + "m_Id": 5, + "m_DisplayName": "Dynamite", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "DYNAMITE", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.PropertyNode", @@ -1138,10 +1274,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -1232.800048828125, - "y": 451.20001220703127, - "width": 127.2000732421875, - "height": 33.5999755859375 + "x": -1296.800048828125, + "y": 432.7999572753906, + "width": 128.0, + "height": 33.600006103515628 } }, "m_Slots": [ @@ -1305,6 +1441,11 @@ "id": 4, "displayName": "Hat", "referenceName": "HAT" + }, + { + "id": 5, + "displayName": "Dynamite", + "referenceName": "DYNAMITE" } ], "m_Value": 0, @@ -1545,6 +1686,58 @@ "m_Labels": [] } +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode", + "m_ObjectId": "5e14cbcb16ea4175822beec00dda6c67", + "m_Group": { + "m_Id": "" + }, + "m_Name": "CrossHairDynamite (Custom Function)", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1008.0000610351563, + "y": 1716.800048828125, + "width": 208.0, + "height": 244.7999267578125 + } + }, + "m_Slots": [ + { + "m_Id": "0f96ecddfa594b16ab72b9972edb31f6" + }, + { + "m_Id": "1735833bcca8468f979a7c1aa400bb3b" + }, + { + "m_Id": "6224074fd0a144b280be3a5866500622" + }, + { + "m_Id": "dd500391bbf646e4998528385c7f24fa" + }, + { + "m_Id": "684f62bb860142a3867f929aaaa6ba37" + } + ], + "synonyms": [ + "code", + "HLSL" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SourceType": 0, + "m_FunctionName": "CrossHairDynamite", + "m_FunctionSource": "e685d5027224b4f4f9f7cebfd7e0e43e", + "m_FunctionBody": "Enter function body here..." +} + { "m_SGVersion": 1, "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", @@ -1573,6 +1766,21 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "6224074fd0a144b280be3a5866500622", + "m_Id": 2, + "m_DisplayName": "CircleRadius", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "CircleRadius", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", @@ -1645,6 +1853,21 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "684f62bb860142a3867f929aaaa6ba37", + "m_Id": 4, + "m_DisplayName": "Distance", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Distance", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.PropertyNode", @@ -1657,9 +1880,9 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -1315.199951171875, - "y": 680.0, - "width": 162.39990234375, + "x": -1432.0, + "y": 752.7999877929688, + "width": 161.5999755859375, "height": 33.60003662109375 } }, @@ -2400,10 +2623,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -1288.0, - "y": 548.0, + "x": -1380.800048828125, + "y": 581.5999145507813, "width": 110.4000244140625, - "height": 33.5999755859375 + "height": 33.60003662109375 } }, "m_Slots": [ @@ -2775,6 +2998,21 @@ "m_Labels": [] } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "dd500391bbf646e4998528385c7f24fa", + "m_Id": 3, + "m_DisplayName": "HitMarkerRadius", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "HitMarkerRadius", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", diff --git a/Assets/Shaders/Crosshair.shadergraph.meta b/Assets/Shaders/Crosshairs/Crosshair.shadergraph.meta similarity index 100% rename from Assets/Shaders/Crosshair.shadergraph.meta rename to Assets/Shaders/Crosshairs/Crosshair.shadergraph.meta