From b53e4aec8c08dd3cab5e1b7ebb94d5c4ce66c6e7 Mon Sep 17 00:00:00 2001 From: Reinier Vens Date: Fri, 26 Feb 2021 19:01:47 +0000 Subject: [PATCH] Combat & Visibility & Collisions Converted entity materials to new fade shader Implemented visibility system Refactored per-instance entity code to run inside monobehavior on entity instances Created state machine AI for enemy ships with basic patrol and combat routines Removed legacy AI code (controller item behaviors) Added automatic trigger group assignment for matched weapons Created ship collision system Created shield VFX and colliders --- .../.idea/contentModel.xml | 38 +- Assembly-CSharp.csproj | 22 +- Assets/Audio.meta | 8 + Assets/Audio/Music.meta | 8 + Assets/BGM.mixer | 172 +++++ Assets/BGM.mixer.meta | 8 + Assets/Materials/Aluminium brushed.mat | 91 +++ Assets/Materials/Aluminium brushed.mat.meta | 8 + Assets/Materials/Asteroids.mat | 2 +- Assets/Materials/Black.mat | 12 +- Assets/Materials/Car Paint Magenta.mat | 57 ++ Assets/Materials/Car Paint Magenta.mat.meta | 8 + Assets/Materials/Car Paint Red.mat | 91 +++ Assets/Materials/Car Paint Red.mat.meta | 8 + Assets/Materials/Car Paint White Small.mat | 91 +++ .../Materials/Car Paint White Small.mat.meta | 8 + Assets/Materials/Car Paint White.mat | 57 ++ Assets/Materials/Car Paint White.mat.meta | 8 + Assets/Materials/Cockpit.mat | 91 +++ Assets/Materials/Cockpit.mat.meta | 8 + Assets/Materials/Headlights.mat | 2 +- Assets/Materials/Invisible.mat | 78 +++ Assets/Materials/Invisible.mat.meta | 8 + Assets/{Models => Materials}/Metal 003.mat | 0 .../{Models => Materials}/Metal 003.mat.meta | 0 Assets/Materials/Radiators.mat | 10 +- Assets/Materials/Reflective.mat | 78 +++ Assets/Materials/Reflective.mat.meta | 8 + Assets/Materials/Silver.mat | 91 +++ Assets/Materials/Silver.mat.meta | 8 + Assets/Materials/Skybox.mat | 6 +- Assets/Materials/Station Lights.mat | 10 +- .../{Models => Materials}/Steel brushed.mat | 0 .../Steel brushed.mat.meta | 0 Assets/Materials/Steel parkerized.mat | 91 +++ Assets/Materials/Steel parkerized.mat.meta | 8 + Assets/Materials/Steel.mat | 91 +++ Assets/Materials/Steel.mat.meta | 8 + .../Substance/Metal/metal_brass.sbsar.meta | 12 +- .../Metal/metal_car_paint Magenta.sbsar.meta | 8 +- .../Metal/metal_car_paint white.sbsar.meta | 8 +- Assets/Materials/Substance/marble_002.sbsar | 3 + .../Materials/Substance/marble_002.sbsar.meta | 296 +++++++++ Assets/Materials/UI/Map Gravity Lines.mat | 2 +- Assets/Materials/UI/Shield.mat | 102 +++ Assets/Materials/UI/Shield.mat.meta | 8 + Assets/Models/Discobolus.meta | 8 + .../Models/Discobolus/Discobolus Bronze.mat | 80 +++ .../Discobolus/Discobolus Bronze.mat.meta | 8 + .../Models/Discobolus/Discobolus Marble.mat | 80 +++ .../Discobolus/Discobolus Marble.mat.meta | 8 + Assets/Models/Discobolus/discobolus.fbx | 3 + Assets/Models/Discobolus/discobolus.fbx.meta | 102 +++ Assets/Models/Discobolus/discobolus.prefab | 83 +++ .../Models/Discobolus/discobolus.prefab.meta | 7 + Assets/Models/Discobolus/discobolus_ao.png | 3 + .../Models/Discobolus/discobolus_ao.png.meta | 96 +++ .../Models/Discobolus/discobolus_normal.png | 3 + .../Discobolus/discobolus_normal.png.meta | 96 +++ Assets/Models/Icosphere.fbx | 3 + Assets/Models/Icosphere.fbx.meta | 102 +++ Assets/Models/Icosphere.png | 3 + Assets/Models/Icosphere.png.meta | 108 ++++ Assets/Models/Icosphere.psd | 3 + Assets/Models/Icosphere.psd.meta | 96 +++ Assets/Models/IcosphereHigh.fbx | 3 + Assets/Models/IcosphereHigh.fbx.meta | 102 +++ Assets/Models/mine.blend | 4 +- Assets/Models/mine.blend1 | Bin 1064712 -> 1064712 bytes Assets/MusicTest.cs | 20 + ...elocityMatch.cs.meta => MusicTest.cs.meta} | 2 +- Assets/Resources/Prefabs/Shield.prefab | 367 +++++++++++ Assets/Resources/Prefabs/Shield.prefab.meta | 7 + Assets/Resources/Prefabs/Ships/Djinni.prefab | 140 +++- .../Resources/Prefabs/Ships/Longinus.prefab | 245 ++++++- .../Resources/Prefabs/Stations/Zenith.prefab | 27 +- .../Resources/Prefabs/Turrets/Turret.prefab | 33 +- Assets/Resources/Settings.asset | 4 +- .../Resources/Sun Albedo/sunsurface1map 1.png | 3 + .../Sun Albedo/sunsurface1map 1.png.meta | 123 ++++ .../Sun Flow/sunsurface1offset 1.png | 3 + .../Sun Flow/sunsurface1offset 1.png.meta | 123 ++++ .../Sun Flow/sunsurface1offset.png.meta | 4 +- .../Sun Flow/sunsurface2offset.png.meta | 4 +- Assets/Scenes/ARPG.meta | 8 + Assets/Scenes/ARPG.unity | 112 +++- Assets/Scenes/ARPG/LightingData.asset | 3 + Assets/Scenes/ARPG/LightingData.asset.meta | 8 + Assets/Scenes/ARPG/ReflectionProbe-0.exr | 3 + Assets/Scenes/ARPG/ReflectionProbe-0.exr.meta | 96 +++ Assets/Scenes/ARPG/ReflectionProbe-1.exr | 3 + Assets/Scenes/ARPG/ReflectionProbe-1.exr.meta | 96 +++ .../Postprocessing Profile.asset | 4 +- Assets/Scenes/LightningTestScene.meta | 8 + Assets/Scenes/LightningTestScene.unity | 169 ++++- .../LightningTestScene/LightingData.asset | 3 + .../LightingData.asset.meta | 8 + .../LightningTestScene/ReflectionProbe-0.exr | 3 + .../ReflectionProbe-0.exr.meta | 96 +++ Assets/Scenes/MusicTest.unity | 605 ++++++++++++++++++ Assets/Scenes/MusicTest.unity.meta | 7 + Assets/Scripts/Gameplay/ActionGameManager.cs | 66 +- Assets/Scripts/Gameplay/EntityInstance.cs | 450 +++++++++++++ ...yPrefab.cs.meta => EntityInstance.cs.meta} | 0 Assets/Scripts/Gameplay/EntityPrefab.cs | 16 - Assets/Scripts/Gameplay/HullCollider.cs | 10 +- Assets/Scripts/Gameplay/ShipInstance.cs | 72 +++ Assets/Scripts/Gameplay/ShipInstance.cs.meta | 3 + .../Weapons/ConstantParticleWeapon.cs | 6 +- .../Gameplay/Weapons/GuidedProjectile.cs | 1 - .../Weapons/GuidedProjectileManager.cs | 8 +- Assets/Scripts/Gameplay/Weapons/Mine.cs | 2 +- .../Scripts/Sector Display/SectorRenderer.cs | 392 ++---------- .../Scripts/Sector Display/VolumeSampling.cs | 53 ++ Assets/Scripts/ServerShared/AetheriaMath.cs | 3 + Assets/Scripts/ServerShared/Agents/Agent.cs | 96 +++ .../{AgentBehavior.cs.meta => Agent.cs.meta} | 0 .../ServerShared/Agents/AgentBehavior.cs | 203 ------ .../Scripts/ServerShared/Agents/Locomotion.cs | 58 -- Assets/Scripts/ServerShared/Agents/Minion.cs | 23 + .../ServerShared/Agents/Minion.cs.meta | 3 + .../Scripts/ServerShared/Agents/States.meta | 3 + .../ServerShared/Agents/States/BaseState.cs | 63 ++ .../Agents/States/BaseState.cs.meta | 3 + .../ServerShared/Agents/States/Combat.cs | 150 +++++ .../ServerShared/Agents/States/Combat.cs.meta | 3 + .../Agents/States/MatchVelocity.cs | 32 + .../Agents/States/MatchVelocity.cs.meta | 3 + .../ServerShared/Agents/States/MoveTo.cs | 44 ++ .../ServerShared/Agents/States/MoveTo.cs.meta | 3 + Assets/Scripts/ServerShared/Agents/Tasks.meta | 3 + .../Agents/{ => Tasks}/AgentTask.cs | 5 - .../Agents/{ => Tasks}/AgentTask.cs.meta | 0 .../Agents/{ => Tasks}/HaulingTask.cs | 0 .../Agents/{ => Tasks}/HaulingTask.cs.meta | 0 .../ServerShared/Agents/{ => Tasks}/Mining.cs | 0 .../Agents/{ => Tasks}/Mining.cs.meta | 0 .../ServerShared/Agents/Tasks/PatrolOrbits.cs | 31 + .../Agents/Tasks/PatrolOrbits.cs.meta | 3 + .../Agents/{ => Tasks}/StationTowing.cs | 0 .../Agents/{ => Tasks}/StationTowing.cs.meta | 0 .../ServerShared/Agents/{ => Tasks}/Survey.cs | 0 .../Agents/{ => Tasks}/Survey.cs.meta | 0 .../Agents/{ => Tasks}/WanderTask.cs | 0 .../Agents/{ => Tasks}/WanderTask.cs.meta | 0 .../ServerShared/Agents/VelocityMatch.cs | 63 -- .../ServerShared/Behaviors/Behaviors.cs | 20 +- .../ServerShared/Behaviors/ChargedWeapon.cs | 9 + .../ServerShared/Behaviors/ConstantWeapon.cs | 6 + .../ServerShared/Behaviors/Controller.cs | 257 -------- .../Behaviors/HaulingController.cs | 286 ++++----- .../ServerShared/Behaviors/InstantWeapon.cs | 18 +- .../ServerShared/Behaviors/LockWeapon.cs | 10 +- .../Behaviors/MiningController.cs | 256 ++++---- .../Behaviors/PatrolController.cs | 63 -- .../Scripts/ServerShared/Behaviors/Sensor.cs | 31 +- .../Behaviors/SurveyController.cs | 282 ++++---- .../Behaviors/TowingController.cs | 182 +++--- .../Behaviors/TurretController.cs | 2 +- .../Behaviors/WanderController.cs | 128 ++-- .../Scripts/ServerShared/Behaviors/Weapon.cs | 2 + Assets/Scripts/ServerShared/Entity.cs | 227 ++++--- .../Scripts/ServerShared/EntitySerializer.cs | 10 +- Assets/Scripts/ServerShared/Extensions.cs | 10 +- Assets/Scripts/ServerShared/Noise1D.cs | 8 +- Assets/Scripts/ServerShared/Settings.cs | 4 + Assets/Scripts/ServerShared/Ship.cs | 11 +- Assets/Scripts/UI/InventoryPanel.cs | 2 +- .../Shaders/Compute/Stardust/Stardust.shader | 2 +- Assets/Shaders/DitheredParticles.shader | 1 + Assets/Shaders/GlowFade.shader | 88 +++ Assets/Shaders/GlowFade.shader.meta | 10 + .../Shaders/Raymarching/VolumeRender.shader | 12 +- Assets/Shaders/Shield.shader | 133 ++++ Assets/Shaders/Shield.shader.meta | 9 + .../Shaders/ViewNormalEmissiveGlowFade.shader | 113 ++++ .../ViewNormalEmissiveGlowFade.shader.meta | 3 + Assets/ShieldAnimation.cs | 41 ++ ...roller.cs.meta => ShieldAnimation.cs.meta} | 2 +- Assets/ShieldManager.cs | 47 ++ ...ntroller.cs.meta => ShieldManager.cs.meta} | 2 +- Assets/ShieldTest.cs | 23 + .../Locomotion.cs.meta => ShieldTest.cs.meta} | 2 +- Assets/Steel.mat | 83 +++ Assets/Steel.mat.meta | 8 + Assets/Textures/Clouds.tif.meta | 6 +- Assets/Textures/clouds.png | 3 + Assets/Textures/clouds.png.meta | 108 ++++ Assets/Textures/dissolve.jpg | 3 + Assets/Textures/dissolve.jpg.meta | 96 +++ Assets/Textures/studio.hdr | 3 + Assets/Textures/studio.hdr.meta | 108 ++++ Assets/Textures/studio2.hdr | 3 + Assets/Textures/studio2.hdr.meta | 108 ++++ Assets/Textures/studio3.hdr | 3 + Assets/Textures/studio3.hdr.meta | 108 ++++ Economy.Shared.Unity.csproj | 26 +- GameData/Loadouts/Djinni.preset | Bin 5258 -> 7259 bytes GameData/Loadouts/Longinus.preset | Bin 3807 -> 6112 bytes GameData/Loadouts/Turret.preset | Bin 1737 -> 4042 bytes ProjectSettings/DynamicsManager.asset | 4 +- ProjectSettings/SceneTemplateSettings.json | 167 +++++ ProjectSettings/TagManager.asset | 4 +- UserSettings/EditorUserSettings.asset | 4 +- 204 files changed, 8182 insertions(+), 1919 deletions(-) create mode 100644 Assets/Audio.meta create mode 100644 Assets/Audio/Music.meta create mode 100644 Assets/BGM.mixer create mode 100644 Assets/BGM.mixer.meta create mode 100644 Assets/Materials/Aluminium brushed.mat create mode 100644 Assets/Materials/Aluminium brushed.mat.meta create mode 100644 Assets/Materials/Car Paint Magenta.mat create mode 100644 Assets/Materials/Car Paint Magenta.mat.meta create mode 100644 Assets/Materials/Car Paint Red.mat create mode 100644 Assets/Materials/Car Paint Red.mat.meta create mode 100644 Assets/Materials/Car Paint White Small.mat create mode 100644 Assets/Materials/Car Paint White Small.mat.meta create mode 100644 Assets/Materials/Car Paint White.mat create mode 100644 Assets/Materials/Car Paint White.mat.meta create mode 100644 Assets/Materials/Cockpit.mat create mode 100644 Assets/Materials/Cockpit.mat.meta create mode 100644 Assets/Materials/Invisible.mat create mode 100644 Assets/Materials/Invisible.mat.meta rename Assets/{Models => Materials}/Metal 003.mat (100%) rename Assets/{Models => Materials}/Metal 003.mat.meta (100%) create mode 100644 Assets/Materials/Reflective.mat create mode 100644 Assets/Materials/Reflective.mat.meta create mode 100644 Assets/Materials/Silver.mat create mode 100644 Assets/Materials/Silver.mat.meta rename Assets/{Models => Materials}/Steel brushed.mat (100%) rename Assets/{Models => Materials}/Steel brushed.mat.meta (100%) create mode 100644 Assets/Materials/Steel parkerized.mat create mode 100644 Assets/Materials/Steel parkerized.mat.meta create mode 100644 Assets/Materials/Steel.mat create mode 100644 Assets/Materials/Steel.mat.meta create mode 100644 Assets/Materials/Substance/marble_002.sbsar create mode 100644 Assets/Materials/Substance/marble_002.sbsar.meta create mode 100644 Assets/Materials/UI/Shield.mat create mode 100644 Assets/Materials/UI/Shield.mat.meta create mode 100644 Assets/Models/Discobolus.meta create mode 100644 Assets/Models/Discobolus/Discobolus Bronze.mat create mode 100644 Assets/Models/Discobolus/Discobolus Bronze.mat.meta create mode 100644 Assets/Models/Discobolus/Discobolus Marble.mat create mode 100644 Assets/Models/Discobolus/Discobolus Marble.mat.meta create mode 100644 Assets/Models/Discobolus/discobolus.fbx create mode 100644 Assets/Models/Discobolus/discobolus.fbx.meta create mode 100644 Assets/Models/Discobolus/discobolus.prefab create mode 100644 Assets/Models/Discobolus/discobolus.prefab.meta create mode 100644 Assets/Models/Discobolus/discobolus_ao.png create mode 100644 Assets/Models/Discobolus/discobolus_ao.png.meta create mode 100644 Assets/Models/Discobolus/discobolus_normal.png create mode 100644 Assets/Models/Discobolus/discobolus_normal.png.meta create mode 100644 Assets/Models/Icosphere.fbx create mode 100644 Assets/Models/Icosphere.fbx.meta create mode 100644 Assets/Models/Icosphere.png create mode 100644 Assets/Models/Icosphere.png.meta create mode 100644 Assets/Models/Icosphere.psd create mode 100644 Assets/Models/Icosphere.psd.meta create mode 100644 Assets/Models/IcosphereHigh.fbx create mode 100644 Assets/Models/IcosphereHigh.fbx.meta create mode 100644 Assets/MusicTest.cs rename Assets/{Scripts/ServerShared/Agents/VelocityMatch.cs.meta => MusicTest.cs.meta} (83%) create mode 100644 Assets/Resources/Prefabs/Shield.prefab create mode 100644 Assets/Resources/Prefabs/Shield.prefab.meta create mode 100644 Assets/Resources/Sun Albedo/sunsurface1map 1.png create mode 100644 Assets/Resources/Sun Albedo/sunsurface1map 1.png.meta create mode 100644 Assets/Resources/Sun Flow/sunsurface1offset 1.png create mode 100644 Assets/Resources/Sun Flow/sunsurface1offset 1.png.meta create mode 100644 Assets/Scenes/ARPG.meta create mode 100644 Assets/Scenes/ARPG/LightingData.asset create mode 100644 Assets/Scenes/ARPG/LightingData.asset.meta create mode 100644 Assets/Scenes/ARPG/ReflectionProbe-0.exr create mode 100644 Assets/Scenes/ARPG/ReflectionProbe-0.exr.meta create mode 100644 Assets/Scenes/ARPG/ReflectionProbe-1.exr create mode 100644 Assets/Scenes/ARPG/ReflectionProbe-1.exr.meta create mode 100644 Assets/Scenes/LightningTestScene.meta create mode 100644 Assets/Scenes/LightningTestScene/LightingData.asset create mode 100644 Assets/Scenes/LightningTestScene/LightingData.asset.meta create mode 100644 Assets/Scenes/LightningTestScene/ReflectionProbe-0.exr create mode 100644 Assets/Scenes/LightningTestScene/ReflectionProbe-0.exr.meta create mode 100644 Assets/Scenes/MusicTest.unity create mode 100644 Assets/Scenes/MusicTest.unity.meta create mode 100644 Assets/Scripts/Gameplay/EntityInstance.cs rename Assets/Scripts/Gameplay/{EntityPrefab.cs.meta => EntityInstance.cs.meta} (100%) delete mode 100644 Assets/Scripts/Gameplay/EntityPrefab.cs create mode 100644 Assets/Scripts/Gameplay/ShipInstance.cs create mode 100644 Assets/Scripts/Gameplay/ShipInstance.cs.meta create mode 100644 Assets/Scripts/ServerShared/Agents/Agent.cs rename Assets/Scripts/ServerShared/Agents/{AgentBehavior.cs.meta => Agent.cs.meta} (100%) delete mode 100644 Assets/Scripts/ServerShared/Agents/AgentBehavior.cs delete mode 100644 Assets/Scripts/ServerShared/Agents/Locomotion.cs create mode 100644 Assets/Scripts/ServerShared/Agents/Minion.cs create mode 100644 Assets/Scripts/ServerShared/Agents/Minion.cs.meta create mode 100644 Assets/Scripts/ServerShared/Agents/States.meta create mode 100644 Assets/Scripts/ServerShared/Agents/States/BaseState.cs create mode 100644 Assets/Scripts/ServerShared/Agents/States/BaseState.cs.meta create mode 100644 Assets/Scripts/ServerShared/Agents/States/Combat.cs create mode 100644 Assets/Scripts/ServerShared/Agents/States/Combat.cs.meta create mode 100644 Assets/Scripts/ServerShared/Agents/States/MatchVelocity.cs create mode 100644 Assets/Scripts/ServerShared/Agents/States/MatchVelocity.cs.meta create mode 100644 Assets/Scripts/ServerShared/Agents/States/MoveTo.cs create mode 100644 Assets/Scripts/ServerShared/Agents/States/MoveTo.cs.meta create mode 100644 Assets/Scripts/ServerShared/Agents/Tasks.meta rename Assets/Scripts/ServerShared/Agents/{ => Tasks}/AgentTask.cs (88%) rename Assets/Scripts/ServerShared/Agents/{ => Tasks}/AgentTask.cs.meta (100%) rename Assets/Scripts/ServerShared/Agents/{ => Tasks}/HaulingTask.cs (100%) rename Assets/Scripts/ServerShared/Agents/{ => Tasks}/HaulingTask.cs.meta (100%) rename Assets/Scripts/ServerShared/Agents/{ => Tasks}/Mining.cs (100%) rename Assets/Scripts/ServerShared/Agents/{ => Tasks}/Mining.cs.meta (100%) create mode 100644 Assets/Scripts/ServerShared/Agents/Tasks/PatrolOrbits.cs create mode 100644 Assets/Scripts/ServerShared/Agents/Tasks/PatrolOrbits.cs.meta rename Assets/Scripts/ServerShared/Agents/{ => Tasks}/StationTowing.cs (100%) rename Assets/Scripts/ServerShared/Agents/{ => Tasks}/StationTowing.cs.meta (100%) rename Assets/Scripts/ServerShared/Agents/{ => Tasks}/Survey.cs (100%) rename Assets/Scripts/ServerShared/Agents/{ => Tasks}/Survey.cs.meta (100%) rename Assets/Scripts/ServerShared/Agents/{ => Tasks}/WanderTask.cs (100%) rename Assets/Scripts/ServerShared/Agents/{ => Tasks}/WanderTask.cs.meta (100%) delete mode 100644 Assets/Scripts/ServerShared/Agents/VelocityMatch.cs delete mode 100644 Assets/Scripts/ServerShared/Behaviors/Controller.cs delete mode 100644 Assets/Scripts/ServerShared/Behaviors/PatrolController.cs create mode 100644 Assets/Shaders/GlowFade.shader create mode 100644 Assets/Shaders/GlowFade.shader.meta create mode 100644 Assets/Shaders/Shield.shader create mode 100644 Assets/Shaders/Shield.shader.meta create mode 100644 Assets/Shaders/ViewNormalEmissiveGlowFade.shader create mode 100644 Assets/Shaders/ViewNormalEmissiveGlowFade.shader.meta create mode 100644 Assets/ShieldAnimation.cs rename Assets/{Scripts/ServerShared/Behaviors/Controller.cs.meta => ShieldAnimation.cs.meta} (83%) create mode 100644 Assets/ShieldManager.cs rename Assets/{Scripts/ServerShared/Behaviors/PatrolController.cs.meta => ShieldManager.cs.meta} (83%) create mode 100644 Assets/ShieldTest.cs rename Assets/{Scripts/ServerShared/Agents/Locomotion.cs.meta => ShieldTest.cs.meta} (83%) create mode 100644 Assets/Steel.mat create mode 100644 Assets/Steel.mat.meta create mode 100644 Assets/Textures/clouds.png create mode 100644 Assets/Textures/clouds.png.meta create mode 100644 Assets/Textures/dissolve.jpg create mode 100644 Assets/Textures/dissolve.jpg.meta create mode 100644 Assets/Textures/studio.hdr create mode 100644 Assets/Textures/studio.hdr.meta create mode 100644 Assets/Textures/studio2.hdr create mode 100644 Assets/Textures/studio2.hdr.meta create mode 100644 Assets/Textures/studio3.hdr create mode 100644 Assets/Textures/studio3.hdr.meta create mode 100644 ProjectSettings/SceneTemplateSettings.json diff --git a/.idea/.idea.Aetheria-Economy/.idea/contentModel.xml b/.idea/.idea.Aetheria-Economy/.idea/contentModel.xml index 5b2a4268c..8411c1a2b 100644 --- a/.idea/.idea.Aetheria-Economy/.idea/contentModel.xml +++ b/.idea/.idea.Aetheria-Economy/.idea/contentModel.xml @@ -68,6 +68,7 @@ + @@ -1440,10 +1441,11 @@ - + + @@ -1498,15 +1500,23 @@ - - - - - - - - - + + + + + + + + + + + + + + + + + @@ -1516,7 +1526,6 @@ - @@ -1530,7 +1539,6 @@ - @@ -2117,6 +2125,7 @@ + @@ -2128,8 +2137,13 @@ + + + + + diff --git a/Assembly-CSharp.csproj b/Assembly-CSharp.csproj index 908d68107..aaeb93345 100644 --- a/Assembly-CSharp.csproj +++ b/Assembly-CSharp.csproj @@ -56,8 +56,9 @@ + - + @@ -89,6 +90,8 @@ + + @@ -96,9 +99,11 @@ + + @@ -111,6 +116,8 @@ + + @@ -138,6 +145,7 @@ + @@ -160,8 +168,11 @@ + + + @@ -176,12 +187,6 @@ - - - - - - @@ -226,6 +231,7 @@ + @@ -240,10 +246,12 @@ + + diff --git a/Assets/Audio.meta b/Assets/Audio.meta new file mode 100644 index 000000000..ab1433b97 --- /dev/null +++ b/Assets/Audio.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ac76db83a51876a41b93794ae7d9c5b7 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Audio/Music.meta b/Assets/Audio/Music.meta new file mode 100644 index 000000000..86ddf0069 --- /dev/null +++ b/Assets/Audio/Music.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ea8806c771a569f45bb6c880497376ed +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/BGM.mixer b/Assets/BGM.mixer new file mode 100644 index 000000000..81806c45f --- /dev/null +++ b/Assets/BGM.mixer @@ -0,0 +1,172 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!244 &-9004461515939757133 +AudioMixerEffectController: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_EffectID: b2ed06905f6eac24da74c25f09426340 + m_EffectName: Attenuation + m_MixLevel: 2b7519561da34db4aa07a1270e3e7b32 + m_Parameters: [] + m_SendTarget: {fileID: 0} + m_EnableWetMix: 0 + m_Bypass: 0 +--- !u!243 &-4850697152304757985 +AudioMixerGroupController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Ambient + m_AudioMixer: {fileID: 24100000} + m_GroupID: 9764340bebfac4746a92399112954474 + m_Children: [] + m_Volume: a5787336378e972489b61f7f10dd3bbf + m_Pitch: 84c0da0bed49d074da2c2a1739fc0423 + m_Send: 00000000000000000000000000000000 + m_Effects: + - {fileID: -9004461515939757133} + m_UserColorIndex: 0 + m_Mute: 0 + m_Solo: 0 + m_BypassEffects: 0 +--- !u!244 &-4604239232645738977 +AudioMixerEffectController: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_EffectID: d750d8702ca126b41838024cd85b5814 + m_EffectName: Attenuation + m_MixLevel: 4f6917ef5cb76e3469b85371872bbcb8 + m_Parameters: [] + m_SendTarget: {fileID: 0} + m_EnableWetMix: 0 + m_Bypass: 0 +--- !u!245 &-603028713283386147 +AudioMixerSnapshotController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Ambient + m_AudioMixer: {fileID: 24100000} + m_SnapshotID: 04e5ad01f0a1d7c4495ea64237e715ec + m_FloatValues: + 9d3125547e768e948a1677655841e667: -60 + a5787336378e972489b61f7f10dd3bbf: 0 + m_TransitionOverrides: + 9d3125547e768e948a1677655841e667: 2 + a5787336378e972489b61f7f10dd3bbf: 3 +--- !u!241 &24100000 +AudioMixerController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: BGM + m_OutputGroup: {fileID: 0} + m_MasterGroup: {fileID: 24300002} + m_Snapshots: + - {fileID: 24500006} + - {fileID: 4951561632732636846} + - {fileID: -603028713283386147} + m_StartSnapshot: {fileID: -603028713283386147} + m_SuspendThreshold: -80 + m_EnableSuspend: 1 + m_UpdateMode: 0 + m_ExposedParameters: [] + m_AudioMixerGroupViews: + - guids: + - b23f0c944d93514408fb6ee9a25fbff0 + - 9764340bebfac4746a92399112954474 + - 05743d679c7de904bb58116993bed9ef + name: View + m_CurrentViewIndex: 0 + m_TargetSnapshot: {fileID: -603028713283386147} +--- !u!243 &24300002 +AudioMixerGroupController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Master + m_AudioMixer: {fileID: 24100000} + m_GroupID: b23f0c944d93514408fb6ee9a25fbff0 + m_Children: + - {fileID: -4850697152304757985} + - {fileID: 4584421116988752864} + m_Volume: 478a12bd2d6d3b64abd462d715ba3e7b + m_Pitch: 6ffae4b8e0d7a2440b5d64bd30124684 + m_Send: 00000000000000000000000000000000 + m_Effects: + - {fileID: 24400004} + m_UserColorIndex: 0 + m_Mute: 0 + m_Solo: 0 + m_BypassEffects: 0 +--- !u!244 &24400004 +AudioMixerEffectController: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_EffectID: 5c30de4818289884ca29eee3b58c0974 + m_EffectName: Attenuation + m_MixLevel: 44a47a63d37fb4f47b1aabfeb7e57920 + m_Parameters: [] + m_SendTarget: {fileID: 0} + m_EnableWetMix: 0 + m_Bypass: 0 +--- !u!245 &24500006 +AudioMixerSnapshotController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Snapshot + m_AudioMixer: {fileID: 24100000} + m_SnapshotID: 689ad3d0463365c47a63b89cf2c31324 + m_FloatValues: + 9d3125547e768e948a1677655841e667: -80 + a5787336378e972489b61f7f10dd3bbf: -80 + m_TransitionOverrides: {} +--- !u!243 &4584421116988752864 +AudioMixerGroupController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Combat + m_AudioMixer: {fileID: 24100000} + m_GroupID: 05743d679c7de904bb58116993bed9ef + m_Children: [] + m_Volume: 9d3125547e768e948a1677655841e667 + m_Pitch: 5717438562307a24daee6dc36c4bed57 + m_Send: 00000000000000000000000000000000 + m_Effects: + - {fileID: -4604239232645738977} + m_UserColorIndex: 0 + m_Mute: 0 + m_Solo: 0 + m_BypassEffects: 0 +--- !u!245 &4951561632732636846 +AudioMixerSnapshotController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Combat + m_AudioMixer: {fileID: 24100000} + m_SnapshotID: 5e8b9973e0ba4f54db58bad1579bf0b5 + m_FloatValues: + 9d3125547e768e948a1677655841e667: 0 + a5787336378e972489b61f7f10dd3bbf: -60 + m_TransitionOverrides: + 9d3125547e768e948a1677655841e667: 3 + a5787336378e972489b61f7f10dd3bbf: 2 diff --git a/Assets/BGM.mixer.meta b/Assets/BGM.mixer.meta new file mode 100644 index 000000000..0a683bcb2 --- /dev/null +++ b/Assets/BGM.mixer.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d220a87cb27315048975cce74c6d84b6 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 24100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Materials/Aluminium brushed.mat b/Assets/Materials/Aluminium brushed.mat new file mode 100644 index 000000000..67365ef29 --- /dev/null +++ b/Assets/Materials/Aluminium brushed.mat @@ -0,0 +1,91 @@ +%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: Aluminium brushed + m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3} + m_ShaderKeywords: _MAINTEX _METALLICGLOSSMAP _NORMALMAP _OCCLUSIONMAP _PARALLAXMAP + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 4730978449518085612, guid: 06d6a565d43fba5409712ce9a10bfbef, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FadeTex: + m_Texture: {fileID: 2800000, guid: df0632a08c5f1a1498fa325c755dc459, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 7556082237344091230, guid: 06d6a565d43fba5409712ce9a10bfbef, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 6373266012617290493, guid: 06d6a565d43fba5409712ce9a10bfbef, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 342959783478273704, guid: 06d6a565d43fba5409712ce9a10bfbef, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: -9132138291289375396, guid: 06d6a565d43fba5409712ce9a10bfbef, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _Fade: 1 + - _FadeEdge: 0.05 + - _FadeSharpness: 16 + - _GlossMapScale: 1 + - _Glossiness: 1 + - _GlossyReflections: 1 + - _Metallic: 1 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EdgeColor: {r: 3.0117648, g: 3.0117648, b: 11.984314, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Materials/Aluminium brushed.mat.meta b/Assets/Materials/Aluminium brushed.mat.meta new file mode 100644 index 000000000..fc2a5d778 --- /dev/null +++ b/Assets/Materials/Aluminium brushed.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5acb4b3490cbda04c85ad7cca3b2b325 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Materials/Asteroids.mat b/Assets/Materials/Asteroids.mat index b79303ac1..831254106 100644 --- a/Assets/Materials/Asteroids.mat +++ b/Assets/Materials/Asteroids.mat @@ -63,7 +63,7 @@ Material: - _GlossMapScale: 1 - _Glossiness: 1 - _GlossyReflections: 1 - - _Metallic: 0.748 + - _Metallic: 0.8 - _Mode: 0 - _OcclusionStrength: 1 - _Parallax: 0.02 diff --git a/Assets/Materials/Black.mat b/Assets/Materials/Black.mat index 38c0ff604..2a1150807 100644 --- a/Assets/Materials/Black.mat +++ b/Assets/Materials/Black.mat @@ -8,7 +8,7 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Black - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3} m_ShaderKeywords: m_LightmapFlags: 4 m_EnableInstancingVariants: 0 @@ -39,6 +39,10 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _FadeTex: + m_Texture: {fileID: 2800000, guid: df0632a08c5f1a1498fa325c755dc459, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _MainTex: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -60,8 +64,11 @@ Material: - _Cutoff: 0.5 - _DetailNormalMapScale: 1 - _DstBlend: 0 + - _Fade: 1 + - _FadeEdge: 0.05 + - _FadeSharpness: 16 - _GlossMapScale: 1 - - _Glossiness: 0 + - _Glossiness: 1 - _GlossyReflections: 1 - _Metallic: 1 - _Mode: 0 @@ -74,5 +81,6 @@ Material: - _ZWrite: 1 m_Colors: - _Color: {r: 0, g: 0, b: 0, a: 1} + - _EdgeColor: {r: 3.0117648, g: 3.0117648, b: 11.984314, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] diff --git a/Assets/Materials/Car Paint Magenta.mat b/Assets/Materials/Car Paint Magenta.mat new file mode 100644 index 000000000..15ab73513 --- /dev/null +++ b/Assets/Materials/Car Paint Magenta.mat @@ -0,0 +1,57 @@ +%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: Car Paint Magenta + m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3} + m_ShaderKeywords: _MAINTEX _METALLICGLOSSMAP _NORMALMAP _OCCLUSIONMAP _PARALLAXMAP + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 3068890721646206586, guid: a1d39ea984432bf44b4a0686afe2bf1a, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FadeTex: + m_Texture: {fileID: 2800000, guid: df0632a08c5f1a1498fa325c755dc459, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 5917659159057834157, guid: a1d39ea984432bf44b4a0686afe2bf1a, + type: 3} + m_Scale: {x: 2, y: 2} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: -3552914696322007609, guid: a1d39ea984432bf44b4a0686afe2bf1a, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: -1242281561028671816, guid: a1d39ea984432bf44b4a0686afe2bf1a, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Fade: 1 + - _FadeEdge: 0.05 + - _FadeSharpness: 16 + - _Glossiness: 1 + - _Metallic: 1 + - _OcclusionStrength: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EdgeColor: {r: 3.0117648, g: 3.0117648, b: 11.984314, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Materials/Car Paint Magenta.mat.meta b/Assets/Materials/Car Paint Magenta.mat.meta new file mode 100644 index 000000000..fbc759eb7 --- /dev/null +++ b/Assets/Materials/Car Paint Magenta.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 71e1f3613633dfa488fff097aaf97660 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Materials/Car Paint Red.mat b/Assets/Materials/Car Paint Red.mat new file mode 100644 index 000000000..8a7ffa46f --- /dev/null +++ b/Assets/Materials/Car Paint Red.mat @@ -0,0 +1,91 @@ +%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: Car Paint Red + m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3} + m_ShaderKeywords: _MAINTEX _METALLICGLOSSMAP _NORMALMAP _OCCLUSIONMAP _PARALLAXMAP + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 3068890721646206586, guid: 504c7bfe0d50ff64a88b8eac2ceb46f8, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 2, y: 2} + m_Offset: {x: 0, y: 0} + - _FadeTex: + m_Texture: {fileID: 2800000, guid: df0632a08c5f1a1498fa325c755dc459, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 5917659159057834157, guid: 504c7bfe0d50ff64a88b8eac2ceb46f8, + type: 3} + m_Scale: {x: 2, y: 2} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: -3552914696322007609, guid: 504c7bfe0d50ff64a88b8eac2ceb46f8, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: -1242281561028671816, guid: 504c7bfe0d50ff64a88b8eac2ceb46f8, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: -1652887728991447519, guid: 504c7bfe0d50ff64a88b8eac2ceb46f8, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _Fade: 1 + - _FadeEdge: 0.1 + - _FadeSharpness: 16 + - _GlossMapScale: 1 + - _Glossiness: 1 + - _GlossyReflections: 1 + - _Metallic: 1 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.005 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EdgeColor: {r: 6.0235295, g: 6.0235295, b: 24.094118, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Materials/Car Paint Red.mat.meta b/Assets/Materials/Car Paint Red.mat.meta new file mode 100644 index 000000000..3f49a7ed6 --- /dev/null +++ b/Assets/Materials/Car Paint Red.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 38f8ba6b169127249b6532be2b3926ee +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Materials/Car Paint White Small.mat b/Assets/Materials/Car Paint White Small.mat new file mode 100644 index 000000000..7de25d32b --- /dev/null +++ b/Assets/Materials/Car Paint White Small.mat @@ -0,0 +1,91 @@ +%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: Car Paint White Small + m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3} + m_ShaderKeywords: _MAINTEX _METALLICGLOSSMAP _NORMALMAP _OCCLUSIONMAP _PARALLAXMAP + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 3068890721646206586, guid: 1c858fec5b74c7c46b1712494192b6b5, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 16, y: 16} + m_Offset: {x: 0, y: 0} + - _FadeTex: + m_Texture: {fileID: 2800000, guid: df0632a08c5f1a1498fa325c755dc459, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 5917659159057834157, guid: 1c858fec5b74c7c46b1712494192b6b5, + type: 3} + m_Scale: {x: 16, y: 16} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: -3552914696322007609, guid: 1c858fec5b74c7c46b1712494192b6b5, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: -1242281561028671816, guid: 1c858fec5b74c7c46b1712494192b6b5, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: -1652887728991447519, guid: 1c858fec5b74c7c46b1712494192b6b5, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _Fade: 1 + - _FadeEdge: 0.1 + - _FadeSharpness: 16 + - _GlossMapScale: 1 + - _Glossiness: 1 + - _GlossyReflections: 1 + - _Metallic: 1 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.005 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EdgeColor: {r: 6.0235295, g: 6.0235295, b: 24.094118, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Materials/Car Paint White Small.mat.meta b/Assets/Materials/Car Paint White Small.mat.meta new file mode 100644 index 000000000..9968cc8ff --- /dev/null +++ b/Assets/Materials/Car Paint White Small.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b9f65861b71050b4a84fe0007bedbba9 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Materials/Car Paint White.mat b/Assets/Materials/Car Paint White.mat new file mode 100644 index 000000000..1c7908fd1 --- /dev/null +++ b/Assets/Materials/Car Paint White.mat @@ -0,0 +1,57 @@ +%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: Car Paint White + m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3} + m_ShaderKeywords: _MAINTEX _METALLICGLOSSMAP _NORMALMAP _OCCLUSIONMAP _PARALLAXMAP + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 3068890721646206586, guid: b2bec4b400153d745b2915f1c43e5c96, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FadeTex: + m_Texture: {fileID: 2800000, guid: df0632a08c5f1a1498fa325c755dc459, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 5917659159057834157, guid: b2bec4b400153d745b2915f1c43e5c96, + type: 3} + m_Scale: {x: 2, y: 2} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: -3552914696322007609, guid: b2bec4b400153d745b2915f1c43e5c96, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: -1242281561028671816, guid: b2bec4b400153d745b2915f1c43e5c96, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Fade: 1 + - _FadeEdge: 0.05 + - _FadeSharpness: 16 + - _Glossiness: 1 + - _Metallic: 1 + - _OcclusionStrength: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EdgeColor: {r: 3.0117648, g: 3.0117648, b: 11.984314, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Materials/Car Paint White.mat.meta b/Assets/Materials/Car Paint White.mat.meta new file mode 100644 index 000000000..c4c20e621 --- /dev/null +++ b/Assets/Materials/Car Paint White.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5e43f48908cce2949a41677ec48affe5 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Materials/Cockpit.mat b/Assets/Materials/Cockpit.mat new file mode 100644 index 000000000..e71671e0e --- /dev/null +++ b/Assets/Materials/Cockpit.mat @@ -0,0 +1,91 @@ +%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: Cockpit + m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3} + m_ShaderKeywords: _MAINTEX _METALLICGLOSSMAP _NORMALMAP _OCCLUSIONMAP _PARALLAXMAP + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: -3419035557588562233, guid: 9fc901afb8a434e46b9405eaec2df5a4, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FadeTex: + m_Texture: {fileID: 2800000, guid: df0632a08c5f1a1498fa325c755dc459, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: -1863473678134789185, guid: 9fc901afb8a434e46b9405eaec2df5a4, + type: 3} + m_Scale: {x: 2, y: 2} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 6214616473909614744, guid: 9fc901afb8a434e46b9405eaec2df5a4, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: -3436886866959827803, guid: 9fc901afb8a434e46b9405eaec2df5a4, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 7009887839391554354, guid: 9fc901afb8a434e46b9405eaec2df5a4, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _Fade: 1 + - _FadeEdge: 0.05 + - _FadeSharpness: 16 + - _GlossMapScale: 1 + - _Glossiness: 1 + - _GlossyReflections: 1 + - _Metallic: 1 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EdgeColor: {r: 3.0117648, g: 3.0117648, b: 11.984314, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Materials/Cockpit.mat.meta b/Assets/Materials/Cockpit.mat.meta new file mode 100644 index 000000000..c1e5a0130 --- /dev/null +++ b/Assets/Materials/Cockpit.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d9945c5ff1a646d43a949a0d657b766a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Materials/Headlights.mat b/Assets/Materials/Headlights.mat index 5c1686842..9a3059fc2 100644 --- a/Assets/Materials/Headlights.mat +++ b/Assets/Materials/Headlights.mat @@ -61,7 +61,7 @@ Material: - _Cutoff: 0.5 - _DetailNormalMapScale: 1 - _DstBlend: 0 - - _Emission: 150 + - _Emission: 30 - _EmissionFresnel: 0.46 - _EmissionRoughnessFresnelPower: 1 - _GlossMapScale: 1 diff --git a/Assets/Materials/Invisible.mat b/Assets/Materials/Invisible.mat new file mode 100644 index 000000000..29935f387 --- /dev/null +++ b/Assets/Materials/Invisible.mat @@ -0,0 +1,78 @@ +%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: Invisible + m_Shader: {fileID: 51, 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: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 0} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Materials/Invisible.mat.meta b/Assets/Materials/Invisible.mat.meta new file mode 100644 index 000000000..f5ae14d12 --- /dev/null +++ b/Assets/Materials/Invisible.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c94a225de88e5ce42af01c34df3521e6 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Models/Metal 003.mat b/Assets/Materials/Metal 003.mat similarity index 100% rename from Assets/Models/Metal 003.mat rename to Assets/Materials/Metal 003.mat diff --git a/Assets/Models/Metal 003.mat.meta b/Assets/Materials/Metal 003.mat.meta similarity index 100% rename from Assets/Models/Metal 003.mat.meta rename to Assets/Materials/Metal 003.mat.meta diff --git a/Assets/Materials/Radiators.mat b/Assets/Materials/Radiators.mat index 5c4c6fed6..e6c7a12f0 100644 --- a/Assets/Materials/Radiators.mat +++ b/Assets/Materials/Radiators.mat @@ -8,7 +8,7 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Radiators - m_Shader: {fileID: 4800000, guid: d69ef48273708ef4680762f5cdcfc860, type: 3} + m_Shader: {fileID: 4800000, guid: fe8c4273cecc4ade93ae54e087dff063, type: 3} m_ShaderKeywords: m_LightmapFlags: 4 m_EnableInstancingVariants: 0 @@ -40,6 +40,10 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _FadeTex: + m_Texture: {fileID: 2800000, guid: df0632a08c5f1a1498fa325c755dc459, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _MainTex: m_Texture: {fileID: -6057190860509678031, guid: 2b42584452fe0cc4fa4e8a115230b156, type: 3} @@ -67,6 +71,9 @@ Material: - _Emission: 15 - _EmissionFresnel: 4 - _EmissionRoughnessFresnelPower: 0.5 + - _Fade: 1 + - _FadeEdge: 0.1 + - _FadeSharpness: 8 - _GlossMapScale: 1 - _Glossiness: 1 - _GlossyReflections: 1 @@ -83,5 +90,6 @@ Material: - _ZWrite: 1 m_Colors: - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EdgeColor: {r: 6.0235295, g: 6.0235295, b: 24.094118, a: 1} - _EmissionColor: {r: 1, g: 0.40135294, b: 0, a: 1} m_BuildTextureStacks: [] diff --git a/Assets/Materials/Reflective.mat b/Assets/Materials/Reflective.mat new file mode 100644 index 000000000..e7332a134 --- /dev/null +++ b/Assets/Materials/Reflective.mat @@ -0,0 +1,78 @@ +%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: Reflective + m_Shader: {fileID: 46, 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: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.889 + - _GlossyReflections: 1 + - _Metallic: 1 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Materials/Reflective.mat.meta b/Assets/Materials/Reflective.mat.meta new file mode 100644 index 000000000..d6f7c7b8f --- /dev/null +++ b/Assets/Materials/Reflective.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e402bf8fa6a273749ae251b844eed35f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Materials/Silver.mat b/Assets/Materials/Silver.mat new file mode 100644 index 000000000..b6f06754a --- /dev/null +++ b/Assets/Materials/Silver.mat @@ -0,0 +1,91 @@ +%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: Silver + m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3} + m_ShaderKeywords: _MAINTEX _METALLICGLOSSMAP _NORMALMAP _OCCLUSIONMAP _PARALLAXMAP + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 8947980237086559854, guid: 0be5fb1df83ac8e499a3f6a060041e49, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FadeTex: + m_Texture: {fileID: 2800000, guid: df0632a08c5f1a1498fa325c755dc459, type: 3} + m_Scale: {x: 2, y: 2} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: -1383037052668628532, guid: 0be5fb1df83ac8e499a3f6a060041e49, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 6429125567479694453, guid: 0be5fb1df83ac8e499a3f6a060041e49, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: -9097439929179392311, guid: 0be5fb1df83ac8e499a3f6a060041e49, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 425190381137097012, guid: 0be5fb1df83ac8e499a3f6a060041e49, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _Fade: 1 + - _FadeEdge: 0.1 + - _FadeSharpness: 8 + - _GlossMapScale: 1 + - _Glossiness: 1 + - _GlossyReflections: 1 + - _Metallic: 1 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EdgeColor: {r: 6.0235295, g: 6.0235295, b: 24.094118, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Materials/Silver.mat.meta b/Assets/Materials/Silver.mat.meta new file mode 100644 index 000000000..8d9228c0d --- /dev/null +++ b/Assets/Materials/Silver.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 98fb5ab74514d6947ad084ce427b86a4 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Materials/Skybox.mat b/Assets/Materials/Skybox.mat index 7e998e88d..d03d135d3 100644 --- a/Assets/Materials/Skybox.mat +++ b/Assets/Materials/Skybox.mat @@ -56,7 +56,7 @@ Material: m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _Tex: - m_Texture: {fileID: 8900000, guid: 6c0135b6b66262141b9c5c465f8cb018, type: 3} + m_Texture: {fileID: 8900000, guid: 589f8d25c07df474ebf6e5cf31ac21c4, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} m_Floats: @@ -64,7 +64,7 @@ Material: - _Cutoff: 0.5 - _DetailNormalMapScale: 1 - _DstBlend: 0 - - _Exposure: 1 + - _Exposure: 0.5 - _GlossMapScale: 1 - _Glossiness: 0.5 - _GlossyReflections: 1 @@ -81,5 +81,5 @@ Material: m_Colors: - _Color: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _Tint: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} + - _Tint: {r: 1, g: 1, b: 1, a: 0.5} m_BuildTextureStacks: [] diff --git a/Assets/Materials/Station Lights.mat b/Assets/Materials/Station Lights.mat index 4f0d7d427..51455a3c0 100644 --- a/Assets/Materials/Station Lights.mat +++ b/Assets/Materials/Station Lights.mat @@ -8,7 +8,7 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Station Lights - m_Shader: {fileID: 4800000, guid: d69ef48273708ef4680762f5cdcfc860, type: 3} + m_Shader: {fileID: 4800000, guid: fe8c4273cecc4ade93ae54e087dff063, type: 3} m_ShaderKeywords: m_LightmapFlags: 4 m_EnableInstancingVariants: 0 @@ -40,6 +40,10 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _FadeTex: + m_Texture: {fileID: 2800000, guid: df0632a08c5f1a1498fa325c755dc459, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _MainTex: m_Texture: {fileID: -6057190860509678031, guid: 2b42584452fe0cc4fa4e8a115230b156, type: 3} @@ -67,6 +71,9 @@ Material: - _Emission: 15 - _EmissionFresnel: 1 - _EmissionRoughnessFresnelPower: 0.5 + - _Fade: 1 + - _FadeEdge: 0.1 + - _FadeSharpness: 16 - _GlossMapScale: 1 - _Glossiness: 1 - _GlossyReflections: 1 @@ -83,5 +90,6 @@ Material: - _ZWrite: 1 m_Colors: - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EdgeColor: {r: 6.0235295, g: 6.0235295, b: 24.094118, a: 1} - _EmissionColor: {r: 0.7112653, g: 0.4292453, b: 1, a: 1} m_BuildTextureStacks: [] diff --git a/Assets/Models/Steel brushed.mat b/Assets/Materials/Steel brushed.mat similarity index 100% rename from Assets/Models/Steel brushed.mat rename to Assets/Materials/Steel brushed.mat diff --git a/Assets/Models/Steel brushed.mat.meta b/Assets/Materials/Steel brushed.mat.meta similarity index 100% rename from Assets/Models/Steel brushed.mat.meta rename to Assets/Materials/Steel brushed.mat.meta diff --git a/Assets/Materials/Steel parkerized.mat b/Assets/Materials/Steel parkerized.mat new file mode 100644 index 000000000..b4bb13d2d --- /dev/null +++ b/Assets/Materials/Steel parkerized.mat @@ -0,0 +1,91 @@ +%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: Steel parkerized + m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3} + m_ShaderKeywords: _MAINTEX _METALLICGLOSSMAP _NORMALMAP _OCCLUSIONMAP _PARALLAXMAP + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 885599758852769373, guid: e7758cad28ae98f478940e55222419a6, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FadeTex: + m_Texture: {fileID: 2800000, guid: df0632a08c5f1a1498fa325c755dc459, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: -4474525002722929857, guid: e7758cad28ae98f478940e55222419a6, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: -2334804936223627746, guid: e7758cad28ae98f478940e55222419a6, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: -8380876848358870972, guid: e7758cad28ae98f478940e55222419a6, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 172713863077875830, guid: e7758cad28ae98f478940e55222419a6, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _Fade: 1 + - _FadeEdge: 0.1 + - _FadeSharpness: 16 + - _GlossMapScale: 1 + - _Glossiness: 1 + - _GlossyReflections: 1 + - _Metallic: 1 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EdgeColor: {r: 6.0235295, g: 6.0235295, b: 24.094118, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Materials/Steel parkerized.mat.meta b/Assets/Materials/Steel parkerized.mat.meta new file mode 100644 index 000000000..11ff1f07e --- /dev/null +++ b/Assets/Materials/Steel parkerized.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0635cf2d392265944afa2b9ce2aab35f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Materials/Steel.mat b/Assets/Materials/Steel.mat new file mode 100644 index 000000000..ef4a0c2f7 --- /dev/null +++ b/Assets/Materials/Steel.mat @@ -0,0 +1,91 @@ +%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: Steel + m_Shader: {fileID: 4800000, guid: ddff0b48b92c991499817d2a0f5d5059, type: 3} + m_ShaderKeywords: _MAINTEX _METALLICGLOSSMAP _NORMALMAP _OCCLUSIONMAP _PARALLAXMAP + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: -3888315358723833787, guid: cbc61995a46604441ab9de4f1c68e290, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 4, y: 4} + m_Offset: {x: 0, y: 0} + - _FadeTex: + m_Texture: {fileID: 2800000, guid: df0632a08c5f1a1498fa325c755dc459, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 108215966750249586, guid: cbc61995a46604441ab9de4f1c68e290, + type: 3} + m_Scale: {x: 4, y: 4} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 4793252353645218242, guid: cbc61995a46604441ab9de4f1c68e290, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: -4384182597330533215, guid: cbc61995a46604441ab9de4f1c68e290, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 4600200897981803784, guid: cbc61995a46604441ab9de4f1c68e290, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _Fade: 1 + - _FadeEdge: 0.05 + - _FadeSharpness: 16 + - _GlossMapScale: 1 + - _Glossiness: 1 + - _GlossyReflections: 1 + - _Metallic: 1 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EdgeColor: {r: 3.0117648, g: 3.0117648, b: 11.984314, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Materials/Steel.mat.meta b/Assets/Materials/Steel.mat.meta new file mode 100644 index 000000000..037dc3ce0 --- /dev/null +++ b/Assets/Materials/Steel.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 33a2546b27ff92d4fb43d5a76a9693c0 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Materials/Substance/Metal/metal_brass.sbsar.meta b/Assets/Materials/Substance/Metal/metal_brass.sbsar.meta index ff1e783aa..711044c49 100644 --- a/Assets/Materials/Substance/Metal/metal_brass.sbsar.meta +++ b/Assets/Materials/Substance/Metal/metal_brass.sbsar.meta @@ -58,7 +58,13 @@ ScriptedImporter: graphDescIndex: 0 generateAllOutputs: 0 generateMipMaps: 1 - preset: " \n \n" + preset: " \n \n + \n \n \n \n \n" shaderName: Standard materialProperties: shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} @@ -354,8 +360,8 @@ ScriptedImporter: - label: Default bOverride: 0 bLockRatio: 1 - textureWidth: 256 - textureHeight: 256 + textureWidth: 1024 + textureHeight: 1024 textureFormatMode: 0 normalCompressed: 0 bGenerateOnLoad: 1 diff --git a/Assets/Materials/Substance/Metal/metal_car_paint Magenta.sbsar.meta b/Assets/Materials/Substance/Metal/metal_car_paint Magenta.sbsar.meta index e75899a1a..6cf77f1a8 100644 --- a/Assets/Materials/Substance/Metal/metal_car_paint Magenta.sbsar.meta +++ b/Assets/Materials/Substance/Metal/metal_car_paint Magenta.sbsar.meta @@ -99,7 +99,7 @@ ScriptedImporter: offset: {x: 0, y: 0} - name: _EmissionMap texture: {instanceID: 0} - scale: {x: 2, y: 2} + scale: {x: 1, y: 1} offset: {x: 0, y: 0} - name: _MainTex texture: {fileID: 5917659159057834157, guid: a1d39ea984432bf44b4a0686afe2bf1a, @@ -133,17 +133,17 @@ ScriptedImporter: - name: _GlossMapScale float: 1 - name: _Glossiness - float: 0.5 + float: 1 - name: _GlossyReflections float: 1 - name: _Metallic - float: 0 + float: 1 - name: _Mode float: 0 - name: _OcclusionStrength float: 1 - name: _Parallax - float: 0.005 + float: 0.02 - name: _SmoothnessTextureChannel float: 0 - name: _SpecularHighlights diff --git a/Assets/Materials/Substance/Metal/metal_car_paint white.sbsar.meta b/Assets/Materials/Substance/Metal/metal_car_paint white.sbsar.meta index e877faf51..4f750a27b 100644 --- a/Assets/Materials/Substance/Metal/metal_car_paint white.sbsar.meta +++ b/Assets/Materials/Substance/Metal/metal_car_paint white.sbsar.meta @@ -100,7 +100,7 @@ ScriptedImporter: offset: {x: 0, y: 0} - name: _EmissionMap texture: {instanceID: 0} - scale: {x: 2, y: 2} + scale: {x: 1, y: 1} offset: {x: 0, y: 0} - name: _MainTex texture: {fileID: 5917659159057834157, guid: b2bec4b400153d745b2915f1c43e5c96, @@ -134,17 +134,17 @@ ScriptedImporter: - name: _GlossMapScale float: 1 - name: _Glossiness - float: 0.5 + float: 1 - name: _GlossyReflections float: 1 - name: _Metallic - float: 0 + float: 1 - name: _Mode float: 0 - name: _OcclusionStrength float: 1 - name: _Parallax - float: 0.005 + float: 0.02 - name: _SmoothnessTextureChannel float: 0 - name: _SpecularHighlights diff --git a/Assets/Materials/Substance/marble_002.sbsar b/Assets/Materials/Substance/marble_002.sbsar new file mode 100644 index 000000000..728270967 --- /dev/null +++ b/Assets/Materials/Substance/marble_002.sbsar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2859e24557bccbe309d8946052849b828cabd34b8e45b933faee212eeffd462e +size 8113 diff --git a/Assets/Materials/Substance/marble_002.sbsar.meta b/Assets/Materials/Substance/marble_002.sbsar.meta new file mode 100644 index 000000000..1942b6abf --- /dev/null +++ b/Assets/Materials/Substance/marble_002.sbsar.meta @@ -0,0 +1,296 @@ +fileFormatVersion: 2 +guid: ef9a54b8dacea9f44be70da43472f701 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 232528478, guid: 43a8bbf65be290d44ba52b94476242b9, type: 3} + version: 29 + projectContext: 0 + mGraphInstanceData: + - graphLabel: Marble 002 + prototypeName: Marble 002 + graphDescIndex: 0 + generateAllOutputs: 0 + generateMipMaps: 1 + preset: " \n \n + \n \n \n \n" + shaderName: Standard + materialProperties: + shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + shaderKeywords: _MAINTEX _METALLICGLOSSMAP _NORMALMAP _OCCLUSIONMAP _PARALLAXMAP + lightmapFlags: 4 + enableInstancingVariants: 0 + doubleSidedGI: 0 + customRenderQueue: -1 + texEnvs: + - name: _BumpMap + texture: {fileID: 5777664804669422655, guid: ef9a54b8dacea9f44be70da43472f701, + type: 3} + scale: {x: 1, y: 1} + offset: {x: 0, y: 0} + - name: _DetailAlbedoMap + texture: {instanceID: 0} + scale: {x: 1, y: 1} + offset: {x: 0, y: 0} + - name: _DetailMask + texture: {instanceID: 0} + scale: {x: 1, y: 1} + offset: {x: 0, y: 0} + - name: _DetailNormalMap + texture: {instanceID: 0} + scale: {x: 1, y: 1} + offset: {x: 0, y: 0} + - name: _EmissionMap + texture: {instanceID: 0} + scale: {x: 1, y: 1} + offset: {x: 0, y: 0} + - name: _MainTex + texture: {fileID: -5564000130503291907, guid: ef9a54b8dacea9f44be70da43472f701, + type: 3} + scale: {x: 1, y: 1} + offset: {x: 0, y: 0} + - name: _MetallicGlossMap + texture: {fileID: -3258750942226492355, guid: ef9a54b8dacea9f44be70da43472f701, + type: 3} + scale: {x: 1, y: 1} + offset: {x: 0, y: 0} + - name: _OcclusionMap + texture: {fileID: 4985089394248351555, guid: ef9a54b8dacea9f44be70da43472f701, + type: 3} + scale: {x: 1, y: 1} + offset: {x: 0, y: 0} + - name: _ParallaxMap + texture: {fileID: 7116303992264550, guid: ef9a54b8dacea9f44be70da43472f701, + type: 3} + scale: {x: 1, y: 1} + offset: {x: 0, y: 0} + floats: + - name: _BumpScale + float: 1 + - name: _Cutoff + float: 0.5 + - name: _DetailNormalMapScale + float: 1 + - name: _DstBlend + float: 0 + - name: _GlossMapScale + float: 1 + - name: _Glossiness + float: 0.5 + - name: _GlossyReflections + float: 1 + - name: _Metallic + float: 0 + - name: _Mode + float: 0 + - name: _OcclusionStrength + float: 1 + - name: _Parallax + float: 0.02 + - name: _SmoothnessTextureChannel + float: 0 + - name: _SpecularHighlights + float: 1 + - name: _SrcBlend + float: 1 + - name: _UVSec + float: 0 + - name: _ZWrite + float: 1 + colors: + - name: _Color + color: {r: 1, g: 1, b: 1, a: 1} + - name: _EmissionColor + color: {r: 0, g: 0, b: 0, a: 1} + outputDescList: + - outputName: diffuse + identifier: diffuse + usageName: diffuse + channelStr: diffuse + label: Diffuse + usage: 0 + bImage: 1 + bNumerical: 0 + bLinear: 0 + - outputName: baseColor + identifier: basecolor + usageName: baseColor + channelStr: baseColor + label: Base Color + usage: 1 + bImage: 1 + bNumerical: 0 + bLinear: 0 + - outputName: normal + identifier: normal + usageName: normal + channelStr: normal + label: Normal + usage: 7 + bImage: 1 + bNumerical: 0 + bLinear: 1 + - outputName: specular + identifier: specular + usageName: specular + channelStr: specular + label: Specular + usage: 11 + bImage: 1 + bNumerical: 0 + bLinear: 0 + - outputName: glossiness + identifier: glossiness + usageName: glossiness + channelStr: glossiness + label: Glossiness + usage: 14 + bImage: 1 + bNumerical: 0 + bLinear: 1 + - outputName: roughness + identifier: roughness + usageName: roughness + channelStr: roughness + label: Roughness + usage: 15 + bImage: 1 + bNumerical: 0 + bLinear: 1 + - outputName: metallic + identifier: metallic + usageName: metallic + channelStr: metallic + label: Metallic + usage: 34 + bImage: 1 + bNumerical: 0 + bLinear: 1 + - outputName: ambientOcclusion + identifier: ambient_occlusion + usageName: ambientOcclusion + channelStr: ambientOcclusion + label: Ambient Occlusion + usage: 5 + bImage: 1 + bNumerical: 0 + bLinear: 1 + - outputName: height + identifier: height + usageName: height + channelStr: height + label: Height + usage: 9 + bImage: 1 + bNumerical: 0 + bLinear: 1 + texturePackingList: + - targetName: diffuse + components: + - sourceName: diffuse + from: 0 + to: 3 + - targetName: baseColor + components: + - sourceName: baseColor + from: 0 + to: 3 + - targetName: normal + components: + - sourceName: normal + from: 0 + to: 3 + - targetName: specular + components: + - sourceName: specular + from: 0 + to: 3 + - targetName: glossiness + components: + - sourceName: glossiness + from: 0 + to: 3 + - targetName: roughness + components: + - sourceName: roughness + from: 0 + to: 3 + - targetName: metallic + components: + - sourceName: smoothness + from: 0 + to: 3 + - targetName: ambientOcclusion + components: + - sourceName: ambientOcclusion + from: 0 + to: 3 + - targetName: height + components: + - sourceName: height + from: 0 + to: 3 + textureParameters: + - textureName: Marble 002 - diffuse + wrapMode: 0 + filterMode: 1 + aniso: 1 + - textureName: Marble 002 - baseColor + wrapMode: 0 + filterMode: 1 + aniso: 1 + - textureName: Marble 002 - normal + wrapMode: 0 + filterMode: 1 + aniso: 1 + - textureName: Marble 002 - specular + wrapMode: 0 + filterMode: 1 + aniso: 1 + - textureName: Marble 002 - glossiness + wrapMode: 0 + filterMode: 1 + aniso: 1 + - textureName: Marble 002 - roughness + wrapMode: 0 + filterMode: 1 + aniso: 1 + - textureName: Marble 002 - metallic + wrapMode: 0 + filterMode: 1 + aniso: 1 + - textureName: Marble 002 - ambientOcclusion + wrapMode: 0 + filterMode: 1 + aniso: 1 + - textureName: Marble 002 - height + wrapMode: 0 + filterMode: 1 + aniso: 1 + colorSpaceList: [] + inputTextureMap: [] + targetSettingList: + - label: Default + bOverride: 0 + bLockRatio: 1 + textureWidth: 4096 + textureHeight: 4096 + textureFormatMode: 0 + normalCompressed: 0 + bGenerateOnLoad: 1 + material: {fileID: -4681939019719023292, guid: ef9a54b8dacea9f44be70da43472f701, + type: 3} + generatedTextures: + - {fileID: -5564000130503291907, guid: ef9a54b8dacea9f44be70da43472f701, type: 3} + - {fileID: 5777664804669422655, guid: ef9a54b8dacea9f44be70da43472f701, type: 3} + - {fileID: -3258750942226492355, guid: ef9a54b8dacea9f44be70da43472f701, type: 3} + - {fileID: 4985089394248351555, guid: ef9a54b8dacea9f44be70da43472f701, type: 3} + - {fileID: 7116303992264550, guid: ef9a54b8dacea9f44be70da43472f701, type: 3} diff --git a/Assets/Materials/UI/Map Gravity Lines.mat b/Assets/Materials/UI/Map Gravity Lines.mat index 34a64cbf9..5f7364dda 100644 --- a/Assets/Materials/UI/Map Gravity Lines.mat +++ b/Assets/Materials/UI/Map Gravity Lines.mat @@ -86,7 +86,7 @@ Material: - _Mode: 0 - _OcclusionStrength: 1 - _Parallax: 0.02 - - _Scale: 2.7104213 + - _Scale: 2.3182888 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 diff --git a/Assets/Materials/UI/Shield.mat b/Assets/Materials/UI/Shield.mat new file mode 100644 index 000000000..5981cb7dd --- /dev/null +++ b/Assets/Materials/UI/Shield.mat @@ -0,0 +1,102 @@ +%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: Shield + m_Shader: {fileID: 4800000, guid: 4a4576dc60336e049bde3717977bed90, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _Albedo: + m_Texture: {fileID: 8900000, guid: e511a02541dd1b2408147e262d85f4cb, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Gradient: + m_Texture: {fileID: 2800000, guid: f40a71f4880bbef43987d3d694db88ae, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: 1afa1a9daca35a64bb4364856b8caf9a, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Offset: + m_Texture: {fileID: 8900000, guid: 979f53ed7bd747844b16f897ea06ad21, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AlbedoGamma: 0.95 + - _Alpha: 14.03 + - _Blend: -2 + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DitherSampleOffset: 0 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 1 + - _GlossyReflections: 1 + - _GradientMul: 1 + - _Metallic: 1 + - _Mode: 0 + - _NoiseAmplitude: 1 + - _NoiseScale: 1 + - _NoiseSpeed: 0.25 + - _OcclusionStrength: 1 + - _OffsetSize: 0.5 + - _Parallax: 0.02 + - _Radius: 3.6 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _TextureGamma: 0.33 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 15.937255, g: 15.937255, b: 15.937255, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _Impact: {r: 0, g: 1, b: 0, a: 0} + m_BuildTextureStacks: [] diff --git a/Assets/Materials/UI/Shield.mat.meta b/Assets/Materials/UI/Shield.mat.meta new file mode 100644 index 000000000..3b9e00d5e --- /dev/null +++ b/Assets/Materials/UI/Shield.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5553365534ae2a747bb7814c060660a3 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Models/Discobolus.meta b/Assets/Models/Discobolus.meta new file mode 100644 index 000000000..3c90f3a1c --- /dev/null +++ b/Assets/Models/Discobolus.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e6f6d4398bee324428604621ffaab171 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Models/Discobolus/Discobolus Bronze.mat b/Assets/Models/Discobolus/Discobolus Bronze.mat new file mode 100644 index 000000000..30697d42a --- /dev/null +++ b/Assets/Models/Discobolus/Discobolus Bronze.mat @@ -0,0 +1,80 @@ +%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: Discobolus Bronze + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _METALLICGLOSSMAP _NORMALMAP + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 2800000, guid: 9863db663524d9a4eab030a666b1f2da, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: -1863473678134789185, guid: 9fc901afb8a434e46b9405eaec2df5a4, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 6214616473909614744, guid: 9fc901afb8a434e46b9405eaec2df5a4, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 2800000, guid: d60207b632e464d4b884dded41db5b9b, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.005 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Models/Discobolus/Discobolus Bronze.mat.meta b/Assets/Models/Discobolus/Discobolus Bronze.mat.meta new file mode 100644 index 000000000..4ca3a3b46 --- /dev/null +++ b/Assets/Models/Discobolus/Discobolus Bronze.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 45f1ac126982c314a8471da3d264210b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Models/Discobolus/Discobolus Marble.mat b/Assets/Models/Discobolus/Discobolus Marble.mat new file mode 100644 index 000000000..3c862a22c --- /dev/null +++ b/Assets/Models/Discobolus/Discobolus Marble.mat @@ -0,0 +1,80 @@ +%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: Discobolus Marble + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _METALLICGLOSSMAP _NORMALMAP + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 2800000, guid: 9863db663524d9a4eab030a666b1f2da, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: -5564000130503291907, guid: ef9a54b8dacea9f44be70da43472f701, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: -3258750942226492355, guid: ef9a54b8dacea9f44be70da43472f701, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 2800000, guid: d60207b632e464d4b884dded41db5b9b, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.005 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Models/Discobolus/Discobolus Marble.mat.meta b/Assets/Models/Discobolus/Discobolus Marble.mat.meta new file mode 100644 index 000000000..68bfc9595 --- /dev/null +++ b/Assets/Models/Discobolus/Discobolus Marble.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 23d9c959237cef245a720f29305ad0c8 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Models/Discobolus/discobolus.fbx b/Assets/Models/Discobolus/discobolus.fbx new file mode 100644 index 000000000..e7af1c65f --- /dev/null +++ b/Assets/Models/Discobolus/discobolus.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:53b28980c3b31b22db56aad16ce35be3030a3c3a5f330247e3485f3fe2828d41 +size 2549420 diff --git a/Assets/Models/Discobolus/discobolus.fbx.meta b/Assets/Models/Discobolus/discobolus.fbx.meta new file mode 100644 index 000000000..9041aea61 --- /dev/null +++ b/Assets/Models/Discobolus/discobolus.fbx.meta @@ -0,0 +1,102 @@ +fileFormatVersion: 2 +guid: c1e2ab6a57d0bc24db6f9ab9d96b7088 +ModelImporter: + serializedVersion: 20200 + internalIDToNameTable: [] + externalObjects: {} + materials: + materialImportMode: 2 + materialName: 0 + materialSearch: 1 + materialLocation: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleCurves: 1 + optimizeGameObjects: 0 + motionNodeName: + rigImportErrors: + rigImportWarnings: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + importAnimatedCustomProperties: 0 + importConstraints: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + extraUserProperties: [] + clipAnimations: [] + isReadable: 0 + meshes: + lODScreenPercentages: [] + globalScale: 1 + meshCompression: 0 + addColliders: 0 + useSRGBMaterialColor: 1 + sortHierarchyByName: 1 + importVisibility: 1 + importBlendShapes: 1 + importCameras: 1 + importLights: 1 + fileIdsGeneration: 2 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + keepQuads: 0 + weldVertices: 1 + bakeAxisConversion: 0 + preserveHierarchy: 0 + skinWeightsMode: 0 + maxBonesPerVertex: 4 + minBoneWeight: 0.001 + meshOptimizationFlags: -1 + indexFormat: 0 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVMarginMethod: 1 + secondaryUVMinLightmapResolution: 40 + secondaryUVMinObjectScale: 1 + secondaryUVPackMargin: 4 + useFileScale: 1 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + normalCalculationMode: 4 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + referencedClips: [] + importAnimation: 1 + humanDescription: + serializedVersion: 3 + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + globalScale: 1 + rootMotionBoneName: + hasTranslationDoF: 0 + hasExtraRoot: 0 + skeletonHasParents: 1 + lastHumanDescriptionAvatarSource: {instanceID: 0} + autoGenerateAvatarMappingIfUnspecified: 1 + animationType: 2 + humanoidOversampling: 1 + avatarSetup: 0 + addHumanoidExtraRootOnlyWhenUsingAvatar: 1 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Models/Discobolus/discobolus.prefab b/Assets/Models/Discobolus/discobolus.prefab new file mode 100644 index 000000000..3e9fcdb42 --- /dev/null +++ b/Assets/Models/Discobolus/discobolus.prefab @@ -0,0 +1,83 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &7653378279096299729 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7024931875785927275} + - component: {fileID: 6256143951511086542} + - component: {fileID: 8157917296142455044} + m_Layer: 0 + m_Name: discobolus + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7024931875785927275 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7653378279096299729} + m_LocalRotation: {x: 0.000000081460335, y: 0, z: -0, w: 1} + m_LocalPosition: {x: -0, y: 0, z: 0} + m_LocalScale: {x: 100, y: 100, z: 100} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &6256143951511086542 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7653378279096299729} + m_Mesh: {fileID: -6289228040503649452, guid: c1e2ab6a57d0bc24db6f9ab9d96b7088, type: 3} +--- !u!23 &8157917296142455044 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7653378279096299729} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 23d9c959237cef245a720f29305ad0c8, 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_AdditionalVertexStreams: {fileID: 0} diff --git a/Assets/Models/Discobolus/discobolus.prefab.meta b/Assets/Models/Discobolus/discobolus.prefab.meta new file mode 100644 index 000000000..7b3263a3e --- /dev/null +++ b/Assets/Models/Discobolus/discobolus.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ab2bb4822c5d876419e52599c5a7bb57 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Models/Discobolus/discobolus_ao.png b/Assets/Models/Discobolus/discobolus_ao.png new file mode 100644 index 000000000..d1a559e16 --- /dev/null +++ b/Assets/Models/Discobolus/discobolus_ao.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e09f9c44322aab6b13cef7920fcf7dfefff01d0332ea93c99c49688c01d9e17e +size 1903246 diff --git a/Assets/Models/Discobolus/discobolus_ao.png.meta b/Assets/Models/Discobolus/discobolus_ao.png.meta new file mode 100644 index 000000000..69a271cfc --- /dev/null +++ b/Assets/Models/Discobolus/discobolus_ao.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: d60207b632e464d4b884dded41db5b9b +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + 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 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + 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 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Models/Discobolus/discobolus_normal.png b/Assets/Models/Discobolus/discobolus_normal.png new file mode 100644 index 000000000..3707109f3 --- /dev/null +++ b/Assets/Models/Discobolus/discobolus_normal.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67cf81aa10c52c3f19c0183fed44afeaf67f84914e186589c42f7473c063b1c0 +size 2735191 diff --git a/Assets/Models/Discobolus/discobolus_normal.png.meta b/Assets/Models/Discobolus/discobolus_normal.png.meta new file mode 100644 index 000000000..d95fe821b --- /dev/null +++ b/Assets/Models/Discobolus/discobolus_normal.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 9863db663524d9a4eab030a666b1f2da +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + 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 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + 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: 1 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Models/Icosphere.fbx b/Assets/Models/Icosphere.fbx new file mode 100644 index 000000000..881bd6c41 --- /dev/null +++ b/Assets/Models/Icosphere.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b81fe7088169b75601af8ec1d005953d2cfb271b600daf6c52f2dc5a897a9bb +size 13868 diff --git a/Assets/Models/Icosphere.fbx.meta b/Assets/Models/Icosphere.fbx.meta new file mode 100644 index 000000000..347702763 --- /dev/null +++ b/Assets/Models/Icosphere.fbx.meta @@ -0,0 +1,102 @@ +fileFormatVersion: 2 +guid: 54835210a86ee314984bb683289450c9 +ModelImporter: + serializedVersion: 20200 + internalIDToNameTable: [] + externalObjects: {} + materials: + materialImportMode: 2 + materialName: 0 + materialSearch: 1 + materialLocation: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleCurves: 1 + optimizeGameObjects: 0 + motionNodeName: + rigImportErrors: + rigImportWarnings: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + importAnimatedCustomProperties: 0 + importConstraints: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + extraUserProperties: [] + clipAnimations: [] + isReadable: 0 + meshes: + lODScreenPercentages: [] + globalScale: 1 + meshCompression: 0 + addColliders: 0 + useSRGBMaterialColor: 1 + sortHierarchyByName: 1 + importVisibility: 1 + importBlendShapes: 1 + importCameras: 1 + importLights: 1 + fileIdsGeneration: 2 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + keepQuads: 0 + weldVertices: 1 + bakeAxisConversion: 0 + preserveHierarchy: 0 + skinWeightsMode: 0 + maxBonesPerVertex: 4 + minBoneWeight: 0.001 + meshOptimizationFlags: -1 + indexFormat: 0 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVMarginMethod: 1 + secondaryUVMinLightmapResolution: 40 + secondaryUVMinObjectScale: 1 + secondaryUVPackMargin: 4 + useFileScale: 1 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + normalCalculationMode: 4 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + referencedClips: [] + importAnimation: 1 + humanDescription: + serializedVersion: 3 + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + globalScale: 1 + rootMotionBoneName: + hasTranslationDoF: 0 + hasExtraRoot: 0 + skeletonHasParents: 1 + lastHumanDescriptionAvatarSource: {instanceID: 0} + autoGenerateAvatarMappingIfUnspecified: 1 + animationType: 2 + humanoidOversampling: 1 + avatarSetup: 0 + addHumanoidExtraRootOnlyWhenUsingAvatar: 1 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Models/Icosphere.png b/Assets/Models/Icosphere.png new file mode 100644 index 000000000..0eeaf290c --- /dev/null +++ b/Assets/Models/Icosphere.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c2209be7f7c20fef341b7dd240755c9be65dd4e56d4347dcb5933ff2118607f1 +size 147843 diff --git a/Assets/Models/Icosphere.png.meta b/Assets/Models/Icosphere.png.meta new file mode 100644 index 000000000..8b5fb6854 --- /dev/null +++ b/Assets/Models/Icosphere.png.meta @@ -0,0 +1,108 @@ +fileFormatVersion: 2 +guid: 1afa1a9daca35a64bb4364856b8caf9a +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + 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 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + 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: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 1 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: 1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 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 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Models/Icosphere.psd b/Assets/Models/Icosphere.psd new file mode 100644 index 000000000..6333dabe8 --- /dev/null +++ b/Assets/Models/Icosphere.psd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:01659b69d544f6cd6f7472eb95fbc6810a2c7532ad62d7330b8ea03379e27763 +size 1091698 diff --git a/Assets/Models/Icosphere.psd.meta b/Assets/Models/Icosphere.psd.meta new file mode 100644 index 000000000..50394bce4 --- /dev/null +++ b/Assets/Models/Icosphere.psd.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 3d301661609c1494cbc6e3e5705cf175 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + 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 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + 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 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Models/IcosphereHigh.fbx b/Assets/Models/IcosphereHigh.fbx new file mode 100644 index 000000000..9a4571ba6 --- /dev/null +++ b/Assets/Models/IcosphereHigh.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d8259a2f5e25d13320f250125f42d2950d95c1706207395357b615b6fed3ee5b +size 56652 diff --git a/Assets/Models/IcosphereHigh.fbx.meta b/Assets/Models/IcosphereHigh.fbx.meta new file mode 100644 index 000000000..dbda24bb6 --- /dev/null +++ b/Assets/Models/IcosphereHigh.fbx.meta @@ -0,0 +1,102 @@ +fileFormatVersion: 2 +guid: e5d504c21bfa1ad4393cbe842cd1def6 +ModelImporter: + serializedVersion: 20200 + internalIDToNameTable: [] + externalObjects: {} + materials: + materialImportMode: 2 + materialName: 0 + materialSearch: 1 + materialLocation: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleCurves: 1 + optimizeGameObjects: 0 + motionNodeName: + rigImportErrors: + rigImportWarnings: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + importAnimatedCustomProperties: 0 + importConstraints: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + extraUserProperties: [] + clipAnimations: [] + isReadable: 0 + meshes: + lODScreenPercentages: [] + globalScale: 1 + meshCompression: 0 + addColliders: 0 + useSRGBMaterialColor: 1 + sortHierarchyByName: 1 + importVisibility: 1 + importBlendShapes: 1 + importCameras: 1 + importLights: 1 + fileIdsGeneration: 2 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + keepQuads: 0 + weldVertices: 1 + bakeAxisConversion: 0 + preserveHierarchy: 0 + skinWeightsMode: 0 + maxBonesPerVertex: 4 + minBoneWeight: 0.001 + meshOptimizationFlags: -1 + indexFormat: 0 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVMarginMethod: 1 + secondaryUVMinLightmapResolution: 40 + secondaryUVMinObjectScale: 1 + secondaryUVPackMargin: 4 + useFileScale: 1 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + normalCalculationMode: 4 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + referencedClips: [] + importAnimation: 1 + humanDescription: + serializedVersion: 3 + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + globalScale: 1 + rootMotionBoneName: + hasTranslationDoF: 0 + hasExtraRoot: 0 + skeletonHasParents: 1 + lastHumanDescriptionAvatarSource: {instanceID: 0} + autoGenerateAvatarMappingIfUnspecified: 1 + animationType: 2 + humanoidOversampling: 1 + avatarSetup: 0 + addHumanoidExtraRootOnlyWhenUsingAvatar: 1 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Models/mine.blend b/Assets/Models/mine.blend index 021921b40..d855548b9 100644 --- a/Assets/Models/mine.blend +++ b/Assets/Models/mine.blend @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3e29eee6a3212eada049e51c7a13a1e70830cf473ddb7bb46a58bcaff261cebc -size 1064712 +oid sha256:1bace85c552ad1d7b96c95af8aaf8f246eb9140df06d4554d926252ca48e2bf4 +size 1064944 diff --git a/Assets/Models/mine.blend1 b/Assets/Models/mine.blend1 index 2e5d3c8940bb193e1abb4e114d59a299394cd9aa..c623802d19dcc53806acf9a9f62310fbf3d8539d 100644 GIT binary patch delta 6559 zcmZ8lXHZ;MmiB7_5;=6!-E@A-M=yD1;*WwuJTCd`EY6Q}V~?(bGw8`Zt? z$}6QWO=_{Pwkpx~o#GhVKV=46f1D_cM*K6UYD<^>t|-RtkL~HQKVCR0{fDAxn+L_w zHur0i_)AePoQbd+^>gl|v%TeWxvj->dztjPucQ2Va)8V89^sO-xMw#*Ckv z7#lw~eqn$6e@kCKnRg@B1e2pR>h021!vCi`nd3YNlLY_9k}3cJ3V^P%64lk!IOdj$^6+vrG&Le7HkQ{Xgj)uinqu9;5)Wfy z@V4+QVU5#RSy{ow$q{Ae&*NfC3(jQ~;*6{SElq7`Yj1~#hX>60z8on(k>tv6CK;(C zt*voAI~#ADJBJ&-{+L%fLN8Y$Os){#PttPcLgsNiK7AS+LBYItN}z|-&K9YuDbROz zpySddob=S9#l01sm%7l>)&_#W8*=3QWQw=iflhMH+XsV66-E?}sFKN{mdTJ3;wXHO zqU8#OtSmgv&&Os+D5lIU&?DK0E|n=h?9*Uf=k~o+Dup#6G&3{9fddC%W^N8^I%7g& zBJv1Sbwv$Itc%c<+>PGLmr+6PGN<3r?|4Icy19w~Fu)W8;e*uETsEClICBQKqN2dt zNzuE{2%)xi47B*1g@uLqp1m^j@z%i5*N0w%0kM&B(3$Gc*VvE#!9nDnI>oo7X*o;b zy|hv;+sgw&RyLlJA8*FSBAbw#Qh=ipvgap1T$AzCt4dVYU-G);NAEuw-(tYuS;MYY*i;FOpu*H5@_{HLOwl+AL zmWHmL9*mBUqryvv^U`wU=NF)%u@PZmVYIljFq^r?rHuxMi|4epwH0Z{7TZI(hm^gS zNo_?R6crbve_#+*)|D6!pFn;=0m^kcI6FJ@`kY+;y(}9}Cj2g|i<7GyFflcSshJsM z5`Egt+A*Cw%U9)8*jiYa!-jk!qo^q5GB^o;%4y=fEeU;aP!Q(k7r-wpqFPsj6zdd} zWR{|%vlG=dHE?xx6*EM5&YyzuSuM)CL1fU8s;xu!W1+y2_F(*2+O>OP$pj0a1=;+8!03RP81Ox;i zFfb5)etytsG;ncofm*GGy}dn)r|^rsUe4@r3J$qyaQJWppOf!&vazgz$T2D&PEQ^Q z3=Bd*~;BxQxc8Cf;zyg}+v47C$mJhQTXW#P8em zdQ{ie;xw@<R4@VFoTwo`aiMufOGM8JDCs^2}cEV?8QaCpvDI>7m3+E7r;O8Ge z!g3Vp85!XF_>4k7&BzLt!?5EBuBb@{JccpkJB-1gE9i?D zKyS)r^yXYfPniK-^*!ilyM)%Zc3iyJjE06r%74A8dDQ9SnXIx zMPLP1fTy)0mV@VO%nSQ3)MJGJ-+L5c(wp zxGd>I&;DL?nRnxobr;%GI&dMs88r+zsm8f;ML2cp6k?-epinwMVNPJbSoZtM;($al zSD+RY=S?}kd^%opYbyqau86WQ(?5riQ)8I+pFyit8&YhKV9l_Or2syoJlH@f$@G-j z`o;#XUfaOh`Z@*aDwbE)u(-4$28N$m#O%a8W`^f5H86|Go@tD=OklWp6oV-gfJh2} zj{%pYgxg4uW}_A~o3@BMws^Nemr;SdygVFBJBCp5Z>a1bo;3u0ci=bunxECDNYC+` z@iIZCGvb0joA&uE)ZatQm*JsNlqH_WkoPcV&1SJ;vWiu^HLL|+MPpJEmKIm|v638g<5X!WR`9&hNKFnolmDPsBhSMagXdI`aygP-{`?RfQ@24AxgSaBX7~ z)3bbXRZvWeOFORgj^ccIIhrn9Bp90_tmV};QfgxH#00v!d(hY4kKxfVj7<{Dr)TK# zIsQRapt`xa6?Mh+D2pgVo;(lr_Khg_q!KFW7rv;{a1jGqh3@A=>3{8!8!#O|gQbBL z)HgI>d~!;Z{d%H0D_V=o%c9U;C0{J-R{5M72g9g(9KEVOj8;zI+UBPC+;QqBl9H1V z9)1}9B(mOA0X#|kT;1H@|$Ap83IA(*1bq$@TqUX%x|_9Puz zC+^*@?*OyrmR9=QMD17&N{h>^a6IZb9wcmGW*<>V_^QU6Gkh`<|MmC<$|#Zq#yZA6 zCJn5IVCTrl%p^RXC@L(@5L z{bQ)ji=w_IA|ir{csOZbh*(4zevQTpZfclFPB~_*$O-fqrMO|7nrJ^=>@8G4S=aGN90NM~OR_zI(`Lgg$ofl_VjQVnRo+NELE#-xZB|VvfmynQvSZbjnA|i1pEDXWH2jTDU4=*n-aBlp1gAf1PCaKHIBe3InQ&EkL ziA7Re60Qf_z`ANf_@=>)D;Yke(0x1|{lC;wK~6f(bbZh4ME}?m85C5VMWg?-hBK0! z%y4g9zy5mk;NV?{+p zID3|FZ|OCTlf{DaKd;CoJw#}L2YI&tTAUudVxX8#zk(SgkVC%JQ zJlx(!Yhf!MpA;a>zm6wQpJL~+fC?%?Iw}OEe5XFlk_H5OIk{g(rPoe)Q(we!WxTR8 zFeErwBz<^zI3-OnULzRWJCC6+)8k3O>v%f#2Htq~CU(i{s8^}1_k6DOz(N+%vAA&S;uNfHzkOs%Ca+&w%Afh$yMC+d*YM0yefn&)Kp%*ey`3On|P zTulnWjDlz@{NB*S8JLq<@&%LAw;sMGV%vVSgYM{VyixTGZ;`9sdgmSRB>j~%X_Zr1 zD4~|~?AfzoEzcrfr5-&BmTVDp#t`Cs0JW*iGYprri!0QQq{1pkN;uUEYz~kyd~)SM z5#$~=#Shp-d<>(Vj7%!NRvvN2vo>Gho4#z$K*`0VkjbMjy=S$F#hE#_EujrhPw(Q{ zleh5ft+&MtK2Mz?5g3IusGUBYj}s@fV#~>tj3#TbbTGwX?Wo4f`vq_}0`9yAoH><& zXOt!9+Oa?O@)xHN9V`59pqz^)WntxpwYIFs-%GLxF-WX`XDoj7_%WJKH$%vNf~U9M zAQnGkY0I|^xy6K1-yRSU2p^JnPbTj~EoT?P;p74bF}RKhr}(8&cb#l)iByd{35+`& zom_btOY`M0>bW{czi(fJo6FsmkcetT99Qd^nObbwmNFqDm&?gGbc{jW|WI zjYAI|!ULk~7Aej2_$-#gSFqi%BdQF`dZrs$S=q>-!Qv>YsP2+hA^f z*Dh?~nGZ=PABo0VJ~jp=C-c4I$~@l} zuqb<6e{^RQk#KImDW(b97#X|AXx_IE3jY_VyLUgALv+aa|~OEP0tS{}cv;;z2Gg zQ!063He}zwP6i5po=xJcMr>sml&f%A<&1g<{xI)SN?i(r$1XV7R?Hey4Y=ihTjUY@ zTu4KeJ8k#>wq&0AVOzRqploE@GE))5S&{H0GH3Iz^MPg|_|Opao{zoKns=R13P$rG zoJpE9xn04>EI4`CkpL%B)wy~5Ror~_RWubeVclv2H^y$`#;x0Q>D0@2EreS!g;!EM zBWQyG8UOBr^Zp3pezTui_;lec$0_*uC6zxr4r_A8#wWz5r>Ex7YT1g-#2dJN^Oo2l zvw@se;|G>JI0ydDQuzK9r5r<6Ho~V%C0v}6q*pF7^{1g@Z3L^jY@%nmwsHL?bO}1F zTCQPZoON|K=#K0dZ&-2SRQ&pi3+E)fv$DZ?u?JZK&o3_1OmQ7!Ba^sj)r_mB*bKHw zW85$aKi|LRVM4-0bF1)R?R74WT|=Vv=U4*jd}>-8Bfj?vDVy6Ka|?xp2bED)T+u(Ozpn8)Jc3f;SQ z?WGLe>9F|y&3YT&7Qg86{`x<8|Nojjt7;W~y)n;uiO!~5wvy5^x|o|qzhMxWjv44K z>7fgPd8&b#gpVJ)9%#fa%{yhieQ*ix8AVzZ>ta*4a$XC)^%i;n3~(Md`g%zxXKMfAN&DT;8zhY? zi+@+_eZgM$ez!G3zvH5pJ};GI@3xLH&^|7Ei}|?hemyR!lr5dAm7Eyf+LVy(BQqj1 eCNm-1Pj-OJl+29GoXmpElFVv%Yt#DNwf_S%IA5Uv delta 6628 zcmZ8lcW@MEmUj!~Fp_3QGb4?1&O%uz2S5oWKqvu1IU^K6NJ1J#G|HisGe{&OEJOnW z+fZ9|>pO4lZLqy{Ywz7Hd$o0Ud*v$MRe8O(Yj^#-_qAZxXwQ(kJb zS4yebD?4lXs~|_^t24pYuWFCly^3^~ywca#|AFYyz1}N5y#x9F{{{vIuS|`MUj^yu z2}0C8PHnBU!dq{>h0~``i`OLQIPqFoSje}f-U?V)SU@hb zgpao;$}1{RSyhb`$73i7EJ4G?i#T@tINuf*YIZ`Yz=o+A9v(f47sB(n70%7n)D-r% zHn>nyf~J-h6r~lRP?C?P(iU94as`J217X7VX36-m1V;xeBO{!W$?)v#Ig+!u>FtYI zl`Yy7Dg-MO!cP-&IFm?~&x^W@%xLxVTufwO_^6jt-o3%0`n_Guqob z#e1bvDIOu`$CEtNj&eEbeEqPbw#TT-4pnjm)buRcMAKMW}z*|b8Ii!mq zS|gE2#P^ve*>84bXM1?KpC6s!+h@id1!ii zQEFC#5uZ`ykuS^2%i-kY#J6Rg`)1)+%U+M=&upg|x%zXfbHT*wJym zDyzcM%+v%-MY+@xDuo>O!oO!Vavm&z0sj7&nVkbaH;2-KQY4rs;Cym1;jSIkH8t!Y zp(W=tE=Q%ZCP2oaw!T43m4^C@7|t32KQo8Xv2nC_c7pr}FE1}Knk=FwObBi4px0;- zqs$_0#7}1_g~zAbInI*z&$ZD=r7}1;x!^Qq!N~9!I!Zc`*FS)c&TF`G^(y=W4kIi) z98poxNTrM|C@4flWff}c>QQ{*0y49*5JNy?>zrNOV57E!wT&&5DjQgmeU?(WD5iuV z2G%#i9AZY!GA9VgEG?k4l7lLm@Oj=z&X^#gP$-b@6~HGKxXH5p=#0ZrD9@>&RH0OC zyu@n?98xARHZg$_3dQi~mol`^{9y^|l zq2Xa{-MWR1&6`+RUdJN8f`x)*%ug<2ergG`GYgoWnZ@MvG)BiKFr*#kg>!C-I)dl% zZgsSQq@JD9( z^kOefnpq0Q`X_L;t^;}Md@MRHV^KkCWh+=_B45RV`4VO%vzU-fV%U5XTFX%kOGhy& zpT>e}31gX)=+C^4!So>vmJgx3vxizl8=9J$(a>;FbXZwgInJLiru2#zou;Hzt53ES zzAX0Q{4&FAprB$O5*muBnHkYRa|;V%zOlA7&~qK#XL~R@I*xfhwZuzPfm24OFg`Ge zk-Bk|Ta;r-PKsMDk+O@JGo8n*(Hv$BcuecfU`lry6Ne@-erN)tI%62t8NrZ_7K1uN z7}C>1YfSeNEqW#W7*UNwbEXfSN4s#TrWq9_RX9ssE%$UTVq@b7R5nnV5VF2p^#01! zP)BDbUo9w0jX3W@s?yD^tr!>_#M}afu#+^&U%>L=RkX`GkYbsNjiya3`0;6F0UAp4 z!J#4a^z~tOet~SB7wvvis3xapM4%5+J=ah-x%{7 zS9sf7R^W7CE>_pq30BouSzE{2#s=MQu;2V-MNrUna%}GaI@`K%xw;L_5iO|mu1BqY zEvk*G(P+_xHs20Z&}p%eF{sz87rv};c)m9RGz6sp}GJCrUhuWYC&yUJ^FO|g)ghzxbU)AY1YTrQ@*(_8^XBH1m;f8qo%5s zQgfUNc01|`>Woy)FD_E|sKP4wVx?-8&#JN3Xw{?Wve96oatiC4n_@A|%F0GMHQwXN z$w){@#F5A-1O*4fle&uw)go5hSs`bIpRujr;1Gm{g^6`1hLFfgK+dUCMC>X>gWImQ zqrHPrKsBnlrImDPL{)h;3i9(MIOTH^tA6X4(c>{8d{yJYY5qf-_@|znUd+udicM!_ zZB0y7R+jn+0+*Va#Pd$l8O(X>>zi1uUdO!YBDy6S5a~FRkL=(KDpQp8rc1)tb?%&IF5-_26HHhvl8DTD zkPq2Dtj;qo!YCz^Xkt^Wq_U<~T}lk;xE7NRQ|PhnL+R0SH08J8#?39UAtqCNl9G}r zMhPN2VDB>9fYhAcK)cXx1({91!2|C0u#+Jv~YTy6zlA77-UrXeXN5lc?XShw30 zzHV^hiW9v|oqjtV`wc6HtnxA4-UxGrm6hUex-xwke+r@VSo>SwydlcXo7=d#eoOp4 z&Cep|PQqM!`|e#)T0<^lJYoWO#^1)ihSLm6#~jEWMGS5jJrop*NeV0Ral$(4AV z_XNV=6Fh$U6vC6II75>_IW_JQzP&BPjEcP#byyk2QYsVPZ9B(t7kE{>Um)R`5hM=} zPnyPZNsT>GmF9EJGz&b&Zr>iBJ%1O^-hEdrNL5w*mG*9KO!%t(6c-Rh2nrzj#4`Wk zBLRDYfT6A-?4&-xgPvWy`~LeRFVI3+OosDqopGE>*zcU?e4@w<#=a60ljya_c=Y%& z7AKamedIQFtM~BU^A~vk#Y^G}TE3;r$J`$tlyXkaE+Qkc<{xxLNQo|(TS#F+S1ECy z|D5y|zV6E5G%RV;X^3LU`snc!aqk<8+ZYQSr=jj$y!Vjye)$sP1j1_K5S5jcds6q*Lag5~EQAZp+&YTzjLe#Xlbl=oIN9LkwkF;NnUv0|=PK*~f$ zE*C!2G;*3SDthtp@gmW>efOSd_s)ZN&=%B&XNAx4RCtc}Uc8{>m=twlysNml7&I1( zqjE+@hB&#f_8lG(fj}xqzP^59@SF*$_70?%tsPW0YLUe%loWL((~oMCLUs7HlBC-k z{g`efmP|ytdq8`ujyd4@W%6ckCZ{2K&MIFl1&dYlS!y>d&Mat}pdLKU-N)XlfamYM zkFD)nC@n3;1)|qQ#3Ig|$wPK_Hd3i{us}1sgoK8Pm^r969u(38#nra<2lShqs#Gz@ z5g4p_m|3caa*W@KdIorim(T&cK% z`*AziZQjFUN>+x_yu5tm(ma(z73{=`3?x%qj3)#}QacR^38nTKK>N`=L~|5HI~@*= z&Xf#)*Ep9Vc$sGQT9T6n`iPfH5#{Pc>l{UI9>DVrRFw>>qBN!pUkpWXMrxc_sSqNQ z@d3kXjjK3-v1-Hm^?icr4po|2?L3yfR&l@R0UquNV%FDCsm;jDL>diQ$7!%;X~QBN z8Wv6|7$_R==I#k+)-TD+_6|<4wR0e-+M}2}JgloHersqYy{kwvjEsbNPX*m0}2(g{(ue4$Gz>Mw#Az@Bk~T>u7dv#{G~7*tyAS28m-Gt9aL%AZYlPR%TUG&oTn?c&7f%=UI76up+Hq0J?MNNKj5-qT&agPnJ z_wMiD?%Vg#8PbJ&o^Rvs?0vD}Fcuvh9m98y+bJELDRbUnz>eX-0qJrDzdP=1T$zi3wJKu z74KR9X4nYiyC$719Vt}Ic?S+mvQqN9lc9PonI8B^_@BviPIHk}AE|;~g&0GC9?h!67Xjb%zGp+h}rV z#k2HQC zcv`8|Es3FyiAA#KX64-$s3216HJKxLHXQiTu)Wt&8uR z3ze`<6;x*q6NLI@{L49egGe_w)VRon-_I3toQjWKu<>ClB=n(gn8r=^_QJ?A8Z0kj zBlZSv5OY~w+Yr5JZKLM<7hE_S{?07=knn;tZ+Z4;`ZstiQ2v zY!bWNxUq#xaZOmYSi`z@lkRUKzo3ZMEZOm^D~9~`l8UnzUMy{J?yOgulTO#Q!y@6E zygq|VQhGIx4P2Yhj*OCJeBX+TKJgX8tZ;wj2^Yg6!|Dn9sKjQox)Ti;k`80JdzCo- znut@@ij|bOta7stIo4FgS&dQiYimA+O&M zBzX*7rrntAoWb?ZVOF2`(Jd#7iznQ$UF-3e&u6^9`nO?^p9$}8J>t^b|N7o#=Rg0v zJLFHhK3Z(qY-2C;5uTMl$6Vq(V(k*dhGuJLF9Nha)fwxR?%(}XJgp5CGh3d*?`~~!vWJO#cv`rRd-3lT5(Q*&O&uwvmmJ?@J9+35^d z`h5S^_pkd}eeR!ijlcQvH7Wb+n;-9=H{pJBUguNy{m5Ew-jY-9f7Ho+vaR!>&BA%D zPUij}9d)j9#-3gcwrstp*Zvh}otHYsfABwe@CX0>ST~(7LKaTf>SXU;9)jI&wWzL#u=3)sYRh3r;!Q(f#NW9hK3-*-d(DyOxeHz5ACi@d$Q3SW;iF z)6Nj=~QLyLpwA6o4HX;i0D wZhBY$U_*8l7Y^-g>W~~F(IwF%(I+t=F(fe}F(xq~F(ol0k?ikmnx9?&f2JIcumAu6 diff --git a/Assets/MusicTest.cs b/Assets/MusicTest.cs new file mode 100644 index 000000000..a103fd6af --- /dev/null +++ b/Assets/MusicTest.cs @@ -0,0 +1,20 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Audio; +using UnityEngine.InputSystem; + +public class MusicTest : MonoBehaviour +{ + public float TransitionTime; + public AudioMixerSnapshot CombatSnapshot; + public AudioMixerSnapshot AmbientSnapshot; + + void Update() + { + if(Keyboard.current.aKey.wasPressedThisFrame) + AmbientSnapshot.TransitionTo(TransitionTime); + if(Keyboard.current.cKey.wasPressedThisFrame) + CombatSnapshot.TransitionTo(TransitionTime); + } +} diff --git a/Assets/Scripts/ServerShared/Agents/VelocityMatch.cs.meta b/Assets/MusicTest.cs.meta similarity index 83% rename from Assets/Scripts/ServerShared/Agents/VelocityMatch.cs.meta rename to Assets/MusicTest.cs.meta index e5470912a..abb09f017 100644 --- a/Assets/Scripts/ServerShared/Agents/VelocityMatch.cs.meta +++ b/Assets/MusicTest.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: df5185d5435658841878b6a8c9ff693b +guid: c2bc9afd74edd9d44a14d3465d60e1c4 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Resources/Prefabs/Shield.prefab b/Assets/Resources/Prefabs/Shield.prefab new file mode 100644 index 000000000..72b47098f --- /dev/null +++ b/Assets/Resources/Prefabs/Shield.prefab @@ -0,0 +1,367 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &6560402906539973100 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4325241563269881544} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1281fe44325f9b548aa42dc331b17266, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &8326552097884649274 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4325241563269881544} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c959273c4a61f124abd3728581b4aa38, type: 3} + m_Name: + m_EditorClassIdentifier: + Alpha: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: -2.6076918 + outSlope: -2.6076918 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0.057522126 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.056415915 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + Radius: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 8.713848 + outSlope: 8.713848 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0.05641593 + - serializedVersion: 3 + time: 1 + value: 4 + inSlope: -0.109472565 + outSlope: -0.109472565 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.056415915 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + AlbedoGamma: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 49.837627 + outSlope: 49.837627 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0.1111501 + - serializedVersion: 3 + time: 0.119427115 + value: 2.003746 + inSlope: -0.07577679 + outSlope: -0.07577679 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.07689258 + - serializedVersion: 3 + time: 0.49870214 + value: 0.66603607 + inSlope: 0.021693684 + outSlope: 0.021693684 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.85040694 + value: 0.99160814 + inSlope: -0.19486254 + outSlope: -0.19486254 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: -17.741524 + outSlope: -17.741524 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.08716334 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + TextureGamma: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1.8833333 + outSlope: 1.8833333 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0.05641593 + - serializedVersion: 3 + time: 0.48029917 + value: 0.39127755 + inSlope: 2.560102 + outSlope: 2.560102 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.08067294 + outWeight: 0.084916234 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0.11300004 + outSlope: 0.11300004 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.12024534 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + GradientMultiplier: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1.5 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0.07079646 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.05862832 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + Duration: 3 +--- !u!1 &8402070500206635106 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 9112456537762432107} + - component: {fileID: 5876989255319251260} + - component: {fileID: 4730182296032184511} + - component: {fileID: 4496698439921482513} + m_Layer: 17 + m_Name: Shield + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &9112456537762432107 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8402070500206635106} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -14.31, z: 0} + m_LocalScale: {x: 100, y: 100, z: 100} + m_Children: + - {fileID: 3984991765521532018} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!64 &5876989255319251260 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8402070500206635106} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 1 + m_CookingOptions: 30 + m_Mesh: {fileID: 289301614986012343, guid: 54835210a86ee314984bb683289450c9, type: 3} +--- !u!54 &4730182296032184511 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8402070500206635106} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 0 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 +--- !u!114 &4496698439921482513 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8402070500206635106} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a42e4b31178f74d43b17322b0ae8f178, type: 3} + m_Name: + m_EditorClassIdentifier: + ShieldPrototype: {fileID: 6560402906539973100} +--- !u!1001 &3514832566420628377 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 9112456537762432107} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: 54835210a86ee314984bb683289450c9, + type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 54835210a86ee314984bb683289450c9, + type: 3} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 54835210a86ee314984bb683289450c9, + type: 3} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 54835210a86ee314984bb683289450c9, + type: 3} + propertyPath: m_LocalScale.z + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 54835210a86ee314984bb683289450c9, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 54835210a86ee314984bb683289450c9, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 54835210a86ee314984bb683289450c9, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 54835210a86ee314984bb683289450c9, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 54835210a86ee314984bb683289450c9, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 54835210a86ee314984bb683289450c9, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 54835210a86ee314984bb683289450c9, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 54835210a86ee314984bb683289450c9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 54835210a86ee314984bb683289450c9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 54835210a86ee314984bb683289450c9, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7511558181221131132, guid: 54835210a86ee314984bb683289450c9, + type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 5553365534ae2a747bb7814c060660a3, type: 2} + - target: {fileID: -5754084199372789682, guid: 54835210a86ee314984bb683289450c9, + type: 3} + propertyPath: m_Mesh + value: + objectReference: {fileID: -1579241630799410176, guid: e5d504c21bfa1ad4393cbe842cd1def6, + type: 3} + - target: {fileID: 919132149155446097, guid: 54835210a86ee314984bb683289450c9, + type: 3} + propertyPath: m_Name + value: Shield Visual + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 54835210a86ee314984bb683289450c9, type: 3} +--- !u!1 &4325241563269881544 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 54835210a86ee314984bb683289450c9, + type: 3} + m_PrefabInstance: {fileID: 3514832566420628377} + m_PrefabAsset: {fileID: 0} +--- !u!4 &3984991765521532018 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 54835210a86ee314984bb683289450c9, + type: 3} + m_PrefabInstance: {fileID: 3514832566420628377} + m_PrefabAsset: {fileID: 0} diff --git a/Assets/Resources/Prefabs/Shield.prefab.meta b/Assets/Resources/Prefabs/Shield.prefab.meta new file mode 100644 index 000000000..886f79fee --- /dev/null +++ b/Assets/Resources/Prefabs/Shield.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 897fa55d98f1f7f40b889f93ce9146f4 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Prefabs/Ships/Djinni.prefab b/Assets/Resources/Prefabs/Ships/Djinni.prefab index d7f6fbc79..c07ce3058 100644 --- a/Assets/Resources/Prefabs/Ships/Djinni.prefab +++ b/Assets/Resources/Prefabs/Ships/Djinni.prefab @@ -2618,7 +2618,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: -5899741495057040748, guid: 06d6a565d43fba5409712ce9a10bfbef, type: 3} + - {fileID: 2100000, guid: 5acb4b3490cbda04c85ad7cca3b2b325, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -3231,8 +3231,8 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: -5899741495057040748, guid: 06d6a565d43fba5409712ce9a10bfbef, type: 3} - - {fileID: 3720744386649352057, guid: a1d39ea984432bf44b4a0686afe2bf1a, type: 3} + - {fileID: 2100000, guid: 5acb4b3490cbda04c85ad7cca3b2b325, type: 2} + - {fileID: 2100000, guid: 71e1f3613633dfa488fff097aaf97660, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -3461,8 +3461,8 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 3720744386649352057, guid: b2bec4b400153d745b2915f1c43e5c96, type: 3} - - {fileID: 3720744386649352057, guid: a1d39ea984432bf44b4a0686afe2bf1a, type: 3} + - {fileID: 2100000, guid: 5e43f48908cce2949a41677ec48affe5, type: 2} + - {fileID: 2100000, guid: 71e1f3613633dfa488fff097aaf97660, type: 2} - {fileID: 2100000, guid: 55857aff163e94e458c46d2a778ff5f5, type: 2} m_StaticBatchInfo: firstSubMesh: 0 @@ -5325,8 +5325,8 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 3720744386649352057, guid: b2bec4b400153d745b2915f1c43e5c96, type: 3} - - {fileID: -3155047780354543793, guid: cbc61995a46604441ab9de4f1c68e290, type: 3} + - {fileID: 2100000, guid: 5e43f48908cce2949a41677ec48affe5, type: 2} + - {fileID: 2100000, guid: 33a2546b27ff92d4fb43d5a76a9693c0, type: 2} - {fileID: 2100000, guid: 55857aff163e94e458c46d2a778ff5f5, type: 2} m_StaticBatchInfo: firstSubMesh: 0 @@ -5530,9 +5530,9 @@ MeshRenderer: m_Materials: - {fileID: 2100000, guid: 55857aff163e94e458c46d2a778ff5f5, type: 2} - {fileID: 2100000, guid: 55857aff163e94e458c46d2a778ff5f5, type: 2} - - {fileID: 3720744386649352057, guid: a1d39ea984432bf44b4a0686afe2bf1a, type: 3} - - {fileID: 3720744386649352057, guid: b2bec4b400153d745b2915f1c43e5c96, type: 3} - - {fileID: -905690159841262435, guid: a74970be876d3554ea0f279f39314c9c, type: 3} + - {fileID: 2100000, guid: 71e1f3613633dfa488fff097aaf97660, type: 2} + - {fileID: 2100000, guid: 5e43f48908cce2949a41677ec48affe5, type: 2} + - {fileID: 2100000, guid: d9945c5ff1a646d43a949a0d657b766a, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -5643,7 +5643,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 3720744386649352057, guid: b2bec4b400153d745b2915f1c43e5c96, type: 3} + - {fileID: 2100000, guid: 5e43f48908cce2949a41677ec48affe5, type: 2} - {fileID: 2100000, guid: b9036e605cc538943a8c7bec97257e87, type: 2} m_StaticBatchInfo: firstSubMesh: 0 @@ -6503,8 +6503,8 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 3720744386649352057, guid: b2bec4b400153d745b2915f1c43e5c96, type: 3} - - {fileID: 3720744386649352057, guid: a1d39ea984432bf44b4a0686afe2bf1a, type: 3} + - {fileID: 2100000, guid: 5e43f48908cce2949a41677ec48affe5, type: 2} + - {fileID: 2100000, guid: 71e1f3613633dfa488fff097aaf97660, type: 2} - {fileID: 2100000, guid: 55857aff163e94e458c46d2a778ff5f5, type: 2} - {fileID: 2100000, guid: 55857aff163e94e458c46d2a778ff5f5, type: 2} m_StaticBatchInfo: @@ -6557,7 +6557,7 @@ Transform: m_GameObject: {fileID: 7930906210874266039} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} m_LocalPosition: {x: 0, y: 723, z: 0} - m_LocalScale: {x: 5000, y: 5000, z: 5000} + m_LocalScale: {x: 10000, y: 10000, z: 10000} m_Children: [] m_Father: {fileID: 9106854767781449910} m_RootOrder: 1 @@ -6856,7 +6856,7 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 9106854767781449910} - - component: {fileID: 6570456556431566658} + - component: {fileID: 6567919108791990551} m_Layer: 0 m_Name: Djinni m_TagString: Untagged @@ -6881,10 +6881,11 @@ Transform: - {fileID: 7199358476342105780} - {fileID: 3659313866188730483} - {fileID: 5496325214845933821} + - {fileID: 5670809732538438839} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &6570456556431566658 +--- !u!114 &6567919108791990551 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -6893,11 +6894,14 @@ MonoBehaviour: m_GameObject: {fileID: 8442521443025013260} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 170aefb3b5cd0e444826f3561d38a962, type: 3} + m_Script: {fileID: 11500000, guid: 1306f57022ae47ceba7441145a065cb1, type: 3} m_Name: m_EditorClassIdentifier: + InvisibleMaterial: {fileID: 2100000, guid: c94a225de88e5ce42af01c34df3521e6, type: 2} + Shield: {fileID: 1053924711515204557} HullColliders: - {fileID: 7082458133318971407} + RadiatorHardpoints: [] ThrusterHardpoints: - {fileID: 3048427942634017260} - {fileID: 5958530706230866031} @@ -7202,3 +7206,105 @@ MonoBehaviour: PitchMin: -45 PitchMax: 15 Speed: 15 +--- !u!1001 &3514832566920941788 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 9106854767781449910} + m_Modifications: + - target: {fileID: 8402070500206635106, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_Name + value: Shield + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_RootOrder + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalScale.x + value: 85793.17 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalScale.y + value: 103625.586 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalScale.z + value: 42394.773 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalPosition.y + value: 175 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalPosition.z + value: -106 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.7660445 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalRotation.x + value: -0.6427876 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -80 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 897fa55d98f1f7f40b889f93ce9146f4, type: 3} +--- !u!4 &5670809732538438839 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + m_PrefabInstance: {fileID: 3514832566920941788} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1053924711515204557 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 4496698439921482513, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + m_PrefabInstance: {fileID: 3514832566920941788} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a42e4b31178f74d43b17322b0ae8f178, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/Resources/Prefabs/Ships/Longinus.prefab b/Assets/Resources/Prefabs/Ships/Longinus.prefab index 7802aa2a5..3ba781759 100644 --- a/Assets/Resources/Prefabs/Ships/Longinus.prefab +++ b/Assets/Resources/Prefabs/Ships/Longinus.prefab @@ -9,7 +9,7 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 737798575382408336} - - component: {fileID: 105552333169325611} + - component: {fileID: 7577392600424441103} m_Layer: 0 m_Name: Longinus m_TagString: Untagged @@ -24,7 +24,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 105552333169325610} - m_LocalRotation: {x: -0, y: -0.97430885, z: -0, w: 0.22521621} + m_LocalRotation: {x: 0, y: -0.97430915, z: 0, w: 0.22521469} m_LocalPosition: {x: -1139.85, y: -548.8677, z: 3386.47} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: @@ -40,10 +40,12 @@ Transform: - {fileID: 3808243475646715368} - {fileID: 3808243476101349906} - {fileID: 3808243476704657384} + - {fileID: 4269524162621747868} + - {fileID: 6012453260758506882} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: -153.969, z: 0} ---- !u!114 &105552333169325611 +--- !u!114 &7577392600424441103 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -52,9 +54,11 @@ MonoBehaviour: m_GameObject: {fileID: 105552333169325610} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 170aefb3b5cd0e444826f3561d38a962, type: 3} + m_Script: {fileID: 11500000, guid: 1306f57022ae47ceba7441145a065cb1, type: 3} m_Name: m_EditorClassIdentifier: + InvisibleMaterial: {fileID: 2100000, guid: c94a225de88e5ce42af01c34df3521e6, type: 2} + Shield: {fileID: 1396696402015347448} HullColliders: - {fileID: 622200413621136597} RadiatorHardpoints: @@ -133,6 +137,115 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: eff043e6f0a5f834ebfbc7f750260ae0, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!1 &857813017853441363 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4269524162621747868} + - component: {fileID: 6221707909262488405} + - component: {fileID: 1981845523498315582} + - component: {fileID: 3638216765184493918} + - component: {fileID: 3196801085833126476} + m_Layer: 14 + m_Name: Icon + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4269524162621747868 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 857813017853441363} + m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} + m_LocalPosition: {x: 0, y: 7.23, z: 0} + m_LocalScale: {x: 100, y: 100, z: 100} + m_Children: [] + m_Father: {fileID: 737798575382408336} + m_RootOrder: 12 + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} +--- !u!33 &6221707909262488405 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 857813017853441363} + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &1981845523498315582 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 857813017853441363} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 658219dea0cf83049b6ab46c2f3436ed, 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: 0 + 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_AdditionalVertexStreams: {fileID: 0} +--- !u!64 &3638216765184493918 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 857813017853441363} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &3196801085833126476 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 857813017853441363} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 52538a3309c36fc4583c964a1c0b705f, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &1573073701486667854 GameObject: m_ObjectHideFlags: 0 @@ -895,9 +1008,9 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 3720744386649352057, guid: a1d39ea984432bf44b4a0686afe2bf1a, type: 3} - - {fileID: -3155047780354543793, guid: cbc61995a46604441ab9de4f1c68e290, type: 3} - - {fileID: 7490952440742008943, guid: 0be5fb1df83ac8e499a3f6a060041e49, type: 3} + - {fileID: 2100000, guid: 71e1f3613633dfa488fff097aaf97660, type: 2} + - {fileID: 2100000, guid: 33a2546b27ff92d4fb43d5a76a9693c0, type: 2} + - {fileID: 2100000, guid: 98fb5ab74514d6947ad084ce427b86a4, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1253,9 +1366,9 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 3720744386649352057, guid: a1d39ea984432bf44b4a0686afe2bf1a, type: 3} - - {fileID: -3155047780354543793, guid: cbc61995a46604441ab9de4f1c68e290, type: 3} - - {fileID: 7490952440742008943, guid: 0be5fb1df83ac8e499a3f6a060041e49, type: 3} + - {fileID: 2100000, guid: 71e1f3613633dfa488fff097aaf97660, type: 2} + - {fileID: 2100000, guid: 33a2546b27ff92d4fb43d5a76a9693c0, type: 2} + - {fileID: 2100000, guid: 98fb5ab74514d6947ad084ce427b86a4, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1586,12 +1699,12 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 3720744386649352057, guid: a1d39ea984432bf44b4a0686afe2bf1a, type: 3} + - {fileID: 2100000, guid: 71e1f3613633dfa488fff097aaf97660, type: 2} - {fileID: 2100000, guid: 55857aff163e94e458c46d2a778ff5f5, type: 2} - - {fileID: 3720744386649352057, guid: b2bec4b400153d745b2915f1c43e5c96, type: 3} - - {fileID: -3155047780354543793, guid: cbc61995a46604441ab9de4f1c68e290, type: 3} - - {fileID: -905690159841262435, guid: a74970be876d3554ea0f279f39314c9c, type: 3} - - {fileID: -3155047780354543793, guid: cbc61995a46604441ab9de4f1c68e290, type: 3} + - {fileID: 2100000, guid: 5e43f48908cce2949a41677ec48affe5, type: 2} + - {fileID: 2100000, guid: 33a2546b27ff92d4fb43d5a76a9693c0, type: 2} + - {fileID: 2100000, guid: d9945c5ff1a646d43a949a0d657b766a, type: 2} + - {fileID: 2100000, guid: 33a2546b27ff92d4fb43d5a76a9693c0, type: 2} - {fileID: 6043740553786384731, guid: 8d782a44e1004d9458415dc40c13af65, type: 3} - {fileID: 2100000, guid: b9036e605cc538943a8c7bec97257e87, type: 2} - {fileID: 2100000, guid: 761295ee40506ed489244e2dd3b73158, type: 2} @@ -1616,3 +1729,105 @@ MeshRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_AdditionalVertexStreams: {fileID: 0} +--- !u!1001 &3244127278357174761 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 737798575382408336} + m_Modifications: + - target: {fileID: 8402070500206635106, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_Name + value: Shield + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_RootOrder + value: 13 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalScale.x + value: 395.3487 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalScale.y + value: 235.47029 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalScale.z + value: 990.37805 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.73 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalPosition.z + value: 1.32 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 897fa55d98f1f7f40b889f93ce9146f4, type: 3} +--- !u!4 &6012453260758506882 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + m_PrefabInstance: {fileID: 3244127278357174761} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1396696402015347448 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 4496698439921482513, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + m_PrefabInstance: {fileID: 3244127278357174761} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a42e4b31178f74d43b17322b0ae8f178, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/Resources/Prefabs/Stations/Zenith.prefab b/Assets/Resources/Prefabs/Stations/Zenith.prefab index eb1fddb15..2ee4baf01 100644 --- a/Assets/Resources/Prefabs/Stations/Zenith.prefab +++ b/Assets/Resources/Prefabs/Stations/Zenith.prefab @@ -154,10 +154,13 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 170aefb3b5cd0e444826f3561d38a962, type: 3} m_Name: m_EditorClassIdentifier: + InvisibleMaterial: {fileID: 2100000, guid: c94a225de88e5ce42af01c34df3521e6, type: 2} HullColliders: [] + RadiatorHardpoints: [] ThrusterHardpoints: [] WeaponHardpoints: [] ArticulationPoints: [] + DestroyEffect: {fileID: 0} --- !u!1001 &2820167578821308726 PrefabInstance: m_ObjectHideFlags: 0 @@ -239,26 +242,22 @@ PrefabInstance: type: 3} propertyPath: m_Materials.Array.data[0] value: - objectReference: {fileID: -6026401407715332296, guid: e7758cad28ae98f478940e55222419a6, - type: 3} + objectReference: {fileID: 2100000, guid: 0635cf2d392265944afa2b9ce2aab35f, type: 2} - target: {fileID: 70568184056594590, guid: 7b7796ac88cf0724ca09bddf817828f1, type: 3} propertyPath: m_Materials.Array.data[1] value: - objectReference: {fileID: 3720744386649352057, guid: 1c858fec5b74c7c46b1712494192b6b5, - type: 3} + objectReference: {fileID: 2100000, guid: b9f65861b71050b4a84fe0007bedbba9, type: 2} - target: {fileID: 107625526037656489, guid: 7b7796ac88cf0724ca09bddf817828f1, type: 3} propertyPath: m_Materials.Array.data[0] value: - objectReference: {fileID: -6026401407715332296, guid: e7758cad28ae98f478940e55222419a6, - type: 3} + objectReference: {fileID: 2100000, guid: 0635cf2d392265944afa2b9ce2aab35f, type: 2} - target: {fileID: 107625526037656489, guid: 7b7796ac88cf0724ca09bddf817828f1, type: 3} propertyPath: m_Materials.Array.data[1] value: - objectReference: {fileID: 3720744386649352057, guid: 1c858fec5b74c7c46b1712494192b6b5, - type: 3} + objectReference: {fileID: 2100000, guid: b9f65861b71050b4a84fe0007bedbba9, type: 2} - target: {fileID: 919132149155446097, guid: 7b7796ac88cf0724ca09bddf817828f1, type: 3} propertyPath: m_Name @@ -268,26 +267,22 @@ PrefabInstance: type: 3} propertyPath: m_Materials.Array.data[0] value: - objectReference: {fileID: -6026401407715332296, guid: e7758cad28ae98f478940e55222419a6, - type: 3} + objectReference: {fileID: 2100000, guid: 0635cf2d392265944afa2b9ce2aab35f, type: 2} - target: {fileID: 3689309066650553245, guid: 7b7796ac88cf0724ca09bddf817828f1, type: 3} propertyPath: m_Materials.Array.data[1] value: - objectReference: {fileID: 3720744386649352057, guid: 1c858fec5b74c7c46b1712494192b6b5, - type: 3} + objectReference: {fileID: 2100000, guid: b9f65861b71050b4a84fe0007bedbba9, type: 2} - target: {fileID: 7953148190234225185, guid: 7b7796ac88cf0724ca09bddf817828f1, type: 3} propertyPath: m_Materials.Array.data[0] value: - objectReference: {fileID: -6026401407715332296, guid: e7758cad28ae98f478940e55222419a6, - type: 3} + objectReference: {fileID: 2100000, guid: 0635cf2d392265944afa2b9ce2aab35f, type: 2} - target: {fileID: 7953148190234225185, guid: 7b7796ac88cf0724ca09bddf817828f1, type: 3} propertyPath: m_Materials.Array.data[1] value: - objectReference: {fileID: 3720744386649352057, guid: 1c858fec5b74c7c46b1712494192b6b5, - type: 3} + objectReference: {fileID: 2100000, guid: b9f65861b71050b4a84fe0007bedbba9, type: 2} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 7b7796ac88cf0724ca09bddf817828f1, type: 3} --- !u!4 &2353559640203777757 stripped diff --git a/Assets/Resources/Prefabs/Turrets/Turret.prefab b/Assets/Resources/Prefabs/Turrets/Turret.prefab index 22e178224..c7484c207 100644 --- a/Assets/Resources/Prefabs/Turrets/Turret.prefab +++ b/Assets/Resources/Prefabs/Turrets/Turret.prefab @@ -168,10 +168,10 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 3720744386649352057, guid: 504c7bfe0d50ff64a88b8eac2ceb46f8, type: 3} - - {fileID: 3720744386649352057, guid: b2bec4b400153d745b2915f1c43e5c96, type: 3} - - {fileID: 3720744386649352057, guid: b2bec4b400153d745b2915f1c43e5c96, type: 3} - - {fileID: 3720744386649352057, guid: 504c7bfe0d50ff64a88b8eac2ceb46f8, type: 3} + - {fileID: 2100000, guid: 38f8ba6b169127249b6532be2b3926ee, type: 2} + - {fileID: 2100000, guid: 5e43f48908cce2949a41677ec48affe5, type: 2} + - {fileID: 2100000, guid: 5e43f48908cce2949a41677ec48affe5, type: 2} + - {fileID: 2100000, guid: 38f8ba6b169127249b6532be2b3926ee, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -618,8 +618,8 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 3720744386649352057, guid: b2bec4b400153d745b2915f1c43e5c96, type: 3} - - {fileID: 3954565982357225544, guid: 53adf8e53222e6f4791d7bf2110fb70c, type: 3} + - {fileID: 2100000, guid: 38f8ba6b169127249b6532be2b3926ee, type: 2} + - {fileID: 2100000, guid: 33a2546b27ff92d4fb43d5a76a9693c0, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -830,9 +830,9 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 3720744386649352057, guid: b2bec4b400153d745b2915f1c43e5c96, type: 3} - - {fileID: 3720744386649352057, guid: 504c7bfe0d50ff64a88b8eac2ceb46f8, type: 3} - - {fileID: -741235592913766832, guid: 885e680924fc12c439a842a2142d4b78, type: 3} + - {fileID: 2100000, guid: 5e43f48908cce2949a41677ec48affe5, type: 2} + - {fileID: 2100000, guid: 38f8ba6b169127249b6532be2b3926ee, type: 2} + - {fileID: 2100000, guid: 33a2546b27ff92d4fb43d5a76a9693c0, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -913,10 +913,10 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: f396635dc77c59c44ac85ae278a2e909, type: 2} - - {fileID: 3720744386649352057, guid: 504c7bfe0d50ff64a88b8eac2ceb46f8, type: 3} - - {fileID: 3720744386649352057, guid: b2bec4b400153d745b2915f1c43e5c96, type: 3} - - {fileID: -741235592913766832, guid: 885e680924fc12c439a842a2142d4b78, type: 3} + - {fileID: 2100000, guid: a76a85450aa271448a72b7dfeec9ff53, type: 2} + - {fileID: 2100000, guid: 38f8ba6b169127249b6532be2b3926ee, type: 2} + - {fileID: 2100000, guid: 5e43f48908cce2949a41677ec48affe5, type: 2} + - {fileID: 2100000, guid: 33a2546b27ff92d4fb43d5a76a9693c0, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -1072,6 +1072,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 170aefb3b5cd0e444826f3561d38a962, type: 3} m_Name: m_EditorClassIdentifier: + InvisibleMaterial: {fileID: 2100000, guid: c94a225de88e5ce42af01c34df3521e6, type: 2} HullColliders: - {fileID: 6946734302097032818} - {fileID: 2664341253667465548} @@ -1206,9 +1207,9 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 3954565982357225544, guid: 53adf8e53222e6f4791d7bf2110fb70c, type: 3} - - {fileID: 3720744386649352057, guid: b2bec4b400153d745b2915f1c43e5c96, type: 3} - - {fileID: 381320166465554420, guid: f143db2fec0aefa45b3255990a395382, type: 3} + - {fileID: 2100000, guid: 33a2546b27ff92d4fb43d5a76a9693c0, type: 2} + - {fileID: 2100000, guid: 38f8ba6b169127249b6532be2b3926ee, type: 2} + - {fileID: 2100000, guid: b9036e605cc538943a8c7bec97257e87, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Resources/Settings.asset b/Assets/Resources/Settings.asset index d57863278..b41778774 100644 --- a/Assets/Resources/Settings.asset +++ b/Assets/Resources/Settings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1f20c3bdc450d25228c47b070bfa3ecef980161490ff8322307057952caafc21 -size 7393 +oid sha256:654b727404adc4c8916f68efad8c103c05209f29f84ef103ad740636f5d04099 +size 7640 diff --git a/Assets/Resources/Sun Albedo/sunsurface1map 1.png b/Assets/Resources/Sun Albedo/sunsurface1map 1.png new file mode 100644 index 000000000..d4c4b9450 --- /dev/null +++ b/Assets/Resources/Sun Albedo/sunsurface1map 1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a4fdea8a5fc05e2182f1844d217283c72d8a33d4c33ff8169da4ea68501d40e3 +size 4449433 diff --git a/Assets/Resources/Sun Albedo/sunsurface1map 1.png.meta b/Assets/Resources/Sun Albedo/sunsurface1map 1.png.meta new file mode 100644 index 000000000..bb453f221 --- /dev/null +++ b/Assets/Resources/Sun Albedo/sunsurface1map 1.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: e511a02541dd1b2408147e262d85f4cb +TextureImporter: + internalIDToNameTable: + - first: + 89: 8900000 + second: generatedCubemap + externalObjects: {} + serializedVersion: 11 + 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 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + 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: 2 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sun Flow/sunsurface1offset 1.png b/Assets/Resources/Sun Flow/sunsurface1offset 1.png new file mode 100644 index 000000000..55142f639 --- /dev/null +++ b/Assets/Resources/Sun Flow/sunsurface1offset 1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a7145b7532b4ca9732abe0dcd2a794f5e579df1536b8d2225f35fcdbc9fb7e9a +size 4249473 diff --git a/Assets/Resources/Sun Flow/sunsurface1offset 1.png.meta b/Assets/Resources/Sun Flow/sunsurface1offset 1.png.meta new file mode 100644 index 000000000..7dbe30089 --- /dev/null +++ b/Assets/Resources/Sun Flow/sunsurface1offset 1.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: 979f53ed7bd747844b16f897ea06ad21 +TextureImporter: + internalIDToNameTable: + - first: + 89: 8900000 + second: generatedCubemap + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 1 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 1 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + 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: 2 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Sun Flow/sunsurface1offset.png.meta b/Assets/Resources/Sun Flow/sunsurface1offset.png.meta index a6e6fb85a..a20477985 100644 --- a/Assets/Resources/Sun Flow/sunsurface1offset.png.meta +++ b/Assets/Resources/Sun Flow/sunsurface1offset.png.meta @@ -10,7 +10,7 @@ TextureImporter: mipmaps: mipMapMode: 1 enableMipMap: 1 - sRGBTexture: 1 + sRGBTexture: 0 linearTexture: 0 fadeOut: 1 borderMipMap: 0 @@ -58,6 +58,8 @@ TextureImporter: textureType: 0 textureShape: 2 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 diff --git a/Assets/Resources/Sun Flow/sunsurface2offset.png.meta b/Assets/Resources/Sun Flow/sunsurface2offset.png.meta index 7e8f39404..364d6b598 100644 --- a/Assets/Resources/Sun Flow/sunsurface2offset.png.meta +++ b/Assets/Resources/Sun Flow/sunsurface2offset.png.meta @@ -10,7 +10,7 @@ TextureImporter: mipmaps: mipMapMode: 1 enableMipMap: 1 - sRGBTexture: 1 + sRGBTexture: 0 linearTexture: 0 fadeOut: 1 borderMipMap: 0 @@ -58,6 +58,8 @@ TextureImporter: textureType: 0 textureShape: 2 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 diff --git a/Assets/Scenes/ARPG.meta b/Assets/Scenes/ARPG.meta new file mode 100644 index 000000000..d59675da8 --- /dev/null +++ b/Assets/Scenes/ARPG.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 30afeaea9f520f646b3111920d970384 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/ARPG.unity b/Assets/Scenes/ARPG.unity index 94f21ab9c..03aafa4c6 100644 --- a/Assets/Scenes/ARPG.unity +++ b/Assets/Scenes/ARPG.unity @@ -20,25 +20,25 @@ RenderSettings: m_FogDensity: 0.01 m_LinearFogStart: 0 m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.32166424, g: 0.33275613, b: 0.35493988, a: 1} + m_AmbientSkyColor: {r: 0.45403165, g: 0.48193306, b: 0.5377358, a: 1} m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 3 + m_AmbientIntensity: 0.666 + m_AmbientMode: 0 m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 0} + m_SkyboxMaterial: {fileID: 2100000, guid: 79db663d2fbb102459f8b1caf620f8c9, type: 2} m_HaloStrength: 0.47 m_FlareStrength: 1 m_FlareFadeSpeed: 3 m_HaloTexture: {fileID: 0} m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 1 + m_DefaultReflectionMode: 0 m_DefaultReflectionResolution: 128 m_ReflectionBounces: 1 - m_ReflectionIntensity: 0.8 - m_CustomReflection: {fileID: 8900000, guid: 6c0135b6b66262141b9c5c465f8cb018, type: 3} + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 8900000, guid: 2cd5af9c042f8c2409442e43b090016d, type: 3} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_IndirectSpecularColor: {r: 0.111797504, g: 0.13342327, b: 0.15460941, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -70,7 +70,7 @@ LightmapSettings: m_FinalGather: 0 m_FinalGatherFiltering: 1 m_FinalGatherRayCount: 256 - m_ReflectionCompression: 2 + m_ReflectionCompression: 1 m_MixedBakeMode: 2 m_BakeBackend: 1 m_PVRSampling: 1 @@ -97,7 +97,8 @@ LightmapSettings: m_ExportTrainingData: 0 m_TrainingDataDestination: TrainingData m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 0} + m_LightingDataAsset: {fileID: 112000000, guid: c7aea8e5a9f104740890efe87e445579, + type: 2} m_LightingSettings: {fileID: 0} --- !u!196 &4 NavMeshSettings: @@ -4271,14 +4272,14 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 393266591} - m_LocalRotation: {x: -0, y: -0.98129517, z: -0, w: 0.19250913} - m_LocalPosition: {x: -89, y: 0, z: -105} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -3.03} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 359038939} m_Father: {fileID: 1665127616} m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: -157.802, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &393266593 MonoBehaviour: m_ObjectHideFlags: 0 @@ -4307,7 +4308,7 @@ MonoBehaviour: Dutch: 0 LensShift: {x: 0, y: 0} m_Transitions: - m_BlendHint: 0 + m_BlendHint: 3 m_InheritPosition: 0 m_OnCameraLive: m_PersistentCalls: @@ -8579,6 +8580,70 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 661332567} m_CullTransparentMesh: 0 +--- !u!1 &666227430 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 666227432} + - component: {fileID: 666227431} + m_Layer: 0 + m_Name: Reflection Probe + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!215 &666227431 +ReflectionProbe: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 666227430} + m_Enabled: 1 + serializedVersion: 2 + m_Type: 0 + m_Mode: 0 + m_RefreshMode: 0 + m_TimeSlicingMode: 0 + m_Resolution: 256 + m_UpdateFrequency: 0 + m_BoxSize: {x: 10000, y: 10000, z: 10000} + m_BoxOffset: {x: 0, y: 0, z: 0} + m_NearClip: 0.3 + m_FarClip: 1000 + m_ShadowDistance: 100 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_IntensityMultiplier: 1 + m_BlendDistance: 1 + m_HDR: 1 + m_BoxProjection: 0 + m_RenderDynamicObjects: 0 + m_UseOcclusionCulling: 1 + m_Importance: 1 + m_CustomBakedTexture: {fileID: 0} +--- !u!4 &666227432 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 666227430} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &677710706 GameObject: m_ObjectHideFlags: 0 @@ -11398,14 +11463,14 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 887677621} - m_LocalRotation: {x: -0, y: -0.9228971, z: -0, w: 0.3850468} - m_LocalPosition: {x: 53.6, y: 0, z: 21} + 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_Children: - {fileID: 1319157835} m_Father: {fileID: 1665127616} m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: -134.707, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &906882333 GameObject: m_ObjectHideFlags: 0 @@ -12920,6 +12985,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: bed3b49fe74863340b2a75f3d0517e86, type: 3} m_Name: m_EditorClassIdentifier: + EntityFadeTime: 3 EffectManagerParent: {fileID: 134113271} FogCameraParent: {fileID: 1547889399} Settings: {fileID: 11400000, guid: cd2344e2001a37544aab0960c164d4ff, type: 2} @@ -23143,13 +23209,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2115559087} - m_LocalRotation: {x: -0, y: -0.98129517, z: -0, w: 0.19250913} - m_LocalPosition: {x: -89, y: 0, z: -105} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -3.03} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1665127616} m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 10.742, y: -15.218, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &2115559091 MonoBehaviour: m_ObjectHideFlags: 0 @@ -23171,9 +23237,9 @@ MonoBehaviour: antialiasingMode: 3 temporalAntialiasing: jitterSpread: 1 - sharpness: 0.25 - stationaryBlending: 0.95 - motionBlending: 0.85 + sharpness: 0 + stationaryBlending: 0.98 + motionBlending: 0.98 subpixelMorphologicalAntialiasing: quality: 2 fastApproximateAntialiasing: diff --git a/Assets/Scenes/ARPG/LightingData.asset b/Assets/Scenes/ARPG/LightingData.asset new file mode 100644 index 000000000..15ea2a743 --- /dev/null +++ b/Assets/Scenes/ARPG/LightingData.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:38b4962ac6bb38592c0b3dff0aea9a567360cc28ce7b6ed197384fe3a325b81d +size 18256 diff --git a/Assets/Scenes/ARPG/LightingData.asset.meta b/Assets/Scenes/ARPG/LightingData.asset.meta new file mode 100644 index 000000000..4439f2dc9 --- /dev/null +++ b/Assets/Scenes/ARPG/LightingData.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c7aea8e5a9f104740890efe87e445579 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 112000000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/ARPG/ReflectionProbe-0.exr b/Assets/Scenes/ARPG/ReflectionProbe-0.exr new file mode 100644 index 000000000..00b4ad8cd --- /dev/null +++ b/Assets/Scenes/ARPG/ReflectionProbe-0.exr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:884c3ee6a3357f041c215dc66809eef298f6b87bc42edc19bd56470789bfae0f +size 1578632 diff --git a/Assets/Scenes/ARPG/ReflectionProbe-0.exr.meta b/Assets/Scenes/ARPG/ReflectionProbe-0.exr.meta new file mode 100644 index 000000000..8185bb7b8 --- /dev/null +++ b/Assets/Scenes/ARPG/ReflectionProbe-0.exr.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 9b1a0f707dfa7e74c9f9bf01d46207ae +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + 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 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 1 + seamlessCubemap: 1 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + 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: 2 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 100 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/ARPG/ReflectionProbe-1.exr b/Assets/Scenes/ARPG/ReflectionProbe-1.exr new file mode 100644 index 000000000..f1887bb1a --- /dev/null +++ b/Assets/Scenes/ARPG/ReflectionProbe-1.exr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5697f4456dd9c4f436606f4a78d367e4859d5349530ef12f08ff3b90b7cca548 +size 421749 diff --git a/Assets/Scenes/ARPG/ReflectionProbe-1.exr.meta b/Assets/Scenes/ARPG/ReflectionProbe-1.exr.meta new file mode 100644 index 000000000..0b60a8340 --- /dev/null +++ b/Assets/Scenes/ARPG/ReflectionProbe-1.exr.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 4d15af36c64a606478ee8401822716aa +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + 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 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 1 + seamlessCubemap: 1 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + 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: 2 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 100 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/ARPG_Profiles/Postprocessing Profile.asset b/Assets/Scenes/ARPG_Profiles/Postprocessing Profile.asset index 2173785a7..2698acd6d 100644 --- a/Assets/Scenes/ARPG_Profiles/Postprocessing Profile.asset +++ b/Assets/Scenes/ARPG_Profiles/Postprocessing Profile.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1234dcaed3b2de3e54d94614162415c17688e02eb570d9da58d27c4daa961db1 -size 25029 +oid sha256:cadad0b275dddaac37d40f8b96693a47357343aabe1a5835f4643701972ffbdc +size 25033 diff --git a/Assets/Scenes/LightningTestScene.meta b/Assets/Scenes/LightningTestScene.meta new file mode 100644 index 000000000..7b6cd278b --- /dev/null +++ b/Assets/Scenes/LightningTestScene.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 327ad0375eb0f6e4591e51437317863c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/LightningTestScene.unity b/Assets/Scenes/LightningTestScene.unity index 276e6cff3..d212931b9 100644 --- a/Assets/Scenes/LightningTestScene.unity +++ b/Assets/Scenes/LightningTestScene.unity @@ -26,7 +26,7 @@ RenderSettings: m_AmbientIntensity: 1 m_AmbientMode: 3 m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_SkyboxMaterial: {fileID: 2100000, guid: 79db663d2fbb102459f8b1caf620f8c9, type: 2} m_HaloStrength: 0.5 m_FlareStrength: 1 m_FlareFadeSpeed: 3 @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_IndirectSpecularColor: {r: 0.18113758, g: 0.20078251, b: 0.17357464, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &4 LightmapSettings: @@ -97,7 +97,8 @@ LightmapSettings: m_ExportTrainingData: 0 m_TrainingDataDestination: TrainingData m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 0} + m_LightingDataAsset: {fileID: 112000000, guid: 8be4e064def86184fa0fc3069be9b9ec, + type: 2} m_LightingSettings: {fileID: 1821185769} --- !u!196 &5 NavMeshSettings: @@ -182,7 +183,7 @@ MonoBehaviour: jitterSpread: 0.75 sharpness: 0.25 stationaryBlending: 0.95 - motionBlending: 0.85 + motionBlending: 0 subpixelMorphologicalAntialiasing: quality: 2 fastApproximateAntialiasing: @@ -269,13 +270,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 104940725} - m_LocalRotation: {x: -0.2419218, y: 0, z: 0, w: 0.9702958} - m_LocalPosition: {x: 0, y: 0, z: -330} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -10} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 310526803} m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: -28, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &310526802 GameObject: m_ObjectHideFlags: 0 @@ -315,12 +316,159 @@ MonoBehaviour: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 310526802} - m_Enabled: 1 + m_Enabled: 0 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 47e64413aeb5ae740b410d70fb05d20c, type: 3} m_Name: m_EditorClassIdentifier: rotSpeed: {x: 0, y: 15, z: 0} +--- !u!1001 &426221916 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 8326552097884649274, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: Duration + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8402070500206635106, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_Name + value: Shield + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalPosition.x + value: -10 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalRotation.z + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 90 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 897fa55d98f1f7f40b889f93ce9146f4, type: 3} +--- !u!1001 &924112690 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 235077144, guid: 897fa55d98f1f7f40b889f93ce9146f4, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8402070500206635106, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_Name + value: Shield (1) + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_RootOrder + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalPosition.x + value: 10 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9112456537762432107, guid: 897fa55d98f1f7f40b889f93ce9146f4, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 897fa55d98f1f7f40b889f93ce9146f4, type: 3} --- !u!1 &1812750579 GameObject: m_ObjectHideFlags: 0 @@ -546,5 +694,10 @@ PrefabInstance: propertyPath: m_Name value: Lightning objectReference: {fileID: 0} + - target: {fileID: 7383646976225659343, guid: eb3a880755444d144a4d7f13ef11df77, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: eb3a880755444d144a4d7f13ef11df77, type: 3} diff --git a/Assets/Scenes/LightningTestScene/LightingData.asset b/Assets/Scenes/LightningTestScene/LightingData.asset new file mode 100644 index 000000000..00294ad0a --- /dev/null +++ b/Assets/Scenes/LightningTestScene/LightingData.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99bf3cd0c2d43c9479653f9d3ca14140f680718b2e6406b08cd6f58e35ea4b17 +size 18208 diff --git a/Assets/Scenes/LightningTestScene/LightingData.asset.meta b/Assets/Scenes/LightningTestScene/LightingData.asset.meta new file mode 100644 index 000000000..b2f050795 --- /dev/null +++ b/Assets/Scenes/LightningTestScene/LightingData.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8be4e064def86184fa0fc3069be9b9ec +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 112000000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/LightningTestScene/ReflectionProbe-0.exr b/Assets/Scenes/LightningTestScene/ReflectionProbe-0.exr new file mode 100644 index 000000000..19ebedcdb --- /dev/null +++ b/Assets/Scenes/LightningTestScene/ReflectionProbe-0.exr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3a200f73703b40e129b5e4d346ad0aab692e731777b1a98a9aa2a659def7c6c3 +size 482450 diff --git a/Assets/Scenes/LightningTestScene/ReflectionProbe-0.exr.meta b/Assets/Scenes/LightningTestScene/ReflectionProbe-0.exr.meta new file mode 100644 index 000000000..664cd26a4 --- /dev/null +++ b/Assets/Scenes/LightningTestScene/ReflectionProbe-0.exr.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 3601b1f614ca6544fb09ce596a137749 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + 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 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 1 + seamlessCubemap: 1 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + 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: 2 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 100 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/MusicTest.unity b/Assets/Scenes/MusicTest.unity new file mode 100644 index 000000000..31b17a6bd --- /dev/null +++ b/Assets/Scenes/MusicTest.unity @@ -0,0 +1,605 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &746903059 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 746903062} + - component: {fileID: 746903061} + - component: {fileID: 746903060} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &746903060 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 746903059} + m_Enabled: 1 +--- !u!20 &746903061 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 746903059} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0.31132078, g: 0.31132078, b: 0.31132078, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &746903062 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 746903059} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &783217159 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 783217161} + - component: {fileID: 783217160} + m_Layer: 0 + m_Name: MusicManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &783217160 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 783217159} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c2bc9afd74edd9d44a14d3465d60e1c4, type: 3} + m_Name: + m_EditorClassIdentifier: + TransitionTime: 5 + CombatSnapshot: {fileID: 4951561632732636846, guid: d220a87cb27315048975cce74c6d84b6, + type: 2} + AmbientSnapshot: {fileID: -603028713283386147, guid: d220a87cb27315048975cce74c6d84b6, + type: 2} +--- !u!4 &783217161 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 783217159} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &813951580 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 813951582} + - component: {fileID: 813951581} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &813951581 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 813951580} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &813951582 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 813951580} + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &1760457183 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1760457185} + - component: {fileID: 1760457184} + m_Layer: 0 + m_Name: Ambient + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!82 &1760457184 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1760457183} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: -4850697152304757985, guid: d220a87cb27315048975cce74c6d84b6, + type: 2} + m_audioClip: {fileID: 8300000, guid: 87ea9825d40c580469ccd947cd1954d8, type: 3} + m_PlayOnAwake: 1 + m_Volume: 1 + m_Pitch: 1 + Loop: 1 + 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!4 &1760457185 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1760457183} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1882565429 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1882565431} + - component: {fileID: 1882565430} + m_Layer: 0 + m_Name: Combat + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!82 &1882565430 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1882565429} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 4584421116988752864, guid: d220a87cb27315048975cce74c6d84b6, + type: 2} + m_audioClip: {fileID: 8300000, guid: 7cd0308c0f4ea354384fd97573516132, type: 3} + m_PlayOnAwake: 1 + m_Volume: 1 + m_Pitch: 1 + Loop: 1 + 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!4 &1882565431 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1882565429} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Scenes/MusicTest.unity.meta b/Assets/Scenes/MusicTest.unity.meta new file mode 100644 index 000000000..0d9482b3f --- /dev/null +++ b/Assets/Scenes/MusicTest.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 329ba502cff95994db78bee35715203d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gameplay/ActionGameManager.cs b/Assets/Scripts/Gameplay/ActionGameManager.cs index 6bcf740fd..c819b096a 100644 --- a/Assets/Scripts/Gameplay/ActionGameManager.cs +++ b/Assets/Scripts/Gameplay/ActionGameManager.cs @@ -120,7 +120,6 @@ public class ActionGameManager : MonoBehaviour SectorRenderer.LoadZone(Zone); _input = new AetheriaInput(); - _input.Player.Enable(); _input.Global.Enable(); _input.UI.Enable(); @@ -136,10 +135,10 @@ public class ActionGameManager : MonoBehaviour if (Menu.gameObject.activeSelf && Menu.CurrentTab == MenuTab.Map) { Cursor.lockState = CursorLockMode.Locked; - _input.Player.Enable(); Menu.gameObject.SetActive(false); if (CurrentShip != null && CurrentShip.Parent == null) { + _input.Player.Enable(); GameplayUI.SetActive(true); SchematicDisplay.ShowShip(CurrentShip); @@ -161,10 +160,10 @@ public class ActionGameManager : MonoBehaviour if (Menu.gameObject.activeSelf && Menu.CurrentTab == MenuTab.Inventory) { Cursor.lockState = CursorLockMode.Locked; - _input.Player.Enable(); Menu.gameObject.SetActive(false); if (CurrentShip != null && CurrentShip.Parent == null) { + _input.Player.Enable(); GameplayUI.SetActive(true); SchematicDisplay.ShowShip(CurrentShip); @@ -251,12 +250,12 @@ public class ActionGameManager : MonoBehaviour else CurrentShip.TriggerGroups[SchematicDisplay.SelectedGroupIndex].items.Add(item.Item); foreach (var group in item.Item.BehaviorGroups.Values) { - var behavior = group.GetBehavior(); - if(behavior != null) + var weapon = group.GetBehavior(); + if(weapon != null) { - if (CurrentShip.TriggerGroups[SchematicDisplay.SelectedGroupIndex].behaviors.Contains(behavior)) - CurrentShip.TriggerGroups[SchematicDisplay.SelectedGroupIndex].behaviors.Remove(behavior); - else CurrentShip.TriggerGroups[SchematicDisplay.SelectedGroupIndex].behaviors.Add(behavior); + if (CurrentShip.TriggerGroups[SchematicDisplay.SelectedGroupIndex].weapons.Contains(weapon)) + CurrentShip.TriggerGroups[SchematicDisplay.SelectedGroupIndex].weapons.Remove(weapon); + else CurrentShip.TriggerGroups[SchematicDisplay.SelectedGroupIndex].weapons.Add(weapon); } } SchematicDisplay.UpdateTriggerGroups(); @@ -265,73 +264,73 @@ public class ActionGameManager : MonoBehaviour _input.Player.FireGroup1.started += context => { if (CurrentShip.Parent != null) return; - foreach (var s in CurrentShip.TriggerGroups[0].behaviors) s.Activate(); + foreach (var s in CurrentShip.TriggerGroups[0].weapons) s.Activate(); }; _input.Player.FireGroup1.canceled += context => { if (CurrentShip.Parent != null) return; - foreach (var s in CurrentShip.TriggerGroups[0].behaviors) s.Deactivate(); + foreach (var s in CurrentShip.TriggerGroups[0].weapons) s.Deactivate(); }; _input.Player.FireGroup2.started += context => { if (CurrentShip.Parent != null) return; - foreach (var s in CurrentShip.TriggerGroups[1].behaviors) s.Activate(); + foreach (var s in CurrentShip.TriggerGroups[1].weapons) s.Activate(); }; _input.Player.FireGroup2.canceled += context => { if (CurrentShip.Parent != null) return; - foreach (var s in CurrentShip.TriggerGroups[1].behaviors) s.Deactivate(); + foreach (var s in CurrentShip.TriggerGroups[1].weapons) s.Deactivate(); }; _input.Player.FireGroup3.started += context => { if (CurrentShip.Parent != null) return; - foreach (var s in CurrentShip.TriggerGroups[2].behaviors) s.Activate(); + foreach (var s in CurrentShip.TriggerGroups[2].weapons) s.Activate(); }; _input.Player.FireGroup3.canceled += context => { if (CurrentShip.Parent != null) return; - foreach (var s in CurrentShip.TriggerGroups[2].behaviors) s.Deactivate(); + foreach (var s in CurrentShip.TriggerGroups[2].weapons) s.Deactivate(); }; _input.Player.FireGroup4.started += context => { if (CurrentShip.Parent != null) return; - foreach (var s in CurrentShip.TriggerGroups[3].behaviors) s.Activate(); + foreach (var s in CurrentShip.TriggerGroups[3].weapons) s.Activate(); }; _input.Player.FireGroup4.canceled += context => { if (CurrentShip.Parent != null) return; - foreach (var s in CurrentShip.TriggerGroups[3].behaviors) s.Deactivate(); + foreach (var s in CurrentShip.TriggerGroups[3].weapons) s.Deactivate(); }; _input.Player.FireGroup5.started += context => { if (CurrentShip.Parent != null) return; - foreach (var s in CurrentShip.TriggerGroups[4].behaviors) s.Activate(); + foreach (var s in CurrentShip.TriggerGroups[4].weapons) s.Activate(); }; _input.Player.FireGroup5.canceled += context => { if (CurrentShip.Parent != null) return; - foreach (var s in CurrentShip.TriggerGroups[4].behaviors) s.Deactivate(); + foreach (var s in CurrentShip.TriggerGroups[4].weapons) s.Deactivate(); }; _input.Player.FireGroup6.started += context => { if (CurrentShip.Parent != null) return; - foreach (var s in CurrentShip.TriggerGroups[5].behaviors) s.Activate(); + foreach (var s in CurrentShip.TriggerGroups[5].weapons) s.Activate(); }; _input.Player.FireGroup6.canceled += context => { if (CurrentShip.Parent != null) return; - foreach (var s in CurrentShip.TriggerGroups[5].behaviors) s.Deactivate(); + foreach (var s in CurrentShip.TriggerGroups[5].weapons) s.Deactivate(); }; #endregion @@ -344,6 +343,10 @@ public class ActionGameManager : MonoBehaviour SaveZone(); }); + var testCorp = new MegaCorporation(); + testCorp.Name = "TestCorp"; + testCorp.PlayerHostile = true; + var stationType = ItemData.GetAll().First(x=>x.HullType==HullType.Station); var stationHull = ItemManager.CreateInstance(stationType, 0, 1) as EquippableItem; var stationParent = Zone.PlanetInstances.Values.OrderByDescending(p => p.BodyData.Mass.Value).ElementAt(3); @@ -352,11 +355,12 @@ public class ActionGameManager : MonoBehaviour var stationPos = stationParentPos + ItemManager.Random.NextFloat2Direction() * stationParent.GravityWellRadius.Value * .1f; var stationOrbit = Zone.CreateOrbit(stationParentOrbit, stationPos); var station = new OrbitalEntity(ItemManager, Zone, stationHull, stationOrbit.ID); + station.Faction = testCorp; Zone.Entities.Add(station); var dockingBayData = ItemData.GetAll().First(); var dockingBay = ItemManager.CreateInstance(dockingBayData, 1, 1) as EquippableItem; station.TryEquip(dockingBay); - station.Active = true; + station.Activate(); var turretLoadout = Loadouts.First(x => x.Name == "Turret"); @@ -370,26 +374,30 @@ public class ActionGameManager : MonoBehaviour var pos = planetPos + ItemManager.Random.NextFloat2Direction() * planet.GravityWellRadius.Value * (.1f + .1f * j); var orbit = Zone.CreateOrbit(planetOrbit, pos); var turret = EntityPack.Unpack(ItemManager, Zone, turretLoadout, orbit.ID, true); - turret.Active = true; + turret.Activate(); + turret.Name = $"Turret {i}-{(char) ('A' + j)}"; + turret.Faction = testCorp; Zone.Entities.Add(turret); } } var enemyShipLoadout = Loadouts.First(x => ((HullData) ItemManager.GetData(x.Hull)).HullType == HullType.Ship); var enemyShip = EntityPack.Unpack(ItemManager, Zone, enemyShipLoadout, true); - enemyShip.Active = true; + enemyShip.Faction = testCorp; + enemyShip.Activate(); Zone.Entities.Add(enemyShip); - var agent = new Agent(enemyShip); + var agent = new Minion(enemyShip); var task = new PatrolOrbitsTask(); task.Circuit = Zone.Orbits.OrderBy(_ => Random.value).Take(4).Select(x => x.Key).ToArray(); agent.Task = task; _shipAgents.Add(agent); DockedEntity = station; + SectorRenderer.PerspectiveEntity = DockedEntity; DockingBay = station.DockingBays.First(); DockCamera.enabled = true; FollowCamera.enabled = false; - DockCamera.Follow = SectorRenderer.EntityInstances[station].Transform; + DockCamera.Follow = SectorRenderer.EntityInstances[station].transform; var parentOrbit = Zone.Orbits[station.OrbitData].Data.Parent; var parentPlanet = SectorRenderer.Planets[Zone.Planets.FirstOrDefault(p => p.Value.Orbit == parentOrbit).Key]; DockCamera.LookAt = parentPlanet.Body.transform; @@ -421,12 +429,12 @@ public class ActionGameManager : MonoBehaviour if (bay != null) { DockedEntity = entity; + SectorRenderer.PerspectiveEntity = DockedEntity; DockingBay = bay; DockCamera.enabled = true; FollowCamera.enabled = false; - CurrentShip.Active = false; var orbital = (OrbitalEntity) entity; - DockCamera.Follow = SectorRenderer.EntityInstances[orbital].Transform; + DockCamera.Follow = SectorRenderer.EntityInstances[orbital].transform; var parentOrbit = Zone.Orbits[orbital.OrbitData].Data.Parent; var parentPlanet = SectorRenderer.Planets[Zone.Planets.FirstOrDefault(p => p.Value.Orbit == parentOrbit).Key]; DockCamera.LookAt = parentPlanet.Body.transform; @@ -464,15 +472,15 @@ public class ActionGameManager : MonoBehaviour } else if (CurrentShip.Parent.TryUndock(CurrentShip)) { + SectorRenderer.PerspectiveEntity = CurrentShip; Menu.gameObject.SetActive(false); DockedEntity = null; DockingBay = null; - CurrentShip.Active = true; //_shipInput = new ShipInput(_input.Player, _currentShip); DockCamera.enabled = false; FollowCamera.enabled = true; FollowCamera.LookAt = SectorRenderer.EntityInstances[CurrentShip].LookAtPoint; - FollowCamera.Follow = SectorRenderer.EntityInstances[CurrentShip].Transform; + FollowCamera.Follow = SectorRenderer.EntityInstances[CurrentShip].transform; _articulationGroups = CurrentShip.Equipment .Where(item => item.Behaviors.Any(x => x.Data is WeaponData && !(x.Data is LauncherData))) .GroupBy(item => SectorRenderer.EntityInstances[CurrentShip] diff --git a/Assets/Scripts/Gameplay/EntityInstance.cs b/Assets/Scripts/Gameplay/EntityInstance.cs new file mode 100644 index 000000000..ce6f83026 --- /dev/null +++ b/Assets/Scripts/Gameplay/EntityInstance.cs @@ -0,0 +1,450 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using UniRx; +using UnityEngine; +using Unity.Mathematics; +using static Unity.Mathematics.math; +using float2 = Unity.Mathematics.float2; + +public class EntityInstance : MonoBehaviour +{ + public Material InvisibleMaterial; + public static Transform EffectManagerParent; + public ShieldManager Shield; + public HullCollider[] HullColliders; + + public RadiatorHardpoint[] RadiatorHardpoints; + public ThrusterHardpoint[] ThrusterHardpoints; + public WeaponHardpoint[] WeaponHardpoints; + public ArticulationPoint[] ArticulationPoints; + + public GameObject DestroyEffect; + + public event Action OnFadedOut; + public event Action OnFadedIn; + + private List _fadeMaterials = new List(); + private Dictionary _meshes = new Dictionary(); + private List<(MeshRenderer mesh, int submesh, Material material)> _nonFadedSubmeshes = new List<(MeshRenderer mesh, int submesh, Material material)>(); + private List _subscriptions = new List(); + private float _fade = 0; + private bool _fading; + private bool _fadingIn; + private bool _fadedElementsVisible = false; + private bool _unfadedElementsVisible = false; + private float _fadeTime; + + private static Dictionary _instantWeaponManagers = new Dictionary(); + private static Dictionary _constantWeaponManagers = new Dictionary(); + + public Dictionary Barrels { get; private set; } + public Dictionary BarrelIndices { get; private set; } + public Dictionary RadiatorMeshes { get; private set; } + public Transform LookAtPoint { get; private set; } + public Entity Entity { get; private set; } + public SectorRenderer SectorRenderer { get; private set; } + public bool Visible + { + get => _fade > 0.01f; + } + + private void Awake() + { + var meshes = gameObject.GetComponentsInChildren(); + var materials = new List<(Material material, List<(MeshRenderer renderer, int index)> submeshes)>(); + foreach (var mesh in meshes) + { + _meshes.Add(mesh, mesh.sharedMaterials); + for (var i = 0; i < mesh.sharedMaterials.Length; i++) + { + var material = mesh.sharedMaterials[i]; + if (material.shader.FindPropertyIndex("_Fade") >= 0) + { + var match = materials.FirstOrDefault(lm => lm.material == material); + if(match.material==null || material.shader.FindPropertyIndex("_EmissionFresnel") >= 0) + { + match = (material, new List<(MeshRenderer renderer, int index)>()); + materials.Add(match); + } + match.submeshes.Add((mesh, i)); + } + else + { + _nonFadedSubmeshes.Add((mesh, i, material)); + _meshes[mesh][i] = InvisibleMaterial; + } + } + } + + foreach (var (material, submeshes) in materials) + { + var materialInstance = Instantiate(material); + _fadeMaterials.Add(materialInstance); + foreach (var (mesh, index) in submeshes) + { + _meshes[mesh][index] = materialInstance; + } + materialInstance.SetFloat("_Fade", 0); + } + + foreach (var mesh in _meshes.Keys) mesh.enabled = false; + + foreach (var mesh in _meshes) mesh.Key.sharedMaterials = mesh.Value; + } + + protected virtual void ShowUnfadedElements() + { + _unfadedElementsVisible = true; + foreach (var (mesh, submesh, material) in _nonFadedSubmeshes) _meshes[mesh][submesh] = material; + foreach (var mesh in _meshes) mesh.Key.sharedMaterials = mesh.Value; + } + + protected virtual void HideUnfadedElements() + { + _unfadedElementsVisible = false; + foreach (var (mesh, submesh, material) in _nonFadedSubmeshes) _meshes[mesh][submesh] = InvisibleMaterial; + foreach (var mesh in _meshes) mesh.Key.sharedMaterials = mesh.Value; + } + + public void FadeIn(float time) + { + if (_fade > .99f) + { + _fading = false; + return; + } + _fadeTime = time; + _fading = true; + _fadingIn = true; + } + + public void FadeOut(float time) + { + if (_fade < .01f) + { + _fading = false; + return; + } + _fadeTime = time; + _fading = true; + _fadingIn = false; + } + + public virtual void SetEntity(SectorRenderer sectorRenderer, Entity entity) + { + gameObject.name = entity.Name; + Entity = entity; + SectorRenderer = sectorRenderer; + var hullData = entity.ItemManager.GetData(entity.Hull) as HullData; + + if(Shield) + Shield.Entity = entity; + foreach (var hullCollider in HullColliders) hullCollider.Entity = entity; + + foreach (var item in entity.Equipment) + { + foreach (var behavior in item.Behaviors) + { + if (behavior is InstantWeapon instantWeapon) + { + var data = (InstantWeaponData) instantWeapon.Data; + if (!_instantWeaponManagers.ContainsKey(data)) + { + var managerPrefab = UnityHelpers.LoadAsset(data.EffectPrefab); + if(managerPrefab) + { + _instantWeaponManagers.Add(data, Instantiate(managerPrefab, EffectManagerParent)); + } + else Debug.LogError($"No InstantWeaponEffectManager prefab found at path {data.EffectPrefab}"); + } + + instantWeapon.OnFire += () => + _instantWeaponManagers[data].Fire(instantWeapon, item, this, entity.Target.Value != null && SectorRenderer.EntityInstances.ContainsKey(entity.Target.Value) ? SectorRenderer.EntityInstances[entity.Target.Value] : null); + + if (behavior is ChargedWeapon chargedWeapon) + { + var chargeManager = _instantWeaponManagers[data].GetComponent(); + if (chargeManager) + { + chargedWeapon.OnStartCharging += () => chargeManager.StartCharging(chargedWeapon, item, this); + chargedWeapon.OnStopCharging += () => chargeManager.StopCharging(chargedWeapon); + chargedWeapon.OnCharged += () => chargeManager.Charged(chargedWeapon); + chargedWeapon.OnFailed += () => chargeManager.Failed(chargedWeapon); + } + } + } + + if (behavior is ConstantWeapon constantWeapon) + { + var data = (ConstantWeaponData) constantWeapon.Data; + if (!_constantWeaponManagers.ContainsKey(data)) + { + var managerPrefab = UnityHelpers.LoadAsset(data.EffectPrefab); + if(managerPrefab) + { + _constantWeaponManagers.Add(data, Instantiate(managerPrefab, EffectManagerParent)); + } + else Debug.LogError($"No ConstantWeaponEffectManager prefab found at path {data.EffectPrefab}"); + } + + constantWeapon.OnStartFiring += () => + _constantWeaponManagers[data].StartFiring(data, item, this, entity.Target.Value != null ? SectorRenderer.EntityInstances[entity.Target.Value] : null); + constantWeapon.OnStopFiring += () => + _constantWeaponManagers[data].StopFiring(item); + } + } + } + RadiatorMeshes = new Dictionary(); + Barrels = new Dictionary(); + BarrelIndices = new Dictionary(); + foreach (var hp in hullData.Hardpoints) + { + if (hp.Type == HardpointType.Radiator) + { + var mesh = RadiatorHardpoints.FirstOrDefault(x => x.name == hp.Transform); + if (mesh) + { + RadiatorMeshes.Add(hp, mesh.Mesh); + } + } + if(hp.Type == HardpointType.Ballistic || hp.Type == HardpointType.Energy || hp.Type == HardpointType.Launcher) + { + var whp = WeaponHardpoints.FirstOrDefault(x => x.name == hp.Transform); + if (whp) + { + Barrels.Add(hp, whp.FiringPoint); + BarrelIndices.Add(hp, 0); + } + } + } + + void DamageSchematic(float damage, Shape hitShape) + { + foreach (var v in hitShape.Coordinates) + hitShape[v] = hitShape[v] && hullData.Shape[v]; + + float hullDamage = 0; + var damagePerCell = damage / hitShape.Coordinates.Length; + foreach (var v in hitShape.Coordinates) + { + var d = damagePerCell; + + // Subtract surface damage from armor, passing on the remainder to the item and then to the hull + var prev = entity.Armor[v.x, v.y]; + entity.Armor[v.x, v.y] = max(prev - d, 0); + entity.ArmorDamage.OnNext((v, d)); + d = max(d - prev, 0); + + if (d > 0.1f) + { + var item = entity.GearOccupancy[v.x, v.y]; + if (item != null) + { + prev = item.EquippableItem.Durability; + item.EquippableItem.Durability = max(prev - d, 0); + entity.ItemDamage.OnNext((item, d)); + d = max(d - prev, 0); + } + } + + hullDamage += d; + } + + if(hullDamage > .1f) + { + entity.Hull.Durability -= hullDamage; + entity.HullDamage.OnNext(hullDamage); + } + } + + foreach (var collider in HullColliders) + { + collider.Splash.Subscribe(splash => + { + var hitShape = new Shape(hullData.Shape.Width, hullData.Shape.Height); + foreach (var v in hullData.Shape.Coordinates) + { + var localHitDirection = transform.InverseTransformDirection(splash.Direction); + var direction = normalize(float2(localHitDirection.x, localHitDirection.z)); + var cellDot = dot(normalize(v - hullData.Shape.CenterOfMass), direction); + if (cellDot < 0) hitShape[v] = true; + } + DamageSchematic(splash.Damage, hitShape); + }); + + collider.Hit.Subscribe(hit => + { + var hardpointIndex = (int) hit.TexCoord.x - 1; + + var hitShape = new Shape(hullData.Shape.Width, hullData.Shape.Height); + + // U coordinate between 0-1 indicates a hit that didn't land directly on a hardpoint + // Find the 2D position of the hit scaled to the schematic + float2 hitPos = float2.zero; + if (hardpointIndex < 0) + { + hitPos = float2(hit.TexCoord.x * hullData.Shape.Width, hit.TexCoord.y * hullData.Shape.Height); + // Search all schematic border cells for the cell which is closest to the hit position + var hitCell = int2(-1); + var distance = float.MaxValue; + foreach (var v in hullData.Shape.Coordinates) + { + var cellDist = lengthsq(hitPos - v); + if (cellDist < distance) + { + distance = cellDist; + hitCell = v; + } + } + + hitShape[hitCell] = true; + } + else + { + // Collider UV coordinates starting with 1 correspond to hardpoint index + var hardpoint = hullData.Hardpoints[hardpointIndex]; + + // Obtain the hull coordinates of all cells occupied by the hardpoint + var hardpointCells = hullData.Shape.Inset(hardpoint.Shape, hardpoint.Position); + hitPos = hardpointCells.CenterOfMass; + foreach (var v in hardpointCells.Coordinates) + hitShape[v] = true; + } + + for (int i = 0; i < Mathf.RoundToInt(hit.Spread); i++) + { + hitShape = hitShape.Expand(); + } + + if (hit.Penetration > .5f) + { + // Find the local 2D vector corresponding to the direction of the incoming hit + var localHitDirection = transform.InverseTransformDirection(hit.Direction); + var penetrationVector = normalize(float2(localHitDirection.x, localHitDirection.z)); + + // March a ray through the ship from the hit position + var penetrationPoint = hitPos; + var penetrationDistance = 0; + while (penetrationDistance < hit.Penetration) + { + penetrationPoint += penetrationVector * .5f; + hitShape[int2(penetrationPoint)] = true; + } + } + + DamageSchematic(hit.Damage, hitShape); + }); + } + + LookAtPoint = new GameObject($"{entity.Name} Look Point").transform; + + foreach (var articulationPoint in ArticulationPoints) + { + articulationPoint.Target = LookAtPoint; + } + + _subscriptions.Add(Entity.HullDamage.Subscribe(_ => + { + if (Entity.Hull.Durability < .01f) + { + if (DestroyEffect != null) + { + var t = Instantiate(DestroyEffect).transform; + t.position = transform.position; + } + entity.Zone.Entities.Remove(entity); + } + })); + + // _subscriptions.Add(entity.Docked.Take(1).Subscribe(parent => + // { + // if (Visible) + // { + // FadeOut(sectorRenderer.EntityFadeTime); + // OnFadedOut += () => entity.Zone.Entities.Remove(entity); + // } + // else entity.Zone.Entities.Remove(entity); + // })); + } + + public Transform GetBarrel(HardpointData hardpoint) + { + if (Barrels.ContainsKey(hardpoint)) + { + var barrel = Barrels[hardpoint][BarrelIndices[hardpoint]]; + BarrelIndices[hardpoint] = (BarrelIndices[hardpoint] + 1) % Barrels[hardpoint].Length; + return barrel; + } + + return transform; + } + + public virtual void Update() + { + if (_fading) + { + if (_fadingIn) + { + _fade += Time.deltaTime / _fadeTime; + if (!_fadedElementsVisible && _fade > .01f) + { + _fadedElementsVisible = true; + foreach (var mesh in _meshes.Keys) mesh.enabled = true; + } + if (_fade > 1) + { + _fade = 1; + _fading = false; + OnFadedIn?.Invoke(); + OnFadedIn = null; + ShowUnfadedElements(); + } + foreach(var material in _fadeMaterials) material.SetFloat("_Fade", _fade); + } + else + { + _fade -= Time.deltaTime / _fadeTime; + if(_unfadedElementsVisible && _fade < .99f) HideUnfadedElements(); + if (_fade < 0) + { + _fadedElementsVisible = false; + foreach (var mesh in _meshes.Keys) mesh.enabled = false; + _fade = 0; + _fading = false; + OnFadedOut?.Invoke(); + OnFadedOut = null; + } + foreach(var material in _fadeMaterials) material.SetFloat("_Fade", _fade); + } + } + + foreach (var x in RadiatorMeshes) + { + var temp = 0f; + foreach (var v in x.Key.Shape.Coordinates) + { + var v2 = v + x.Key.Position; + temp += Entity.Temperature[v2.x, v2.y]; + } + temp /= x.Key.Shape.Coordinates.Length; + x.Value.material.SetFloat("_Emission", Entity.ItemManager.GameplaySettings.TemperatureEmissionCurve.Evaluate(temp)); + } + + foreach (var x in Barrels) + { + Entity.HardpointTransforms[x.Key] = (x.Value[0].position, x.Value[0].forward); + } + + LookAtPoint.position = transform.position + (Vector3) Entity.LookDirection * + (Entity.Target.Value != null ? max(Entity.TargetRange,Entity.ItemManager.GameplaySettings.ConvergenceMinimumDistance) : 10000); + transform.position = Entity.Position; + } + + private void OnDestroy() + { + foreach(var x in _subscriptions) + x.Dispose(); + } +} diff --git a/Assets/Scripts/Gameplay/EntityPrefab.cs.meta b/Assets/Scripts/Gameplay/EntityInstance.cs.meta similarity index 100% rename from Assets/Scripts/Gameplay/EntityPrefab.cs.meta rename to Assets/Scripts/Gameplay/EntityInstance.cs.meta diff --git a/Assets/Scripts/Gameplay/EntityPrefab.cs b/Assets/Scripts/Gameplay/EntityPrefab.cs deleted file mode 100644 index e81fdd3df..000000000 --- a/Assets/Scripts/Gameplay/EntityPrefab.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class EntityPrefab : MonoBehaviour -{ - public HullCollider[] HullColliders; - - public RadiatorHardpoint[] RadiatorHardpoints; - public ThrusterHardpoint[] ThrusterHardpoints; - public WeaponHardpoint[] WeaponHardpoints; - public ArticulationPoint[] ArticulationPoints; - - public GameObject DestroyEffect; -} diff --git a/Assets/Scripts/Gameplay/HullCollider.cs b/Assets/Scripts/Gameplay/HullCollider.cs index ec4af8493..cf5ee155e 100644 --- a/Assets/Scripts/Gameplay/HullCollider.cs +++ b/Assets/Scripts/Gameplay/HullCollider.cs @@ -1,4 +1,5 @@ -using System.Collections; +using System; +using System.Collections; using System.Collections.Generic; using UniRx; using Unity.Mathematics; @@ -37,7 +38,12 @@ public class HullCollider : MonoBehaviour Direction = direction }); } - + + private void OnCollisionEnter(Collision other) + { + Entity.Velocity += ((float3) other.impulse).xz / Time.deltaTime; + } + public class HullHitEventArgs { public float Damage; diff --git a/Assets/Scripts/Gameplay/ShipInstance.cs b/Assets/Scripts/Gameplay/ShipInstance.cs new file mode 100644 index 000000000..d95522689 --- /dev/null +++ b/Assets/Scripts/Gameplay/ShipInstance.cs @@ -0,0 +1,72 @@ +using System.Collections; +using System.Linq; +using UnityEngine; + +public class ShipInstance : EntityInstance +{ + public (Thruster effect, ParticleSystem system, float baseEmission)[] Particles; + + public Ship Ship { get; private set; } + + public override void SetEntity(SectorRenderer sectorRenderer, Entity entity) + { + base.SetEntity(sectorRenderer, entity); + var ship = entity as Ship; + if (ship == null) + { + Debug.LogError($"Attempted to assign non-ship entity to {gameObject.name} ship instance prefab!"); + return; + } + Ship = ship; + Particles = ship.GetBehaviors() + .Select(x => + { + var effectData = (ThrusterData) x.Data; + var particles = Instantiate(UnityHelpers.LoadAsset(effectData.ParticlesPrefab), transform, false); + var particlesShape = particles.shape; + particlesShape.meshRenderer = ThrusterHardpoints + .FirstOrDefault(t => t.name == x.Entity.Hardpoints[x.Item.Position.x, x.Item.Position.y].Transform) + ?.Emitter; + return (x, particles, particles.emission.rateOverTimeMultiplier); + }) + .ToArray(); + + foreach (var particle in Particles) + { + particle.system.gameObject.SetActive(false); + } + } + + protected override void ShowUnfadedElements() + { + base.ShowUnfadedElements(); + foreach (var particle in Particles) + { + particle.system.gameObject.SetActive(true); + } + } + + protected override void HideUnfadedElements() + { + base.HideUnfadedElements(); + foreach (var particle in Particles) + { + particle.system.gameObject.SetActive(false); + } + } + + public override void Update() + { + base.Update(); + + foreach (var (effect, system, baseEmission) in Particles) + { + var emissionModule = system.emission; + var item = effect.Item.EquippableItem; + var data = Entity.ItemManager.GetData(item); + emissionModule.rateOverTimeMultiplier = baseEmission * effect.Axis * (item.Durability / data.Durability); + } + + transform.rotation = Ship.Rotation; + } +} \ No newline at end of file diff --git a/Assets/Scripts/Gameplay/ShipInstance.cs.meta b/Assets/Scripts/Gameplay/ShipInstance.cs.meta new file mode 100644 index 000000000..78df0068a --- /dev/null +++ b/Assets/Scripts/Gameplay/ShipInstance.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 1306f57022ae47ceba7441145a065cb1 +timeCreated: 1613504614 \ No newline at end of file diff --git a/Assets/Scripts/Gameplay/Weapons/ConstantParticleWeapon.cs b/Assets/Scripts/Gameplay/Weapons/ConstantParticleWeapon.cs index 486d3f3a7..92be211d4 100644 --- a/Assets/Scripts/Gameplay/Weapons/ConstantParticleWeapon.cs +++ b/Assets/Scripts/Gameplay/Weapons/ConstantParticleWeapon.cs @@ -47,7 +47,7 @@ public class ConstantParticleWeapon : MonoBehaviour if (Target == null) return; - foreach (var collider in Target.Prefab.HullColliders) + foreach (var collider in Target.HullColliders) { _hull = collider; trigger.AddCollider(collider.GetComponent()); @@ -57,7 +57,7 @@ public class ConstantParticleWeapon : MonoBehaviour private void Update() { if (Source == null) return; - _simulationSpace.position = Source.Prefab.transform.position; + _simulationSpace.position = Source.transform.position; if (_stopping && Particles.All(p=>p.particleCount == 0)) { GetComponent().ReturnToPool(); @@ -77,7 +77,7 @@ public class ConstantParticleWeapon : MonoBehaviour Damage * Time.deltaTime, DamageType, Source.Entity, - (transform.position - Target.Prefab.transform.position).normalized); + (transform.position - Target.transform.position).normalized); } } diff --git a/Assets/Scripts/Gameplay/Weapons/GuidedProjectile.cs b/Assets/Scripts/Gameplay/Weapons/GuidedProjectile.cs index 285c7c369..ccd4fbcc4 100644 --- a/Assets/Scripts/Gameplay/Weapons/GuidedProjectile.cs +++ b/Assets/Scripts/Gameplay/Weapons/GuidedProjectile.cs @@ -64,7 +64,6 @@ public class GuidedProjectile : MonoBehaviour { if (SourceEntity == null) return; - var t = transform; if (_active) diff --git a/Assets/Scripts/Gameplay/Weapons/GuidedProjectileManager.cs b/Assets/Scripts/Gameplay/Weapons/GuidedProjectileManager.cs index 17582eecd..7441d8972 100644 --- a/Assets/Scripts/Gameplay/Weapons/GuidedProjectileManager.cs +++ b/Assets/Scripts/Gameplay/Weapons/GuidedProjectileManager.cs @@ -13,9 +13,9 @@ public class GuidedProjectileManager : InstantWeaponEffectManager if(weapon.Data is LauncherData launcher) { var p = ProjectilePrototype.Instantiate(); - p.Source = source.Transform; + p.Source = source.transform; p.SourceEntity = source.Entity; - p.Target = target.Transform; + p.Target = target.transform; p.Frequency = launcher.DodgeFrequency; var hp = source.Entity.Hardpoints[item.Position.x, item.Position.y]; var barrel = source.GetBarrel(hp); @@ -35,9 +35,9 @@ public class GuidedProjectileManager : InstantWeaponEffectManager else if(weapon.Data is GuidedWeaponData guidance) { var p = ProjectilePrototype.Instantiate(); - p.Source = source.Transform; + p.Source = source.transform; p.SourceEntity = source.Entity; - p.Target = target?.Transform; + p.Target = target?.transform; p.Frequency = guidance.DodgeFrequency; var hp = source.Entity.Hardpoints[item.Position.x, item.Position.y]; var barrel = source.GetBarrel(hp); diff --git a/Assets/Scripts/Gameplay/Weapons/Mine.cs b/Assets/Scripts/Gameplay/Weapons/Mine.cs index afcd8c701..6740bc777 100644 --- a/Assets/Scripts/Gameplay/Weapons/Mine.cs +++ b/Assets/Scripts/Gameplay/Weapons/Mine.cs @@ -102,7 +102,7 @@ public class Mine : MonoBehaviour } } - if ((position - Source.Prefab.transform.position).magnitude > Range || + if ((position - Source.transform.position).magnitude > Range || Time.time - _startTime > Lifetime || _blastCountdown && Time.time > _blastTime) { diff --git a/Assets/Scripts/Sector Display/SectorRenderer.cs b/Assets/Scripts/Sector Display/SectorRenderer.cs index 7239d0ae3..d6f5e6aa6 100644 --- a/Assets/Scripts/Sector Display/SectorRenderer.cs +++ b/Assets/Scripts/Sector Display/SectorRenderer.cs @@ -9,15 +9,16 @@ using System.Linq; using Cinemachine; using UniRx; using UnityEngine; -using static Unity.Mathematics.math; -using Unity.Mathematics; using UnityEngine.Serialization; -using float2 = Unity.Mathematics.float2; using Object = UnityEngine.Object; using Random = UnityEngine.Random; +using Unity.Mathematics; +using static Unity.Mathematics.math; +using float2 = Unity.Mathematics.float2; public class SectorRenderer : MonoBehaviour { + public float EntityFadeTime; public Transform EffectManagerParent; public Transform FogCameraParent; public GameSettings Settings; @@ -63,9 +64,6 @@ public class SectorRenderer : MonoBehaviour private Dictionary _beltObjects = new Dictionary(); private Dictionary _beltMeshes = new Dictionary(); private Dictionary _beltMatrices = new Dictionary(); - private Dictionary _instantWeaponManagers = new Dictionary(); - private Dictionary _constantWeaponManagers = new Dictionary(); - private Zone _zone; private float _viewDistance; private float _maxDepth; @@ -75,9 +73,41 @@ public class SectorRenderer : MonoBehaviour private CinemachineTransposer _transposer; private PlanetObject _root; private bool _rootFound; - + private Entity _perspectiveEntity; + private IDisposable[] _perspectiveSubscriptions = new IDisposable[2]; + + public Zone Zone { get; private set; } public ItemManager ItemManager { get; set; } + public Entity PerspectiveEntity + { + get => _perspectiveEntity; + set + { + _perspectiveEntity = value; + _perspectiveSubscriptions[0]?.Dispose(); + _perspectiveSubscriptions[1]?.Dispose(); + if (value == null) + { + foreach (var e in EntityInstances.Values) + e.FadeOut(EntityFadeTime); + } + else + { + foreach(var entity in EntityInstances.Values) + entity.FadeOut(EntityFadeTime); + foreach(var entity in value.VisibleEntities) + EntityInstances[entity].FadeIn(EntityFadeTime); + EntityInstances[value].FadeIn(EntityFadeTime); + _perspectiveSubscriptions[0] = value.VisibleEntities.ObserveAdd() + .Subscribe(add => EntityInstances[add.Value].FadeIn(EntityFadeTime)); + _perspectiveSubscriptions[1] = value.VisibleEntities.ObserveRemove() + .Where(removeEvent => EntityInstances.ContainsKey(removeEvent.Value)) + .Subscribe(removeEvent => EntityInstances[removeEvent.Value].FadeOut(EntityFadeTime)); + } + } + } + public float Time { get; set; } public float ViewDistance @@ -105,6 +135,7 @@ public class SectorRenderer : MonoBehaviour void Start() { + EntityInstance.EffectManagerParent = EffectManagerParent; ViewDistance = Settings.DefaultViewDistance; MinimapDistance = Settings.MinimapZoomLevels[Settings.DefaultMinimapZoom]; @@ -115,7 +146,7 @@ public class SectorRenderer : MonoBehaviour public void LoadZone(Zone zone) { _maxDepth = 0; - _zone = zone; + Zone = zone; SectorBrushes.localScale = zone.Data.Radius * 2 * Vector3.one; ClearZone(); foreach(var p in zone.Planets.Values) @@ -125,17 +156,17 @@ public class SectorRenderer : MonoBehaviour { if (!(zone.Planets[x.Key] is GasGiantData)) { - var parentOrbit = _zone.Orbits[_zone.Planets[x.Key].Orbit].Data.Parent; + var parentOrbit = Zone.Orbits[Zone.Planets[x.Key].Orbit].Data.Parent; PlanetObject parent; if (parentOrbit == Guid.Empty) parent = _root; else { - var parentPlanetData = _zone.Planets.Values.FirstOrDefault(p => p.Orbit == parentOrbit); + var parentPlanetData = Zone.Planets.Values.FirstOrDefault(p => p.Orbit == parentOrbit); if(parentPlanetData == null) { - parentOrbit = _zone.Orbits[parentOrbit].Data.Parent; - parentPlanetData = _zone.Planets.Values.FirstOrDefault(p => p.Orbit == parentOrbit); + parentOrbit = Zone.Orbits[parentOrbit].Data.Parent; + parentPlanetData = Zone.Planets.Values.FirstOrDefault(p => p.Orbit == parentOrbit); } if (parentPlanetData == null) @@ -174,247 +205,31 @@ public class SectorRenderer : MonoBehaviour { var hullData = ItemManager.GetData(entity.Hull) as HullData; EntityInstance instance; - if (entity is Ship ship) + if (entity is Ship) { - instance = new ShipInstance(); - instance.Transform = Instantiate(UnityHelpers.LoadAsset(hullData.Prefab), ZoneRoot).transform; - instance.Prefab = instance.Transform.GetComponent(); - var shipInstance = (ShipInstance) instance; - shipInstance.Particles = ship.GetBehaviors() - .Select(x => - { - var effectData = (ThrusterData) x.Data; - var particles = Instantiate(UnityHelpers.LoadAsset(effectData.ParticlesPrefab), shipInstance.Transform, false); - var particlesShape = particles.shape; - particlesShape.meshRenderer = shipInstance.Prefab.ThrusterHardpoints - .FirstOrDefault(t => t.name == x.Entity.Hardpoints[x.Item.Position.x, x.Item.Position.y].Transform) - ?.Emitter; - return (x, particles, particles.emission.rateOverTimeMultiplier); - }) - .ToArray(); + instance = Instantiate(UnityHelpers.LoadAsset(hullData.Prefab), ZoneRoot).GetComponent(); + if (instance == null) + { + ItemManager.Log($"Failed to instantiate {hullData.Name} ship with invalid prefab: no ShipInstance component!"); + return; + } } else { - instance = new EntityInstance(); - instance.Transform = Instantiate(UnityHelpers.LoadAsset(hullData.Prefab), ZoneRoot).transform; - instance.Prefab = instance.Transform.GetComponent(); - } - - instance.Entity = entity; - foreach (var hullCollider in instance.Prefab.HullColliders) hullCollider.Entity = entity; - - foreach (var item in entity.Equipment) - { - foreach (var behavior in item.Behaviors) + instance = Instantiate(UnityHelpers.LoadAsset(hullData.Prefab), ZoneRoot).GetComponent(); + if (instance == null) { - if (behavior is InstantWeapon instantWeapon) - { - var data = (InstantWeaponData) instantWeapon.Data; - if (!_instantWeaponManagers.ContainsKey(data)) - { - var managerPrefab = UnityHelpers.LoadAsset(data.EffectPrefab); - if(managerPrefab) - { - _instantWeaponManagers.Add(data, Instantiate(managerPrefab, EffectManagerParent)); - } - else Debug.LogError($"No InstantWeaponEffectManager prefab found at path {data.EffectPrefab}"); - } - - instantWeapon.OnFire += () => - _instantWeaponManagers[data].Fire(instantWeapon, item, instance, entity.Target.Value != null && EntityInstances.ContainsKey(entity.Target.Value) ? EntityInstances[entity.Target.Value] : null); - - if (behavior is ChargedWeapon chargedWeapon) - { - var chargeManager = _instantWeaponManagers[data].GetComponent(); - if (chargeManager) - { - chargedWeapon.OnStartCharging += () => chargeManager.StartCharging(chargedWeapon, item, instance); - chargedWeapon.OnStopCharging += () => chargeManager.StopCharging(chargedWeapon); - chargedWeapon.OnCharged += () => chargeManager.Charged(chargedWeapon); - chargedWeapon.OnFailed += () => chargeManager.Failed(chargedWeapon); - } - } - } - - if (behavior is ConstantWeapon constantWeapon) - { - var data = (ConstantWeaponData) constantWeapon.Data; - if (!_constantWeaponManagers.ContainsKey(data)) - { - var managerPrefab = UnityHelpers.LoadAsset(data.EffectPrefab); - if(managerPrefab) - { - _constantWeaponManagers.Add(data, Instantiate(managerPrefab, EffectManagerParent)); - } - else Debug.LogError($"No ConstantWeaponEffectManager prefab found at path {data.EffectPrefab}"); - } - - constantWeapon.OnStartFiring += () => - _constantWeaponManagers[data].StartFiring(data, item, instance, entity.Target.Value != null ? EntityInstances[entity.Target.Value] : null); - constantWeapon.OnStopFiring += () => - _constantWeaponManagers[data].StopFiring(item); - } - } - } - instance.RadiatorMeshes = new Dictionary(); - instance.Barrels = new Dictionary(); - instance.BarrelIndices = new Dictionary(); - foreach (var hp in hullData.Hardpoints) - { - if (hp.Type == HardpointType.Radiator) - { - var mesh = instance.Prefab.RadiatorHardpoints.FirstOrDefault(x => x.name == hp.Transform); - if (mesh) - { - instance.RadiatorMeshes.Add(hp, mesh.Mesh); - } - } - if(hp.Type == HardpointType.Ballistic || hp.Type == HardpointType.Energy || hp.Type == HardpointType.Launcher) - { - var whp = instance.Prefab.WeaponHardpoints.FirstOrDefault(x => x.name == hp.Transform); - if (whp) - { - instance.Barrels.Add(hp, whp.FiringPoint); - instance.BarrelIndices.Add(hp, 0); - } + ItemManager.Log($"Failed to instantiate {hullData.Name} entity with invalid prefab: no EntityInstance component!"); + return; } } - void DamageSchematic(float damage, Shape hitShape) - { - foreach (var v in hitShape.Coordinates) - hitShape[v] = hitShape[v] && hullData.Shape[v]; - - float hullDamage = 0; - var damagePerCell = damage / hitShape.Coordinates.Length; - foreach (var v in hitShape.Coordinates) - { - var d = damagePerCell; - - // Subtract surface damage from armor, passing on the remainder to the item and then to the hull - var prev = entity.Armor[v.x, v.y]; - entity.Armor[v.x, v.y] = max(prev - d, 0); - entity.ArmorDamage.OnNext((v, d)); - d = max(d - prev, 0); - - if (d > 0.1f) - { - var item = entity.GearOccupancy[v.x, v.y]; - if (item != null) - { - prev = item.EquippableItem.Durability; - item.EquippableItem.Durability = max(prev - d, 0); - entity.ItemDamage.OnNext((item, d)); - d = max(d - prev, 0); - } - } - - hullDamage += d; - } - - if(hullDamage > .1f) - { - entity.Hull.Durability -= hullDamage; - entity.HullDamage.OnNext(hullDamage); - } - } - - foreach (var collider in instance.Prefab.HullColliders) - { - collider.Splash.Subscribe(splash => - { - var hitShape = new Shape(hullData.Shape.Width, hullData.Shape.Height); - foreach (var v in hullData.Shape.Coordinates) - { - var localHitDirection = instance.Prefab.transform.InverseTransformDirection(splash.Direction); - var direction = normalize(float2(localHitDirection.x, localHitDirection.z)); - var cellDot = dot(normalize(v - hullData.Shape.CenterOfMass), direction); - if (cellDot < 0) hitShape[v] = true; - } - DamageSchematic(splash.Damage, hitShape); - }); - - collider.Hit.Subscribe(hit => - { - var hardpointIndex = (int) hit.TexCoord.x - 1; - - var hitShape = new Shape(hullData.Shape.Width, hullData.Shape.Height); - - // U coordinate between 0-1 indicates a hit that didn't land directly on a hardpoint - // Find the 2D position of the hit scaled to the schematic - float2 hitPos = float2.zero; - if (hardpointIndex < 0) - { - hitPos = float2(hit.TexCoord.x * hullData.Shape.Width, hit.TexCoord.y * hullData.Shape.Height); - // Search all schematic border cells for the cell which is closest to the hit position - var hitCell = int2(-1); - var distance = float.MaxValue; - foreach (var v in hullData.Shape.Coordinates) - { - var cellDist = lengthsq(hitPos - v); - if (cellDist < distance) - { - distance = cellDist; - hitCell = v; - } - } - - hitShape[hitCell] = true; - } - else - { - // Collider UV coordinates starting with 1 correspond to hardpoint index - var hardpoint = hullData.Hardpoints[hardpointIndex]; - - // Obtain the hull coordinates of all cells occupied by the hardpoint - var hardpointCells = hullData.Shape.Inset(hardpoint.Shape, hardpoint.Position); - hitPos = hardpointCells.CenterOfMass; - foreach (var v in hardpointCells.Coordinates) - hitShape[v] = true; - } - - for (int i = 0; i < Mathf.RoundToInt(hit.Spread); i++) - { - hitShape = hitShape.Expand(); - } - - if (hit.Penetration > .5f) - { - // Find the local 2D vector corresponding to the direction of the incoming hit - var localHitDirection = instance.Prefab.transform.InverseTransformDirection(hit.Direction); - var penetrationVector = normalize(float2(localHitDirection.x, localHitDirection.z)); - - // March a ray through the ship from the hit position - var penetrationPoint = hitPos; - var penetrationDistance = 0; - while (penetrationDistance < hit.Penetration) - { - penetrationPoint += penetrationVector * .5f; - hitShape[int2(penetrationPoint)] = true; - } - } - - DamageSchematic(hit.Damage, hitShape); - }); - } - - instance.LookAtPoint = new GameObject($"{entity.Name} Look Point").transform; - - foreach (var articulationPoint in instance.Prefab.ArticulationPoints) - { - articulationPoint.Target = instance.LookAtPoint; - } + instance.SetEntity(this, entity); EntityInstances.Add(entity, instance); } - void UnloadEntity(Entity entity) + public void UnloadEntity(Entity entity) { - if (EntityInstances[entity].Prefab.DestroyEffect != null) - { - var t = Instantiate(EntityInstances[entity].Prefab.DestroyEffect).transform; - t.position = EntityInstances[entity].Prefab.transform.position; - } - foreach (var item in entity.Equipment) { foreach (var behavior in item.Behaviors) @@ -424,7 +239,7 @@ public class SectorRenderer : MonoBehaviour } } - Destroy(EntityInstances[entity].Transform.gameObject); + Destroy(EntityInstances[entity].gameObject); EntityInstances.Remove(entity); } @@ -446,7 +261,7 @@ public class SectorRenderer : MonoBehaviour var beltObject = Instantiate(AsteroidBeltUI, ZoneRoot); var collider = beltObject.GetComponent(); - var belt = new AsteroidBeltUI(_zone, _zone.AsteroidBelts[beltData.ID], beltObject, collider, AsteroidSpritesheetWidth, AsteroidSpritesheetHeight, Settings.MinimapAsteroidSize); + var belt = new AsteroidBeltUI(Zone, Zone.AsteroidBelts[beltData.ID], beltObject, collider, AsteroidSpritesheetWidth, AsteroidSpritesheetHeight, Settings.MinimapAsteroidSize); _beltObjects[beltData.ID] = belt; } else @@ -466,7 +281,7 @@ public class SectorRenderer : MonoBehaviour else planet = Instantiate(GasGiant, ZoneRoot); var gas = (GasGiantObject) planet; - var gasGiant = _zone.PlanetInstances[planetData.ID] as GasGiant; + var gasGiant = Zone.PlanetInstances[planetData.ID] as GasGiant; gasGiantData.Colors.Subscribe(c => gas.Body.material.SetTexture("_ColorRamp", c.ToGradient(!(planetData is SunData)).ToTexture())); gasGiantData.AlbedoRotationSpeed.Subscribe(f => gas.SunMaterial.AlbedoRotationSpeed = f); gasGiantData.FirstOffsetRotationSpeed.Subscribe(f => gas.SunMaterial.FirstOffsetRotationSpeed = f); @@ -489,7 +304,7 @@ public class SectorRenderer : MonoBehaviour //planet.Icon.material.mainTexture = planetData.Mass > Context.GlobalData.PlanetMass ? PlanetIcon : PlanetoidIcon; } - var planetInstance = _zone.PlanetInstances[planetData.ID]; + var planetInstance = Zone.PlanetInstances[planetData.ID]; planetInstance.BodyRadius.Subscribe(f => { planet.Body.transform.localScale = f * Vector3.one; @@ -541,7 +356,7 @@ public class SectorRenderer : MonoBehaviour void Update() { - foreach(var belt in _zone.AsteroidBelts) + foreach(var belt in Zone.AsteroidBelts) { var meshes = _beltMeshes[belt.Key]; var count = belt.Value.Positions.Length / meshes.Length; @@ -565,71 +380,22 @@ public class SectorRenderer : MonoBehaviour foreach (var planet in Planets) { - var planetInstance = _zone.PlanetInstances[planet.Key]; - var p = _zone.GetOrbitPosition(planetInstance.BodyData.Orbit); + var planetInstance = Zone.PlanetInstances[planet.Key]; + var p = Zone.GetOrbitPosition(planetInstance.BodyData.Orbit); planet.Value.transform.position = new Vector3(p.x, 0, p.y); - planet.Value.Body.transform.localPosition = new Vector3(0, _zone.GetHeight(p) + planetInstance.BodyRadius.Value * 2, 0); + planet.Value.Body.transform.localPosition = new Vector3(0, Zone.GetHeight(p) + planetInstance.BodyRadius.Value * 2, 0); if(planet.Value is GasGiantObject gasGiantObject) { - gasGiantObject.GravityWaves.material.SetFloat("_Phase", Time * ((GasGiant) _zone.PlanetInstances[planet.Key]).GravityWavesSpeed.Value); + gasGiantObject.GravityWaves.material.SetFloat("_Phase", Time * ((GasGiant) Zone.PlanetInstances[planet.Key]).GravityWavesSpeed.Value); if(!(planet.Value is SunObject)) { - var toParent = normalize(_zone.GetOrbitPosition(_zone.Orbits[planetInstance.BodyData.Orbit].Data.Parent) - p); + var toParent = normalize(Zone.GetOrbitPosition(Zone.Orbits[planetInstance.BodyData.Orbit].Data.Parent) - p); gasGiantObject.SunMaterial.LightingDirection = new Vector3(toParent.x, 0, toParent.y); } } else planet.Value.Body.transform.rotation *= Quaternion.AngleAxis(Settings.PlanetRotationSpeed, Vector3.up); } - var hitList = new List(); - foreach (var entity in EntityInstances) - { - if(entity.Key.Hull.Durability <= 0) - { - hitList.Add(entity.Key); - continue; - } - if(entity.Value is ShipInstance shipInstance) - { - foreach (var (effect, system, baseEmission) in shipInstance.Particles) - { - var emissionModule = system.emission; - var item = effect.Item.EquippableItem; - var data = shipInstance.Entity.ItemManager.GetData(item); - emissionModule.rateOverTimeMultiplier = baseEmission * effect.Axis * (item.Durability / data.Durability); - } - - entity.Value.Transform.rotation = ((Ship) entity.Key).Rotation; - } - - foreach (var x in entity.Value.RadiatorMeshes) - { - var temp = 0f; - foreach (var v in x.Key.Shape.Coordinates) - { - var v2 = v + x.Key.Position; - temp += entity.Key.Temperature[v2.x, v2.y]; - } - temp /= x.Key.Shape.Coordinates.Length; - x.Value.material.SetFloat("_Emission", Settings.GameplaySettings.TemperatureEmissionCurve.Evaluate(temp)); - } - - foreach (var x in entity.Value.Barrels) - { - entity.Key.HardpointTransforms[x.Key] = (x.Value[0].position, x.Value[0].forward); - } - - if (entity.Key.Target.Value != null && !EntityInstances.ContainsKey(entity.Key.Target.Value)) - entity.Key.Target.Value = null; - entity.Value.LookAtPoint.position = entity.Value.Transform.position + (Vector3) entity.Key.LookDirection * (entity.Key.Target.Value != null - ? max((EntityInstances[entity.Key.Target.Value].Transform.position - entity.Value.Transform.position).magnitude,Settings.GameplaySettings.ConvergenceMinimumDistance) : 10000); - entity.Value.Transform.position = entity.Key.Position; - } - foreach(var e in hitList) - { - _zone.Entities.Remove(e); - } - var fogPos = FogCameraParent.position; SectorBoundaryBrush.material.SetFloat("_Power", Settings.PlanetSettings.ZoneDepthExponent); SectorBoundaryBrush.material.SetFloat("_Depth", Settings.PlanetSettings.ZoneDepth + Settings.PlanetSettings.ZoneBoundaryFog); @@ -646,32 +412,6 @@ public class SectorRenderer : MonoBehaviour } } -public class EntityInstance -{ - public Entity Entity; - public Transform Transform; - public EntityPrefab Prefab; - public Dictionary Barrels; - public Dictionary BarrelIndices; - public Dictionary RadiatorMeshes; - public Transform LookAtPoint; - public Transform GetBarrel(HardpointData hardpoint) - { - if (Barrels.ContainsKey(hardpoint)) - { - var barrel = Barrels[hardpoint][BarrelIndices[hardpoint]]; - BarrelIndices[hardpoint] = (BarrelIndices[hardpoint] + 1) % Barrels[hardpoint].Length; - return barrel; - } - - return Transform; - } -} - -public class ShipInstance : EntityInstance -{ - public (Thruster effect, ParticleSystem system, float baseEmission)[] Particles; -} [Serializable] public class InstancedMesh diff --git a/Assets/Scripts/Sector Display/VolumeSampling.cs b/Assets/Scripts/Sector Display/VolumeSampling.cs index 6d915b4e7..60e19711a 100644 --- a/Assets/Scripts/Sector Display/VolumeSampling.cs +++ b/Assets/Scripts/Sector Display/VolumeSampling.cs @@ -4,6 +4,10 @@ using System; using UnityEngine; +using Unity.Mathematics; +using UnityEngine.Experimental.Rendering; +using static Unity.Mathematics.math; +using static Unity.Mathematics.noise; /// /// Drives the volume render. @@ -12,13 +16,58 @@ using UnityEngine; [RequireComponent( typeof( Camera ) ), ImageEffectAllowedInSceneView] public class VolumeSampling : MonoBehaviour { + // public int Octaves = 4; + // public float Frequency = 1; + // public float Lacunarity = 2; + // public float Gain = .5f; + // public int NoiseTextureCount = 16; + // public int NoiseTextureSize = 32; public Material _volMaterial; public Transform GridTransform; private Camera _camera; + // private Texture3D[] _noiseTextures; + // private int _currentNoiseTexture; private void Start() { _camera = GetComponent(); + // _noiseTextures = new Texture3D[NoiseTextureCount]; + // var samples = new Color[NoiseTextureSize * NoiseTextureSize * NoiseTextureSize]; + // for (int i = 0; i < NoiseTextureCount; i++) + // { + // var iv = (float) i / NoiseTextureCount; + // var tex = new Texture3D(NoiseTextureSize,NoiseTextureSize,NoiseTextureSize, GraphicsFormat.R8_UNorm, TextureCreationFlags.None); + // tex.filterMode = FilterMode.Bilinear; + // for (int z = 0; z < NoiseTextureSize; z++) + // { + // var zf = (float) z / NoiseTextureSize; + // int zOffset = z * NoiseTextureSize * NoiseTextureSize; + // for (int y = 0; y < NoiseTextureSize; y++) + // { + // var yf = (float) y / NoiseTextureSize; + // int yOffset = y * NoiseTextureSize; + // for (int x = 0; x < NoiseTextureSize; x++) + // { + // var xf = (float) x / NoiseTextureSize; + // var index = x + yOffset + zOffset; + // float freq = Frequency, amp = 1; + // float sum = 0; + // var p = float4(xf, yf, zf, iv); + // for(int o = 0; o < Octaves; o++) + // { + // sum += (pnoise(p * freq, 1 / freq) + 1) / 2 * amp; + // freq *= Lacunarity; + // amp *= Gain; + // } + // + // samples[index] = Color.white * sum; + // } + // } + // } + // tex.SetPixels(samples); + // tex.Apply(); + // _noiseTextures[i] = tex; + // } } [ImageEffectOpaque] @@ -30,6 +79,10 @@ public class VolumeSampling : MonoBehaviour Graphics.Blit(source, destination); return; } + + // _currentNoiseTexture = (_currentNoiseTexture + 1) % NoiseTextureCount; + // + // _volMaterial.SetTexture("_NoiseTex", _noiseTextures[_currentNoiseTexture]); // Shader needs this matrix to generate world space rays _volMaterial.SetMatrix("_CamProj", (_camera.projectionMatrix * _camera.worldToCameraMatrix).inverse); diff --git a/Assets/Scripts/ServerShared/AetheriaMath.cs b/Assets/Scripts/ServerShared/AetheriaMath.cs index cf4ef5071..06bef2a93 100644 --- a/Assets/Scripts/ServerShared/AetheriaMath.cs +++ b/Assets/Scripts/ServerShared/AetheriaMath.cs @@ -5,6 +5,9 @@ using static Unity.Mathematics.math; public static class AetheriaMath { + public const float Deg2Rad = 0.01745329f; + public const float Rad2Deg = 57.29578f; + //first-order intercept using absolute target position public static float3 FirstOrderIntercept ( diff --git a/Assets/Scripts/ServerShared/Agents/Agent.cs b/Assets/Scripts/ServerShared/Agents/Agent.cs new file mode 100644 index 000000000..be5dae7a7 --- /dev/null +++ b/Assets/Scripts/ServerShared/Agents/Agent.cs @@ -0,0 +1,96 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using RethinkDb.Driver.Ast; +using UniRx; +using Unity.Mathematics; +using static Unity.Mathematics.math; +using float2 = Unity.Mathematics.float2; + +public class Agent +{ + private const float FORWARD_DELTA_THRESHOLD = 20; + private const float THRUST_DELTA_THRESHOLD = 1; + protected BaseState _rootState; + private BaseState _currentState; + private VelocityLimit _velocityLimit; + + public AgentTask Task { get; set; } + public Ship Ship { get; } + public ItemManager ItemManager { get; } + public GameplaySettings Settings { get; } + public float TopSpeed => _velocityLimit?.Limit ?? 100; + + public Agent(Ship ship) + { + Ship = ship; + ItemManager = Ship.ItemManager; + Settings = Ship.ItemManager.GameplaySettings; + + _rootState = _currentState = new BaseState(this); + _velocityLimit = Ship.GetBehavior(); + } + + public void Transition(BaseState targetState, Action onTransition = null) + { + ItemManager.Log($"{Ship.Name} changing state from {_currentState.GetType().Name} to {targetState.GetType().Name}"); + _currentState.OnExitState(); + _currentState = targetState; + onTransition?.Invoke(); + _currentState.OnEnterState(); + } + + public void Update(float delta) + { + _currentState.Update(delta); + foreach (var transition in _currentState.Transitions) + if (transition.Condition()) + { + Transition(transition.TargetState, transition.OnTransition); + break; + } + } + + public void Accelerate(float2 targetVelocity, bool noTurn = false) + { + var deltaV = targetVelocity - Ship.Velocity; + var deltaVMag = length(deltaV); + var deltaVDirection = normalize(deltaV); + // If Delta V is above the threshold, direct the ship towards the delta and use only main thrusters + if (!noTurn && deltaVMag > FORWARD_DELTA_THRESHOLD) + { + Ship.LookDirection = float3(deltaVDirection.x, 0, deltaVDirection.y); + Ship.MovementDirection = float2(0, pow(dot(Ship.Direction, deltaVDirection), 2)); + } + // If Delta V is low, direct the ship towards the target and use all thrusters + else if(deltaVMag > THRUST_DELTA_THRESHOLD) + { + var right = Ship.Direction.Rotate(ItemRotation.Clockwise); + Ship.MovementDirection = float2(dot(right, deltaVDirection), dot(Ship.Direction, deltaVDirection)); + } + else + { + Ship.MovementDirection = float2.zero; + } + } +} + +public class StateTransition +{ + public StateTransition(BaseState targetState, Func condition, Action onTransition) + { + TargetState = targetState; + Condition = condition; + OnTransition = onTransition; + } + + public BaseState TargetState { get; } + public Func Condition { get; } + public Action OnTransition { get; } +} + diff --git a/Assets/Scripts/ServerShared/Agents/AgentBehavior.cs.meta b/Assets/Scripts/ServerShared/Agents/Agent.cs.meta similarity index 100% rename from Assets/Scripts/ServerShared/Agents/AgentBehavior.cs.meta rename to Assets/Scripts/ServerShared/Agents/Agent.cs.meta diff --git a/Assets/Scripts/ServerShared/Agents/AgentBehavior.cs b/Assets/Scripts/ServerShared/Agents/AgentBehavior.cs deleted file mode 100644 index e1bac9549..000000000 --- a/Assets/Scripts/ServerShared/Agents/AgentBehavior.cs +++ /dev/null @@ -1,203 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using RethinkDb.Driver.Ast; -using UniRx; -using Unity.Mathematics; -using static Unity.Mathematics.math; -using float2 = Unity.Mathematics.float2; - -public abstract class AgentBehavior -{ - public abstract void Update(float delta); - - protected float ThrustInput(float2 deltaV) => - saturate( // Input must be normalized - pow( // Apply specificity as exponent to dot product to control how specific the direction needs to be - saturate( // Discard negative dot product (we're facing away from desired direction) - dot(normalize(Entity.Direction), normalize(deltaV))), // Cosine of angle between direction and deltaV - ControllerData.ThrustSpecificity) - * length(deltaV) * ControllerData.ThrustSensitivity); - - protected float TurningInput(float2 deltaV) => clamp(-Entity.Direction.AngleDiff(deltaV) * ControllerData.TurningSensitivity, -1, 1); - - protected ControllerData ControllerData; - protected ItemManager Context; - protected Entity Entity; - - public AgentBehavior(ItemManager context, Entity entity, ControllerData controllerData) - { - Context = context; - Entity = entity; - ControllerData = controllerData; - } -} - -public class Agent -{ - private BaseState _rootState; - private BaseState _currentState; - private Dictionary> _stateTransitions = new Dictionary>(); - - public AgentTask Task { get; set; } - public Ship Ship { get; } - public ItemManager ItemManager { get; } - public GameplaySettings Settings { get; } - - public Agent(Ship ship) - { - Ship = ship; - ItemManager = Ship.ItemManager; - Settings = Ship.ItemManager.GameplaySettings; - - _rootState = _currentState = new BaseState(this); - - var patrolState = new PatrolOrbitsState(this); - AddTransition(_rootState, patrolState, - () => Task is PatrolOrbitsTask, - () => patrolState.Task = Task as PatrolOrbitsTask); - var patrolMoveState = new MoveToOrbitState(this); - AddTransition(patrolState, patrolMoveState, - () => true, - () => patrolMoveState.Orbit = patrolState.CurrentTarget); - AddTransition(patrolMoveState, patrolState, - () => patrolMoveState.Distance < 10, - () => patrolState.NextTarget()); - } - - public void AddTransition(BaseState source, BaseState targetState, Func condition, Action onTransition = null) - { - if(!_stateTransitions.ContainsKey(source)) - _stateTransitions[source] = new List(); - _stateTransitions[source].Add(new StateTransition(targetState, condition, onTransition)); - } - - public void Transition(BaseState targetState, Action onTransition = null) - { - _currentState.OnExitState(); - _currentState = targetState; - onTransition?.Invoke(); - _currentState.OnEnterState(); - } - - public void Update(float delta) - { - _currentState.Update(delta); - foreach (var transition in _stateTransitions[_currentState]) - if (transition.Condition()) - { - Transition(transition.TargetState, transition.OnTransition); - break; - } - } - - public class StateTransition - { - public StateTransition(BaseState targetState, Func condition, Action onTransition) - { - TargetState = targetState; - Condition = condition; - OnTransition = onTransition; - } - - public BaseState TargetState { get; } - public Func Condition { get; } - public Action OnTransition { get; } - } -} - -public class BaseState -{ - protected Agent _agent; - - public BaseState(Agent agent) - { - _agent = agent; - } - public virtual void Update(float delta){} - public virtual void OnEnterState(){} - public virtual void OnExitState(){} -} - -public abstract class MoveToState : BaseState -{ - private const float FORWARD_DELTA_THRESHOLD = 20; - private const float THRUST_DELTA_THRESHOLD = 1; - private VelocityLimit _velocityLimit; - protected abstract float2 TargetPosition { get; } - public float Distance { get; private set; } - - protected MoveToState(Agent agent) : base(agent) - { - _velocityLimit = agent.Ship.GetBehavior(); - } - - public override void Update(float delta) - { - var diff = TargetPosition - _agent.Ship.Position.xz; - var dir = normalize(diff); - Distance = length(diff); - - // We want to go top speed in the direction of our target - var topSpeed = _velocityLimit?.Limit ?? 100; - var desiredVelocity = dir * topSpeed; - var deltaV = desiredVelocity - _agent.Ship.Velocity; - var deltaVMag = length(deltaV); - var deltaVDirection = normalize(deltaV); - // If Delta V is above the threshold, direct the ship towards the delta and use only main thrusters - if (deltaVMag > FORWARD_DELTA_THRESHOLD) - { - _agent.Ship.LookDirection = float3(deltaVDirection.x, 0, deltaVDirection.y); - _agent.Ship.MovementDirection = float2(0, pow(dot(_agent.Ship.Direction, deltaVDirection), 2)); - } - // If Delta V is low, direct the ship towards the target and use all thrusters - else if(deltaVMag > THRUST_DELTA_THRESHOLD) - { - var right = _agent.Ship.Direction.Rotate(ItemRotation.Clockwise); - _agent.Ship.LookDirection = float3(dir.x, 0, dir.y); - _agent.Ship.MovementDirection = float2(dot(right, deltaVDirection), dot(_agent.Ship.Direction, deltaVDirection)); - } - else - { - _agent.Ship.LookDirection = float3(dir.x, 0, dir.y); - _agent.Ship.MovementDirection = float2.zero; - } - } -} - -public class MoveToEntityState : MoveToState -{ - public Entity TargetEntity { get; set; } - protected override float2 TargetPosition => TargetEntity?.Position.xz ?? float2.zero; - - public MoveToEntityState(Agent agent) : base(agent) { } -} - -public class MoveToOrbitState : MoveToState -{ - public Guid Orbit { get; set; } - public MoveToOrbitState(Agent agent) : base(agent) { } - - protected override float2 TargetPosition => _agent.Ship.Zone.GetOrbitPosition(Orbit); -} - -public class PatrolOrbitsState : BaseState -{ - public PatrolOrbitsTask Task; - public Guid CurrentTarget - { - get => Task.Circuit[_currentTargetIndex]; - } - private int _currentTargetIndex; - public void NextTarget() - { - _currentTargetIndex++; - _currentTargetIndex %= Task.Circuit.Length; - } - public PatrolOrbitsState(Agent agent) : base(agent) { } -} \ No newline at end of file diff --git a/Assets/Scripts/ServerShared/Agents/Locomotion.cs b/Assets/Scripts/ServerShared/Agents/Locomotion.cs deleted file mode 100644 index 17dbf0a64..000000000 --- a/Assets/Scripts/ServerShared/Agents/Locomotion.cs +++ /dev/null @@ -1,58 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using Unity.Mathematics; -using static Unity.Mathematics.math; - -public class Locomotion : AgentBehavior -{ - public float2 Objective; - private const float TangentSensitivity = 2; - - private VelocityLimit _velocityLimit; - private Thruster[] _thrusters; - private float _thrust; - - public Locomotion(ItemManager context, Entity entity, ControllerData controllerData) : base(context, entity, controllerData) - { - _velocityLimit = Entity.GetBehavior(); - _thrusters = entity.GetBehaviors() - .Where(t => t.Item.EquippableItem.Rotation == ItemRotation.Reversed) - .ToArray(); - _thrust = _thrusters.Sum(t => t.Thrust); - } - - public override void Update(float delta) - { - var diff = Objective - Entity.Position.xz; - - // We want to go top speed in the direction of our target - var topSpeed = _velocityLimit?.Limit ?? 100; - float2 desiredVelocity = normalize(diff) * topSpeed; - - var accelerationTime = length(desiredVelocity - Entity.Velocity) / (_thrust / Entity.Mass); - var accelerationDistance = accelerationTime * length((desiredVelocity + Entity.Velocity) / 2); - - // We do not have enough space to get to full speed, use approximate maneuvering - // if (accelerationDistance > length(diff)) - // { - // float2 tangential = Entity.Velocity - dot(normalize(diff), normalize(Entity.Velocity)) * Entity.Velocity; - // float2 adjustedDirection = normalize(diff) - tangential * TangentSensitivity; - // - // _turning.Axis = TurningInput(adjustedDirection); - // _thrust.Axis = 1; - // } - // // We have plenty of space, use exact maneuvering - // else - // { - // var deltaV = desiredVelocity - Entity.Velocity; - // _turning.Axis = TurningInput(deltaV); - // _thrust.Axis = ThrustInput(deltaV); - // } - } -} diff --git a/Assets/Scripts/ServerShared/Agents/Minion.cs b/Assets/Scripts/ServerShared/Agents/Minion.cs new file mode 100644 index 000000000..c0937768c --- /dev/null +++ b/Assets/Scripts/ServerShared/Agents/Minion.cs @@ -0,0 +1,23 @@ + +using System.Linq; +using UniRx; + +public class Minion : Agent +{ + public Minion(Ship ship) : base(ship) + { + var patrolState = new PatrolOrbitsState(this); + _rootState.AddTransition(patrolState, + () => Task is PatrolOrbitsTask, + () => patrolState.Task = Task as PatrolOrbitsTask); + + Ship.VisibleHostiles.ObserveAdd().Where(_ => Ship.Target.Value == null).Subscribe(add => Ship.Target.Value = add.Value); + + var combatState = new CombatState(this); + _rootState.AddTransition(combatState, + () => Ship.Target.Value != null, null, true, _rootState); + + combatState.AddTransition(_rootState, + () => Ship.Target.Value == null, null, true, _rootState); + } +} \ No newline at end of file diff --git a/Assets/Scripts/ServerShared/Agents/Minion.cs.meta b/Assets/Scripts/ServerShared/Agents/Minion.cs.meta new file mode 100644 index 000000000..d9f38d35c --- /dev/null +++ b/Assets/Scripts/ServerShared/Agents/Minion.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b764e85a1fbe4d68abcc77480d6523e3 +timeCreated: 1613182738 \ No newline at end of file diff --git a/Assets/Scripts/ServerShared/Agents/States.meta b/Assets/Scripts/ServerShared/Agents/States.meta new file mode 100644 index 000000000..e0857061c --- /dev/null +++ b/Assets/Scripts/ServerShared/Agents/States.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 823a891ccfdd4b13be60053a85bfc073 +timeCreated: 1613182847 \ No newline at end of file diff --git a/Assets/Scripts/ServerShared/Agents/States/BaseState.cs b/Assets/Scripts/ServerShared/Agents/States/BaseState.cs new file mode 100644 index 000000000..f3e4c2bcf --- /dev/null +++ b/Assets/Scripts/ServerShared/Agents/States/BaseState.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; + +public class BaseState +{ + public List Transitions { get; } = new List(); + protected Agent _agent; + + + public BaseState(Agent agent) + { + _agent = agent; + } + + private static List _lastVisitedStates = new List(); + private static List _leafStates = new List(); + private static List _visitedStates = new List(); + private static HashSet _ignoreStates = new HashSet(); + public void AddTransition(BaseState targetState, Func condition, Action onTransition = null, bool includeChildren = false, params BaseState[] ignoreStates) + { + Transitions.Add(new StateTransition(targetState, condition, onTransition)); + + // Traverse the state graph, adding every state that is reachable from this state without traversing over ignored nodes + if (includeChildren) + { + _visitedStates.Clear(); + _ignoreStates.Clear(); + if(ignoreStates!=null) + foreach (var ignoreState in ignoreStates) + _ignoreStates.Add(ignoreState); + _leafStates.Clear(); + _leafStates.Add(this); + _ignoreStates.Add(this); + _ignoreStates.Add(targetState); + while (_leafStates.Count > 0) + { + _lastVisitedStates.Clear(); + _lastVisitedStates.AddRange(_leafStates); + _leafStates.Clear(); + foreach (var state in _lastVisitedStates) + { + foreach (var transition in state.Transitions) + { + if(!_ignoreStates.Contains(transition.TargetState)) + { + _visitedStates.Add(transition.TargetState); + _ignoreStates.Add(transition.TargetState); + _leafStates.Add(transition.TargetState); + } + } + } + } + foreach (var state in _visitedStates) + { + state.AddTransition(targetState, condition, onTransition); + } + } + } + + public virtual void Update(float delta){} + public virtual void OnEnterState(){} + public virtual void OnExitState(){} +} \ No newline at end of file diff --git a/Assets/Scripts/ServerShared/Agents/States/BaseState.cs.meta b/Assets/Scripts/ServerShared/Agents/States/BaseState.cs.meta new file mode 100644 index 000000000..689909d45 --- /dev/null +++ b/Assets/Scripts/ServerShared/Agents/States/BaseState.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a3f09ceb47034c18b938cb8732df690b +timeCreated: 1613182963 \ No newline at end of file diff --git a/Assets/Scripts/ServerShared/Agents/States/Combat.cs b/Assets/Scripts/ServerShared/Agents/States/Combat.cs new file mode 100644 index 000000000..0e65298c9 --- /dev/null +++ b/Assets/Scripts/ServerShared/Agents/States/Combat.cs @@ -0,0 +1,150 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using static Unity.Mathematics.math; +using float2 = Unity.Mathematics.float2; +using float3 = Unity.Mathematics.float3; +using float2x2 = Unity.Mathematics.float2x2; + +public class CombatState : BaseState +{ + private const int DPS_SAMPLE_COUNT = 32; + private float _optimumRange; + private readonly List<(int index, float dps)> _availableGroups = new List<(int index, float dps)>(); + private readonly List _availableLockingWeapons = new List(); + + public CombatState(Agent agent) : base(agent) + { + SampleDps(); + foreach (var weapon in _agent.Ship.Weapons) + { + weapon.Item.OnDisable += SampleDps; + weapon.Item.OnEnable += SampleDps; + } + } + + public override void Update(float delta) + { + var target = _agent.Ship.Target.Value; + if (target == null) return; + + _availableGroups.Clear(); + _availableLockingWeapons.Clear(); + + var toTarget = target.Position - _agent.Ship.Position; + var targetDistance = length(toTarget); + for (var i = 0; i < _agent.Ship.TriggerGroups.Length; i++) + { + var group = _agent.Ship.TriggerGroups[i]; + var dps = 0f; + foreach (var weapon in group.weapons) + if (weapon.Item.Online && + weapon.MinRange < targetDistance && + targetDistance < weapon.Range && + (weapon is ConstantWeapon || + weapon is InstantWeapon instantWeapon && instantWeapon.CanFire)) + { + if(weapon is LockWeapon lockWeapon) + _availableLockingWeapons.Add(lockWeapon); + else + dps += weapon.RangeDamagePerSecond(targetDistance); + } + + if (dps > .1) _availableGroups.Add((i, dps)); + } + + foreach(var w in _availableLockingWeapons) w.Activate(); + + var selectedGroup = -1; + var maxDps = Single.MinValue; + foreach (var group in _availableGroups) + { + if (group.dps > maxDps) + { + maxDps = group.dps; + selectedGroup = group.index; + } + } + + var targetRight = target.Direction.Rotate(ItemRotation.Clockwise); + var optimumRangeDelta = abs(_optimumRange - targetDistance); + var directionToTarget = normalize(toTarget.xz); + var targetPortAlignment = dot(targetRight, directionToTarget); + var targetForeAlignment = dot(-target.Direction, directionToTarget); + var forwardness = saturate(optimumRangeDelta / _agent.Settings.AgentMaxForwardDistance) * _agent.Settings.AgentForwardLerp; + if (targetForeAlignment > 0) forwardness = lerp(forwardness, 1, pow(targetPortAlignment, 2)); + + var movementDirection = normalize(lerp( + directionToTarget.Rotate(targetPortAlignment > 0 ? ItemRotation.Clockwise : ItemRotation.CounterClockwise), + targetDistance > _optimumRange ? directionToTarget : -directionToTarget, forwardness)); + + if (selectedGroup >= 0) + { + var testWeapon = _agent.Ship.TriggerGroups[selectedGroup].weapons.First(); + if(testWeapon.Velocity > 1) + { + var targetHullData = _agent.ItemManager.GetData(target.Hull) as HullData; + var targetVelocity = float3(target.Velocity.x, 0, target.Velocity.y); + var predictedPosition = AetheriaMath.FirstOrderIntercept( + _agent.Ship.Position, + float3.zero, + testWeapon.Velocity, + target.Position, + targetVelocity + ); + predictedPosition.y = _agent.Ship.Zone.GetHeight(predictedPosition.xz) + targetHullData.GridOffset; + toTarget = normalize(predictedPosition - _agent.Ship.Position); + } + + var shouldFire = dot( + _agent.Ship.HardpointTransforms[_agent.Ship.Hardpoints[testWeapon.Item.Position.x, testWeapon.Item.Position.y]].direction, + toTarget) > .99f; + foreach (var weapon in _agent.Ship.TriggerGroups[selectedGroup].weapons) + { + if (shouldFire) + weapon.Activate(); + else if (weapon.Firing) + weapon.Deactivate(); + } + } + _agent.Ship.LookDirection = toTarget; + _agent.Accelerate(movementDirection * _agent.TopSpeed, true);//selectedGroup >= 0); + + // Fire charged guns! + } + + private void SampleDps() + { + var minRange = Single.MaxValue; + var maxRange = Single.MinValue; + foreach (var weapon in _agent.Ship.Weapons) + { + if (weapon.Range < minRange) + minRange = weapon.Range; + if (weapon.Range > maxRange) + maxRange = weapon.Range; + } + + var offset = _agent.ItemManager.Random.NextFloat((maxRange - minRange) / DPS_SAMPLE_COUNT); + var optimumDPS = 0f; + for (int i = 0; i < DPS_SAMPLE_COUNT; i++) + { + var range = offset + minRange + (maxRange - minRange) * ((float) i / DPS_SAMPLE_COUNT); + float dps = 0; + foreach (var weapon in _agent.Ship.Weapons) + { + if (weapon.Item.Online && weapon.MinRange < range && range < weapon.Range) + dps += weapon.RangeDamagePerSecond(range); + } + + // Multiply by range raised to a (sublinear) exponent to bias DPS preference towards longer ranges + dps *= pow(range, _agent.Settings.AgentRangeExponent); + + if (dps > optimumDPS) + { + optimumDPS = dps; + _optimumRange = range; + } + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/ServerShared/Agents/States/Combat.cs.meta b/Assets/Scripts/ServerShared/Agents/States/Combat.cs.meta new file mode 100644 index 000000000..21d0583d1 --- /dev/null +++ b/Assets/Scripts/ServerShared/Agents/States/Combat.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 059405941f2c482c8476a4b28196568e +timeCreated: 1613189894 \ No newline at end of file diff --git a/Assets/Scripts/ServerShared/Agents/States/MatchVelocity.cs b/Assets/Scripts/ServerShared/Agents/States/MatchVelocity.cs new file mode 100644 index 000000000..706989d53 --- /dev/null +++ b/Assets/Scripts/ServerShared/Agents/States/MatchVelocity.cs @@ -0,0 +1,32 @@ +using Unity.Mathematics; +using static Unity.Mathematics.math; +using float2 = Unity.Mathematics.float2; + +public abstract class MatchVelocityState : BaseState +{ + protected abstract float2 TargetVelocity { get; } + + protected MatchVelocityState(Agent agent) : base(agent) { } + + public override void Update(float delta) + { + _agent.Accelerate(TargetVelocity); + } + + public float2 MatchDistanceTime + { + get + { + var velocity = length(_agent.Ship.Velocity); + var deltaV = TargetVelocity - _agent.Ship.Velocity; + + var stoppingTime = length(deltaV) / (_agent.Ship.ForwardThrust / _agent.Ship.Mass); + var stoppingDistance = stoppingTime * (velocity / 2); + + var turnaroundTime = _agent.Ship.TurnTime(deltaV); + var turnaroundDistance = turnaroundTime * velocity; + + return float2(stoppingDistance + turnaroundDistance, stoppingTime + turnaroundTime); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/ServerShared/Agents/States/MatchVelocity.cs.meta b/Assets/Scripts/ServerShared/Agents/States/MatchVelocity.cs.meta new file mode 100644 index 000000000..5ab3b9783 --- /dev/null +++ b/Assets/Scripts/ServerShared/Agents/States/MatchVelocity.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b584acceb113424a8fb7d1982e27b2db +timeCreated: 1613185253 \ No newline at end of file diff --git a/Assets/Scripts/ServerShared/Agents/States/MoveTo.cs b/Assets/Scripts/ServerShared/Agents/States/MoveTo.cs new file mode 100644 index 000000000..12c84fc18 --- /dev/null +++ b/Assets/Scripts/ServerShared/Agents/States/MoveTo.cs @@ -0,0 +1,44 @@ + +using System; +using Unity.Mathematics; +using static Unity.Mathematics.math; +using float2 = Unity.Mathematics.float2; + +public abstract class MoveToState : BaseState +{ + private VelocityLimit _velocityLimit; + protected abstract float2 TargetPosition { get; } + public float Distance { get; private set; } + + protected MoveToState(Agent agent) : base(agent) + { + } + + public override void Update(float delta) + { + var diff = TargetPosition - _agent.Ship.Position.xz; + var dir = normalize(diff); + Distance = length(diff); + + // We want to go top speed in the direction of our target + var desiredVelocity = dir * _agent.TopSpeed; + _agent.Ship.LookDirection = float3(dir.x, 0, dir.y); + _agent.Accelerate(desiredVelocity); + } +} + +public class MoveToEntityState : MoveToState +{ + public Entity TargetEntity { get; set; } + protected override float2 TargetPosition => TargetEntity?.Position.xz ?? float2.zero; + + public MoveToEntityState(Agent agent) : base(agent) { } +} + +public class MoveToOrbitState : MoveToState +{ + public Guid Orbit { get; set; } + public MoveToOrbitState(Agent agent) : base(agent) { } + + protected override float2 TargetPosition => _agent.Ship.Zone.GetOrbitPosition(Orbit); +} diff --git a/Assets/Scripts/ServerShared/Agents/States/MoveTo.cs.meta b/Assets/Scripts/ServerShared/Agents/States/MoveTo.cs.meta new file mode 100644 index 000000000..48603bd41 --- /dev/null +++ b/Assets/Scripts/ServerShared/Agents/States/MoveTo.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: ddb2b91d6c3340ccadfc7c20020846e8 +timeCreated: 1613182864 \ No newline at end of file diff --git a/Assets/Scripts/ServerShared/Agents/Tasks.meta b/Assets/Scripts/ServerShared/Agents/Tasks.meta new file mode 100644 index 000000000..a7148229d --- /dev/null +++ b/Assets/Scripts/ServerShared/Agents/Tasks.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b9d106c37ec34e29aab0c8ee52a7ed5d +timeCreated: 1613182162 \ No newline at end of file diff --git a/Assets/Scripts/ServerShared/Agents/AgentTask.cs b/Assets/Scripts/ServerShared/Agents/Tasks/AgentTask.cs similarity index 88% rename from Assets/Scripts/ServerShared/Agents/AgentTask.cs rename to Assets/Scripts/ServerShared/Agents/Tasks/AgentTask.cs index d8bc72a94..1e6e86fb8 100644 --- a/Assets/Scripts/ServerShared/Agents/AgentTask.cs +++ b/Assets/Scripts/ServerShared/Agents/Tasks/AgentTask.cs @@ -40,8 +40,3 @@ public enum TaskType Explore } -public class PatrolOrbitsTask : AgentTask -{ - public override TaskType Type => TaskType.Defend; - public Guid[] Circuit; -} diff --git a/Assets/Scripts/ServerShared/Agents/AgentTask.cs.meta b/Assets/Scripts/ServerShared/Agents/Tasks/AgentTask.cs.meta similarity index 100% rename from Assets/Scripts/ServerShared/Agents/AgentTask.cs.meta rename to Assets/Scripts/ServerShared/Agents/Tasks/AgentTask.cs.meta diff --git a/Assets/Scripts/ServerShared/Agents/HaulingTask.cs b/Assets/Scripts/ServerShared/Agents/Tasks/HaulingTask.cs similarity index 100% rename from Assets/Scripts/ServerShared/Agents/HaulingTask.cs rename to Assets/Scripts/ServerShared/Agents/Tasks/HaulingTask.cs diff --git a/Assets/Scripts/ServerShared/Agents/HaulingTask.cs.meta b/Assets/Scripts/ServerShared/Agents/Tasks/HaulingTask.cs.meta similarity index 100% rename from Assets/Scripts/ServerShared/Agents/HaulingTask.cs.meta rename to Assets/Scripts/ServerShared/Agents/Tasks/HaulingTask.cs.meta diff --git a/Assets/Scripts/ServerShared/Agents/Mining.cs b/Assets/Scripts/ServerShared/Agents/Tasks/Mining.cs similarity index 100% rename from Assets/Scripts/ServerShared/Agents/Mining.cs rename to Assets/Scripts/ServerShared/Agents/Tasks/Mining.cs diff --git a/Assets/Scripts/ServerShared/Agents/Mining.cs.meta b/Assets/Scripts/ServerShared/Agents/Tasks/Mining.cs.meta similarity index 100% rename from Assets/Scripts/ServerShared/Agents/Mining.cs.meta rename to Assets/Scripts/ServerShared/Agents/Tasks/Mining.cs.meta diff --git a/Assets/Scripts/ServerShared/Agents/Tasks/PatrolOrbits.cs b/Assets/Scripts/ServerShared/Agents/Tasks/PatrolOrbits.cs new file mode 100644 index 000000000..653764217 --- /dev/null +++ b/Assets/Scripts/ServerShared/Agents/Tasks/PatrolOrbits.cs @@ -0,0 +1,31 @@ +using System; + +public class PatrolOrbitsTask : AgentTask +{ + public override TaskType Type => TaskType.Defend; + public Guid[] Circuit; +} + +public class PatrolOrbitsState : BaseState +{ + public PatrolOrbitsTask Task; + public Guid CurrentTarget + { + get => Task.Circuit[_currentTargetIndex]; + } + private int _currentTargetIndex; + public void NextTarget() + { + _currentTargetIndex++; + _currentTargetIndex %= Task.Circuit.Length; + } + + public PatrolOrbitsState(Agent agent) : base(agent) + { + var patrolMoveState = new MoveToOrbitState(agent); + Transitions.Add(new StateTransition(patrolMoveState, + () => true, + () => patrolMoveState.Orbit = CurrentTarget)); + patrolMoveState.Transitions.Add(new StateTransition(this, () => patrolMoveState.Distance < 10, NextTarget)); + } +} \ No newline at end of file diff --git a/Assets/Scripts/ServerShared/Agents/Tasks/PatrolOrbits.cs.meta b/Assets/Scripts/ServerShared/Agents/Tasks/PatrolOrbits.cs.meta new file mode 100644 index 000000000..aa7d98f2c --- /dev/null +++ b/Assets/Scripts/ServerShared/Agents/Tasks/PatrolOrbits.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: dcfc94fde9bb4aa2ac3c7d88180689cb +timeCreated: 1613182188 \ No newline at end of file diff --git a/Assets/Scripts/ServerShared/Agents/StationTowing.cs b/Assets/Scripts/ServerShared/Agents/Tasks/StationTowing.cs similarity index 100% rename from Assets/Scripts/ServerShared/Agents/StationTowing.cs rename to Assets/Scripts/ServerShared/Agents/Tasks/StationTowing.cs diff --git a/Assets/Scripts/ServerShared/Agents/StationTowing.cs.meta b/Assets/Scripts/ServerShared/Agents/Tasks/StationTowing.cs.meta similarity index 100% rename from Assets/Scripts/ServerShared/Agents/StationTowing.cs.meta rename to Assets/Scripts/ServerShared/Agents/Tasks/StationTowing.cs.meta diff --git a/Assets/Scripts/ServerShared/Agents/Survey.cs b/Assets/Scripts/ServerShared/Agents/Tasks/Survey.cs similarity index 100% rename from Assets/Scripts/ServerShared/Agents/Survey.cs rename to Assets/Scripts/ServerShared/Agents/Tasks/Survey.cs diff --git a/Assets/Scripts/ServerShared/Agents/Survey.cs.meta b/Assets/Scripts/ServerShared/Agents/Tasks/Survey.cs.meta similarity index 100% rename from Assets/Scripts/ServerShared/Agents/Survey.cs.meta rename to Assets/Scripts/ServerShared/Agents/Tasks/Survey.cs.meta diff --git a/Assets/Scripts/ServerShared/Agents/WanderTask.cs b/Assets/Scripts/ServerShared/Agents/Tasks/WanderTask.cs similarity index 100% rename from Assets/Scripts/ServerShared/Agents/WanderTask.cs rename to Assets/Scripts/ServerShared/Agents/Tasks/WanderTask.cs diff --git a/Assets/Scripts/ServerShared/Agents/WanderTask.cs.meta b/Assets/Scripts/ServerShared/Agents/Tasks/WanderTask.cs.meta similarity index 100% rename from Assets/Scripts/ServerShared/Agents/WanderTask.cs.meta rename to Assets/Scripts/ServerShared/Agents/Tasks/WanderTask.cs.meta diff --git a/Assets/Scripts/ServerShared/Agents/VelocityMatch.cs b/Assets/Scripts/ServerShared/Agents/VelocityMatch.cs deleted file mode 100644 index 25d01bb8a..000000000 --- a/Assets/Scripts/ServerShared/Agents/VelocityMatch.cs +++ /dev/null @@ -1,63 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using Unity.Mathematics; -using static Unity.Mathematics.math; -using float2 = Unity.Mathematics.float2; - -public class VelocityMatch : AgentBehavior -{ - public event Action OnMatch; - public float2 TargetVelocity; - private Thruster _thrust; - private const float TargetThreshold = .1f; - - private ItemManager _context; - - public VelocityMatch(ItemManager context, Entity entity, ControllerData controllerData) : base(context, entity, controllerData) - { - _context = context; - _thrust = Entity.GetBehavior(); - } - - public void Clear() - { - OnMatch = null; - } - - public override void Update(float delta) - { - // if (_thrust != null && _turning != null) - // { - // var deltaV = TargetVelocity - Entity.Velocity; - // if(length(deltaV) < TargetThreshold) - // OnMatch?.Invoke(); - // _turning.Axis = TurningInput(deltaV); - // _thrust.Axis = ThrustInput(deltaV); - // } - } - - public float2 MatchDistanceTime - { - get - { - // var velocity = length(Entity.Velocity); - // var deltaV = TargetVelocity - Entity.Velocity; - // - // var stoppingTime = length(deltaV) / (_thrust.Thrust / Entity.Mass); - // var stoppingDistance = stoppingTime * (velocity / 2); - // - // var angleDiff = Entity.Direction.AngleDiff(deltaV); - // var turnaroundTime = angleDiff / (_turning.Torque / Entity.Mass); - // var turnaroundDistance = turnaroundTime * velocity; - // - // return float2(stoppingDistance + turnaroundDistance, stoppingTime + turnaroundTime); - return float2.zero; - } - } -} diff --git a/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs b/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs index 8b9bb8751..bf3e2e8cb 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs @@ -71,14 +71,6 @@ public interface IPopulationAssignment int AssignedPopulation { get; set; } } -public interface IController where T: AgentTask -{ - bool Available { get; } - //TaskType TaskType { get; } - Zone Zone { get; } - void AssignTask(T task); -} - [MessagePackObject, Union(0, typeof(FactoryPersistence)), JsonObject(MemberSerialization.OptIn), @@ -101,8 +93,8 @@ public abstract class PersistentBehaviorData Union(10, typeof(VelocityConversionData)), Union(11, typeof(VelocityLimitData)), Union(12, typeof(FactoryData)), - Union(13, typeof(PatrolControllerData)), - Union(14, typeof(TowingControllerData)), + // Union(13, typeof(PatrolControllerData)), + // Union(14, typeof(TowingControllerData)), Union(15, typeof(CooldownData)), Union(16, typeof(HeatData)), // Union(17, typeof(HitscanData)), @@ -113,12 +105,12 @@ public abstract class PersistentBehaviorData Union(22, typeof(VisibilityData)), Union(23, typeof(ThermotoggleData)), Union(24, typeof(EnergyDrawData)), - Union(25, typeof(MiningControllerData)), + // Union(25, typeof(MiningControllerData)), Union(26, typeof(MiningToolData)), - Union(27, typeof(SurveyControllerData)), + // Union(27, typeof(SurveyControllerData)), Union(28, typeof(ResourceScannerData)), - Union(29, typeof(WanderControllerData)), - Union(30, typeof(HaulingControllerData)), + // Union(29, typeof(WanderControllerData)), + // Union(30, typeof(HaulingControllerData)), Union(31, typeof(CapacitorData)), Union(32, typeof(CockpitData)), Union(33, typeof(HeatsinkData)), diff --git a/Assets/Scripts/ServerShared/Behaviors/ChargedWeapon.cs b/Assets/Scripts/ServerShared/Behaviors/ChargedWeapon.cs index f755d6bc5..484101525 100644 --- a/Assets/Scripts/ServerShared/Behaviors/ChargedWeapon.cs +++ b/Assets/Scripts/ServerShared/Behaviors/ChargedWeapon.cs @@ -62,6 +62,15 @@ public class ChargedWeapon : InstantWeapon public float ChargeTime { get; protected set; } public float ChargeEnergy { get; protected set; } public float ChargeHeat { get; protected set; } + + public override float DamagePerSecond => Damage * _data.ChargeFiringDamageMultiplier / (Cooldown + ChargeTime); + public override float RangeDamagePerSecond(float range) + { + return Damage * + _data.ChargeFiringDamageMultiplier * + _data.DamageCurve.Evaluate(saturate(unlerp(MinRange, Range, range))) / + (Cooldown + ChargeTime); + } public event Action OnStartCharging; public event Action OnStopCharging; diff --git a/Assets/Scripts/ServerShared/Behaviors/ConstantWeapon.cs b/Assets/Scripts/ServerShared/Behaviors/ConstantWeapon.cs index 5ce26c0c2..851aa033b 100644 --- a/Assets/Scripts/ServerShared/Behaviors/ConstantWeapon.cs +++ b/Assets/Scripts/ServerShared/Behaviors/ConstantWeapon.cs @@ -37,6 +37,12 @@ public class ConstantWeapon : Weapon, IProgressBehavior { get { return saturate(_reload); } } + + public override float DamagePerSecond => Damage; + public override float RangeDamagePerSecond(float range) + { + return Damage * _data.DamageCurve.Evaluate(saturate(unlerp(MinRange, Range, range))); + } public event Action OnReloadBegin; public event Action OnReloadComplete; diff --git a/Assets/Scripts/ServerShared/Behaviors/Controller.cs b/Assets/Scripts/ServerShared/Behaviors/Controller.cs deleted file mode 100644 index e8e88eb09..000000000 --- a/Assets/Scripts/ServerShared/Behaviors/Controller.cs +++ /dev/null @@ -1,257 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ - -using System; -using System.Collections; -using System.Collections.Generic; -using MessagePack; -using Newtonsoft.Json; -using UniRx; -using Unity.Mathematics; -using static Unity.Mathematics.math; -using float2 = Unity.Mathematics.float2; - -[Union(0, typeof(TowingControllerData))] -public abstract class ControllerData : BehaviorData -{ - [InspectableField, JsonProperty("thrustSensitivity"), Key(1)] - public float ThrustSensitivity = 1; - - [InspectableField, JsonProperty("thrustSpecificity"), Key(2)] - public float ThrustSpecificity = 8; - - [InspectableField, JsonProperty("turningSensitivity"), Key(3)] - public float TurningSensitivity = 1; - - [InspectableField, JsonProperty("tangentSensitivity"), Key(4)] - public float TangentSensitivity = 4; - - [InspectableField, JsonProperty("targetDistance"), Key(5)] - public float TargetDistance = 10; -} - -public abstract class ControllerBase : IBehavior, IController, IInitializableBehavior where T : AgentTask -{ - protected Entity HomeEntity => (Entity as Ship)?.HomeEntity; - public bool Available => _spaceworthy && Task == null; - //public abstract TaskType TaskType { get; } - public Zone Zone => Entity.Zone; - public BehaviorData Data => _controllerData; - - protected ItemManager ItemManager { get; } - protected Entity Entity { get; } - - protected Locomotion Locomotion; - protected VelocityMatch VelocityMatch; - protected Func TargetPosition; - protected Func TargetVelocity; - protected bool MatchVelocity; - // protected List Path; - protected T Task; - protected bool Moving; - protected bool Waiting; - - private ControllerData _controllerData; - private MovementPhase _movementPhase; - private Action _onFinishMoving; - private bool _spaceworthy; - private float _waitTime; - private Action _onFinishWaiting; - - public ControllerBase(ItemManager itemManager, ControllerData data, Entity entity) - { - ItemManager = itemManager; - Entity = entity; - _controllerData = data; - CheckSpaceworthiness(); - entity.Equipment.ObserveAdd().Subscribe(added => CheckSpaceworthiness()); - } - - private void CheckSpaceworthiness() - { - _spaceworthy = Entity.GetBehavior() != null && Entity.GetBehavior() != null; - if(_spaceworthy) - CreateBehaviors(); - } - - public void CreateBehaviors() - { - Locomotion = new Locomotion(ItemManager, Entity, _controllerData); - VelocityMatch = new VelocityMatch(ItemManager, Entity, _controllerData); - } - - public void Initialize() - { - CreateBehaviors(); - // _context.CorporationControllers[_entity.Corporation].Add(this); - } - - public void AssignTask(T task) - { - Task = task; - Moving = false; - } - - public bool Execute(float delta) - { - if (Available) - { - // No task is assigned and we're at home, do nothing! - if (Entity.Parent == HomeEntity) - return false; - - // No task is assigned, but we're not home, go home! - if (!Moving) - { - GoHome(); - } - } - - if (Waiting) - { - _waitTime -= delta; - if (_waitTime < 0) - { - Waiting = false; - _onFinishWaiting?.Invoke(); - } - - return true; - } - - if (Moving) - { - if(Entity.Parent!=null) - Entity.RemoveParent(); - - var targetPosition = TargetPosition(); - var distance = length(targetPosition - Entity.Position.xz); - if (MatchVelocity) - { - var targetVelocity = TargetVelocity(); - VelocityMatch.TargetVelocity = targetVelocity; - if (_movementPhase == MovementPhase.Locomotion) - { - var matchDistanceTime = VelocityMatch.MatchDistanceTime; - Locomotion.Objective = targetPosition + targetVelocity * matchDistanceTime.y; - Locomotion.Update(delta); - - if (distance < matchDistanceTime.x) - { - _movementPhase = MovementPhase.Slowdown; - //_context.Log($"Controller {_entity.Name} has entered slowdown phase."); - VelocityMatch.Clear(); - VelocityMatch.OnMatch += () => - { - Moving = false; - _onFinishMoving?.Invoke(); - }; - } - } - else - { - VelocityMatch.TargetVelocity = targetVelocity; - VelocityMatch.Update(delta); - } - } - else - { - Locomotion.Objective = TargetPosition(); - Locomotion.Update(delta); - if (distance < _controllerData.TargetDistance) - { - Moving = false; - _onFinishMoving(); - } - } - } - - return true; - } - - public void FinishTask() - { - if (Task == null) - return; - - Task = null; - } - - public void GoHome(Action onFinish = null) - { - MoveTo(HomeEntity, true, () => - { - Entity.SetParent(HomeEntity); - onFinish?.Invoke(); - }); - // else MoveTo(homeEntity.Zone.Data.ID, () => MoveTo(homeEntity, true, () => - // { - // _entity.SetParent(homeEntity); - // onFinish?.Invoke(); - // })); - } - - public void Wait(float time, Action onFinish = null) - { - _waitTime = time; - Waiting = true; - _onFinishWaiting = onFinish; - } - - public void MoveTo(Entity entity, bool matchVelocity = true, Action onFinish = null) - { - TargetPosition = () => entity.Position.xz; - TargetVelocity = () => entity.Velocity; - MatchVelocity = matchVelocity; - _movementPhase = MovementPhase.Locomotion; - Moving = true; - _onFinishMoving = onFinish; - } - - public void MoveTo(float2 position, bool matchVelocity = true, Action onFinish = null) - { - TargetPosition = () => position; - TargetVelocity = () => float2.zero; - MatchVelocity = matchVelocity; - _movementPhase = MovementPhase.Locomotion; - Moving = true; - _onFinishMoving = onFinish; - } - - public void MoveTo(Func position, Func velocity, Action onFinish = null) - { - TargetPosition = position; - TargetVelocity = velocity; - MatchVelocity = true; - _movementPhase = MovementPhase.Locomotion; - Moving = true; - _onFinishMoving = onFinish; - } - - // public void MoveTo(Guid zone, Action onFinish = null) - // { - // var path = _context.FindPath(_context.GalaxyZones[Zone.Data.ID], _context.GalaxyZones[zone]); - // - // void OnNextZone() - // { - // path.RemoveAt(0); - // if (path.Count > 0) - // { - // MoveTo(Zone.WormholePosition(Path[0]), false, OnNextZone); - // } - // else - // { - // onFinish?.Invoke(); - // } - // } - // - // OnNextZone(); - // } -} - -public enum MovementPhase -{ - Locomotion, - Slowdown -} \ No newline at end of file diff --git a/Assets/Scripts/ServerShared/Behaviors/HaulingController.cs b/Assets/Scripts/ServerShared/Behaviors/HaulingController.cs index d39bc0531..8236fea82 100644 --- a/Assets/Scripts/ServerShared/Behaviors/HaulingController.cs +++ b/Assets/Scripts/ServerShared/Behaviors/HaulingController.cs @@ -2,146 +2,146 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using MessagePack; -using Newtonsoft.Json; -using Unity.Mathematics; -using static Unity.Mathematics.math; - -[MessagePackObject, JsonObject(MemberSerialization.OptIn), EntityTypeRestriction(HullType.Ship), Order(-100)] -public class HaulingControllerData : ControllerData -{ - [InspectableField, JsonProperty("targetDistance"), Key(6)] - public float DockTime = 2; - public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item) - { - return new HaulingController(context, this, entity, item); - } -} - -public class HaulingController : ControllerBase, IBehavior, IPersistentBehavior -{ - private HaulingControllerData _data; - private EquippedItem Item { get; } - - private bool _taskStarted; - private int _itemsDelivered; - private int _itemsCarried; - private SimpleCommodity _simpleCommodityDelivery; - private List _craftedItemDelivery = new List(); - - public HaulingController(ItemManager itemManager, HaulingControllerData data, Entity entity, EquippedItem item) : base(itemManager, data, entity) - { - _data = data; - Item = item; - } - - public new bool Execute(float delta) - { - if (Task != null) - { - if (!_taskStarted) - { - MoveTo(Task.Origin, true, OnPickup); - //MoveTo(haulingTask.Zone, OnOriginZoneArrival); - _taskStarted = true; - } - } - return base.Execute(delta); - } - - // void OnOriginZoneArrival() - // { - // var haulingTask = _context.ItemData.Get(Task); - // - // _entity.SetMessage("Entering pickup phase."); - // - // MoveTo(_context.ItemData.Get(haulingTask.Origin), true, OnPickup); - // } - - void OnPickup() - { - Entity.SetParent(Task.Origin); - - _itemsCarried = Task.Origin.TryTransferItems(Entity, Task.ItemType, Task.Quantity - _itemsDelivered); - - if (_itemsCarried == 0) - { - FinishTask(); - return; - } - - Wait(_data.DockTime, OnItemObtained); - } - - void OnItemObtained() - { - Entity.SetMessage("Entering delivery phase."); - - MoveTo(Task.Target, true, OnDelivery); - //MoveTo(target.Zone.Data.ID, OnTargetZoneArrival); - } - - // void OnTargetZoneArrival() - // { - // var haulingTask = _context.ItemData.Get(Task); - // - // MoveTo(_context.ItemData.Get(haulingTask.Target), true, OnDelivery); - // } - - void OnDelivery() - { - Entity.SetParent(Task.Target); - - var itemsDelivered = Entity.TryTransferItems(Task.Target, Task.ItemType, _itemsCarried); - _itemsCarried -= itemsDelivered; - _itemsDelivered += itemsDelivered; - - Wait(_data.DockTime, () => - { - // We were unable to transfer all onboard items to target entity, cargo is probably full. Bring back the surplus and end the mission - if(_itemsCarried > 0) - MoveTo(Task.Origin, true, ReturnSurplusToOrigin); - // We have delivered the target quantity of items, end the mission - else if(_itemsDelivered >= Task.Quantity) - FinishTask(); - // We aren't done yet. Resetting the task will make us go for another delivery run - else - _taskStarted = false; - }); - } - - void ReturnSurplusToOrigin() - { - Entity.SetParent(Task.Origin); - - Entity.TryTransferItems(Task.Origin, Task.ItemType, _itemsCarried); - - Wait(_data.DockTime, OnItemObtained); - - FinishTask(); - } - - public PersistentBehaviorData Store() - { - return new HaulingControllerPersistence - { - Task = Task - }; - } - - public void Restore(PersistentBehaviorData data) - { - var towingControllerPersistence = data as HaulingControllerPersistence; - Task = towingControllerPersistence.Task; - } -} - -public class HaulingControllerPersistence : PersistentBehaviorData -{ - [JsonProperty("task"), Key(0)] - public HaulingTask Task; -} \ No newline at end of file +// using System; +// using System.Collections; +// using System.Collections.Generic; +// using System.Linq; +// using MessagePack; +// using Newtonsoft.Json; +// using Unity.Mathematics; +// using static Unity.Mathematics.math; +// +// [MessagePackObject, JsonObject(MemberSerialization.OptIn), EntityTypeRestriction(HullType.Ship), Order(-100)] +// public class HaulingControllerData : ControllerData +// { +// [InspectableField, JsonProperty("targetDistance"), Key(6)] +// public float DockTime = 2; +// public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item) +// { +// return new HaulingController(context, this, entity, item); +// } +// } +// +// public class HaulingController : ControllerBase, IBehavior, IPersistentBehavior +// { +// private HaulingControllerData _data; +// private EquippedItem Item { get; } +// +// private bool _taskStarted; +// private int _itemsDelivered; +// private int _itemsCarried; +// private SimpleCommodity _simpleCommodityDelivery; +// private List _craftedItemDelivery = new List(); +// +// public HaulingController(ItemManager itemManager, HaulingControllerData data, Entity entity, EquippedItem item) : base(itemManager, data, entity) +// { +// _data = data; +// Item = item; +// } +// +// public new bool Execute(float delta) +// { +// if (Task != null) +// { +// if (!_taskStarted) +// { +// MoveTo(Task.Origin, true, OnPickup); +// //MoveTo(haulingTask.Zone, OnOriginZoneArrival); +// _taskStarted = true; +// } +// } +// return base.Execute(delta); +// } +// +// // void OnOriginZoneArrival() +// // { +// // var haulingTask = _context.ItemData.Get(Task); +// // +// // _entity.SetMessage("Entering pickup phase."); +// // +// // MoveTo(_context.ItemData.Get(haulingTask.Origin), true, OnPickup); +// // } +// +// void OnPickup() +// { +// Entity.SetParent(Task.Origin); +// +// _itemsCarried = Task.Origin.TryTransferItems(Entity, Task.ItemType, Task.Quantity - _itemsDelivered); +// +// if (_itemsCarried == 0) +// { +// FinishTask(); +// return; +// } +// +// Wait(_data.DockTime, OnItemObtained); +// } +// +// void OnItemObtained() +// { +// Entity.SetMessage("Entering delivery phase."); +// +// MoveTo(Task.Target, true, OnDelivery); +// //MoveTo(target.Zone.Data.ID, OnTargetZoneArrival); +// } +// +// // void OnTargetZoneArrival() +// // { +// // var haulingTask = _context.ItemData.Get(Task); +// // +// // MoveTo(_context.ItemData.Get(haulingTask.Target), true, OnDelivery); +// // } +// +// void OnDelivery() +// { +// Entity.SetParent(Task.Target); +// +// var itemsDelivered = Entity.TryTransferItems(Task.Target, Task.ItemType, _itemsCarried); +// _itemsCarried -= itemsDelivered; +// _itemsDelivered += itemsDelivered; +// +// Wait(_data.DockTime, () => +// { +// // We were unable to transfer all onboard items to target entity, cargo is probably full. Bring back the surplus and end the mission +// if(_itemsCarried > 0) +// MoveTo(Task.Origin, true, ReturnSurplusToOrigin); +// // We have delivered the target quantity of items, end the mission +// else if(_itemsDelivered >= Task.Quantity) +// FinishTask(); +// // We aren't done yet. Resetting the task will make us go for another delivery run +// else +// _taskStarted = false; +// }); +// } +// +// void ReturnSurplusToOrigin() +// { +// Entity.SetParent(Task.Origin); +// +// Entity.TryTransferItems(Task.Origin, Task.ItemType, _itemsCarried); +// +// Wait(_data.DockTime, OnItemObtained); +// +// FinishTask(); +// } +// +// public PersistentBehaviorData Store() +// { +// return new HaulingControllerPersistence +// { +// Task = Task +// }; +// } +// +// public void Restore(PersistentBehaviorData data) +// { +// var towingControllerPersistence = data as HaulingControllerPersistence; +// Task = towingControllerPersistence.Task; +// } +// } +// +// public class HaulingControllerPersistence : PersistentBehaviorData +// { +// [JsonProperty("task"), Key(0)] +// public HaulingTask Task; +// } \ No newline at end of file diff --git a/Assets/Scripts/ServerShared/Behaviors/InstantWeapon.cs b/Assets/Scripts/ServerShared/Behaviors/InstantWeapon.cs index 079aa9dff..8b08b9c89 100644 --- a/Assets/Scripts/ServerShared/Behaviors/InstantWeapon.cs +++ b/Assets/Scripts/ServerShared/Behaviors/InstantWeapon.cs @@ -37,10 +37,20 @@ public class InstantWeapon : Weapon, IProgressBehavior protected float _cooldown; // Normalized private int _ammo = 0; protected bool _coolingDown; - + public float BurstCount { get; protected set; } public float BurstTime { get; protected set; } public float Cooldown { get; protected set; } + public virtual bool CanFire + { + get => !_coolingDown; + } + + public override float DamagePerSecond => Damage / Cooldown; + public override float RangeDamagePerSecond(float range) + { + return Damage * _data.DamageCurve.Evaluate(saturate(unlerp(MinRange, Range, range))) / Cooldown; + } public override int Ammo { @@ -126,11 +136,11 @@ public class InstantWeapon : Weapon, IProgressBehavior base.Execute(delta); if (_coolingDown) { - _cooldown -= delta / (_ammo == 0 ? _data.ReloadTime : Cooldown); + _cooldown -= delta / (_data.AmmoType != Guid.Empty && _ammo == 0 ? _data.ReloadTime : Cooldown); if (_cooldown < 0) { _coolingDown = false; - if (_ammo == 0) + if (_data.AmmoType != Guid.Empty && _ammo == 0) { _ammo = _data.MagazineSize; OnReloadComplete?.Invoke(); @@ -159,7 +169,7 @@ public class InstantWeapon : Weapon, IProgressBehavior public override void Activate() { - if(!_coolingDown) + if(CanFire) Trigger(); base.Activate(); } diff --git a/Assets/Scripts/ServerShared/Behaviors/LockWeapon.cs b/Assets/Scripts/ServerShared/Behaviors/LockWeapon.cs index ee9a864af..38304c966 100644 --- a/Assets/Scripts/ServerShared/Behaviors/LockWeapon.cs +++ b/Assets/Scripts/ServerShared/Behaviors/LockWeapon.cs @@ -49,6 +49,8 @@ public class LockWeapon : InstantWeapon public override float Progress => saturate(_cooldown > 0 ? _cooldown : _lock); + public override bool CanFire => base.CanFire && _lock > .99f && Entity.TargetRange > MinRange && Entity.TargetRange < Range; + public float Lock { get => saturate(_lock); @@ -86,13 +88,5 @@ public class LockWeapon : InstantWeapon return base.Execute(delta); } - - public override void Activate() - { - if(_lock > .99f) - { - base.Activate(); - } - } } diff --git a/Assets/Scripts/ServerShared/Behaviors/MiningController.cs b/Assets/Scripts/ServerShared/Behaviors/MiningController.cs index 8f6840dd2..47478f537 100644 --- a/Assets/Scripts/ServerShared/Behaviors/MiningController.cs +++ b/Assets/Scripts/ServerShared/Behaviors/MiningController.cs @@ -11,131 +11,131 @@ using Newtonsoft.Json; using Unity.Mathematics; using static Unity.Mathematics.math; -[MessagePackObject, JsonObject(MemberSerialization.OptIn), EntityTypeRestriction(HullType.Ship), Order(-100)] -public class MiningControllerData : ControllerData -{ - public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item) - { - return new MiningController(context, this, entity, item); - } -} - -public class MiningController : ControllerBase, IBehavior, IPersistentBehavior, IInitializableBehavior -{ - - private MiningControllerData _data; - private EquippedItem Item { get; } - private bool _taskStarted; - private int _asteroid = -1; - private MiningTool _miningTool; - private Switch _toolSwitch; - - public MiningController(ItemManager itemManager, MiningControllerData data, Entity entity, EquippedItem item) : base(itemManager, data, entity) - { - _data = data; - Item = item; - } - - public new void Initialize() - { - // _miningTool = Entity.GetBehavior(); - // _toolSwitch = Entity.GetSwitch(); - base.Initialize(); - } - - public new bool Execute(float delta) - { - // if (Task != null) - // { - // if (!_taskStarted) - // { - // NextAsteroid(); - // _taskStarted = true; - // } - // else - // { - // if (!Moving) - // { - // if (_entity.OccupiedCapacity < _entity.Capacity - 1) - // { - // var asteroidTransform = Zone.GetAsteroidTransform(Task.Asteroids, _asteroid); - // if (length(_entity.Position - asteroidTransform.xy) - asteroidTransform.w > _miningTool.Range) - // { - // _entity.SetMessage("Moving to target asteroid."); - // MoveTo(() => Zone.GetAsteroidTransform(Task.Asteroids, _asteroid).xy, - // () => Zone.GetAsteroidVelocity(Task.Asteroids, _asteroid)); - // _toolSwitch.Activated = false; - // } - // else - // { - // if (Zone.AsteroidExists(Task.Asteroids, _asteroid)) - // { - // _miningTool.AsteroidBelt = Task.Asteroids; - // _miningTool.Asteroid = _asteroid; - // _toolSwitch.Activated = true; - // Aim.Objective = Zone.GetAsteroidTransform(Task.Asteroids, _asteroid).xy; - // Aim.Update(delta); - // } - // else NextAsteroid(); - // } - // } - // else - // { - // _entity.SetMessage("Out of cargo space. Returning home to offload cargo."); - // GoHome(OnArriveHome); - // } - // } - // } - // } - return base.Execute(delta); - } - - // private void OnArriveHome() - // { - // var homeEntity = _context.ItemData.Get(HomeEntity); - // foreach (var item in _entity.Cargo - // .Select(id => _context.ItemData.Get(id)) - // .Where(item => item is SimpleCommodity) - // .Cast() - // .ToArray()) - // { - // int quantity = min((int) ((homeEntity.Capacity - homeEntity.OccupiedCapacity) / _context.GetData(item).Size), item.Quantity); - // var newItem = _entity.RemoveCargo(item, quantity); - // homeEntity.AddCargo(newItem); - // - // if (quantity < item.Quantity) - // { - // homeEntity.SetMessage("Colony is out of cargo space. Closing Mining Task."); - // FinishTask(); - // _taskStarted = false; - // return; - // } - // } - // } - - private void NextAsteroid() - { - _asteroid = Zone.NearestAsteroid(Task.Asteroids, Entity.Position.xz); - Entity.SetMessage("Selecting new asteroid."); - } - - public PersistentBehaviorData Store() - { - return new MiningControllerPersistence - { - Task = Task - }; - } - - public void Restore(PersistentBehaviorData data) - { - var miningControllerPersistence = data as MiningControllerPersistence; - Task = miningControllerPersistence.Task; - } -} - -public class MiningControllerPersistence : PersistentBehaviorData -{ - [JsonProperty("task"), Key(0)] - public Mining Task; -} \ No newline at end of file +// [MessagePackObject, JsonObject(MemberSerialization.OptIn), EntityTypeRestriction(HullType.Ship), Order(-100)] +// public class MiningControllerData : ControllerData +// { +// public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item) +// { +// return new MiningController(context, this, entity, item); +// } +// } +// +// public class MiningController : ControllerBase, IBehavior, IPersistentBehavior, IInitializableBehavior +// { +// +// private MiningControllerData _data; +// private EquippedItem Item { get; } +// private bool _taskStarted; +// private int _asteroid = -1; +// private MiningTool _miningTool; +// private Switch _toolSwitch; +// +// public MiningController(ItemManager itemManager, MiningControllerData data, Entity entity, EquippedItem item) : base(itemManager, data, entity) +// { +// _data = data; +// Item = item; +// } +// +// public new void Initialize() +// { +// // _miningTool = Entity.GetBehavior(); +// // _toolSwitch = Entity.GetSwitch(); +// base.Initialize(); +// } +// +// public new bool Execute(float delta) +// { +// // if (Task != null) +// // { +// // if (!_taskStarted) +// // { +// // NextAsteroid(); +// // _taskStarted = true; +// // } +// // else +// // { +// // if (!Moving) +// // { +// // if (_entity.OccupiedCapacity < _entity.Capacity - 1) +// // { +// // var asteroidTransform = Zone.GetAsteroidTransform(Task.Asteroids, _asteroid); +// // if (length(_entity.Position - asteroidTransform.xy) - asteroidTransform.w > _miningTool.Range) +// // { +// // _entity.SetMessage("Moving to target asteroid."); +// // MoveTo(() => Zone.GetAsteroidTransform(Task.Asteroids, _asteroid).xy, +// // () => Zone.GetAsteroidVelocity(Task.Asteroids, _asteroid)); +// // _toolSwitch.Activated = false; +// // } +// // else +// // { +// // if (Zone.AsteroidExists(Task.Asteroids, _asteroid)) +// // { +// // _miningTool.AsteroidBelt = Task.Asteroids; +// // _miningTool.Asteroid = _asteroid; +// // _toolSwitch.Activated = true; +// // Aim.Objective = Zone.GetAsteroidTransform(Task.Asteroids, _asteroid).xy; +// // Aim.Update(delta); +// // } +// // else NextAsteroid(); +// // } +// // } +// // else +// // { +// // _entity.SetMessage("Out of cargo space. Returning home to offload cargo."); +// // GoHome(OnArriveHome); +// // } +// // } +// // } +// // } +// return base.Execute(delta); +// } +// +// // private void OnArriveHome() +// // { +// // var homeEntity = _context.ItemData.Get(HomeEntity); +// // foreach (var item in _entity.Cargo +// // .Select(id => _context.ItemData.Get(id)) +// // .Where(item => item is SimpleCommodity) +// // .Cast() +// // .ToArray()) +// // { +// // int quantity = min((int) ((homeEntity.Capacity - homeEntity.OccupiedCapacity) / _context.GetData(item).Size), item.Quantity); +// // var newItem = _entity.RemoveCargo(item, quantity); +// // homeEntity.AddCargo(newItem); +// // +// // if (quantity < item.Quantity) +// // { +// // homeEntity.SetMessage("Colony is out of cargo space. Closing Mining Task."); +// // FinishTask(); +// // _taskStarted = false; +// // return; +// // } +// // } +// // } +// +// private void NextAsteroid() +// { +// _asteroid = Zone.NearestAsteroid(Task.Asteroids, Entity.Position.xz); +// Entity.SetMessage("Selecting new asteroid."); +// } +// +// public PersistentBehaviorData Store() +// { +// return new MiningControllerPersistence +// { +// Task = Task +// }; +// } +// +// public void Restore(PersistentBehaviorData data) +// { +// var miningControllerPersistence = data as MiningControllerPersistence; +// Task = miningControllerPersistence.Task; +// } +// } +// +// public class MiningControllerPersistence : PersistentBehaviorData +// { +// [JsonProperty("task"), Key(0)] +// public Mining Task; +// } \ No newline at end of file diff --git a/Assets/Scripts/ServerShared/Behaviors/PatrolController.cs b/Assets/Scripts/ServerShared/Behaviors/PatrolController.cs deleted file mode 100644 index 0287585e7..000000000 --- a/Assets/Scripts/ServerShared/Behaviors/PatrolController.cs +++ /dev/null @@ -1,63 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using MessagePack; -using Newtonsoft.Json; -using Unity.Mathematics; -using static Unity.Mathematics.math; - -[MessagePackObject, JsonObject(MemberSerialization.OptIn), EntityTypeRestriction(HullType.Ship), Order(-100)] -public class PatrolControllerData : ControllerData -{ - public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item) - { - return new PatrolController(context, this, entity, item); - } -} - -public class PatrolController : IBehavior, IInitializableBehavior -{ - public BehaviorData Data => _data; - - private PatrolControllerData _data; - private ItemManager Context { get; } - private Entity Entity { get; } - private EquippedItem Item { get; } - private Locomotion _locomotion; - private Guid _targetOrbit; - - public PatrolController(ItemManager context, PatrolControllerData data, Entity entity, EquippedItem item) - { - Context = context; - _data = data; - Entity = entity; - Item = item; - } - - public void Initialize() - { - _locomotion = new Locomotion(Context, Entity, _data); - RandomTarget(); - } - - public bool Execute(float delta) - { - _locomotion.Objective = Entity.Zone.GetOrbitPosition(_targetOrbit); - _locomotion.Update(delta); - - if(length(Entity.Position.xz - _locomotion.Objective) < _data.TargetDistance) - RandomTarget(); - - return true; - } - - private void RandomTarget() - { - _targetOrbit = Entity.Zone.Planets.Keys.ToArray()[Context.Random.NextInt(Entity.Zone.Planets.Count)]; - } -} diff --git a/Assets/Scripts/ServerShared/Behaviors/Sensor.cs b/Assets/Scripts/ServerShared/Behaviors/Sensor.cs index d4462594a..85aead875 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Sensor.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Sensor.cs @@ -13,7 +13,7 @@ public class SensorData : BehaviorData [InspectableField, JsonProperty("sensitivity"), Key(3), RuntimeInspectable] public PerformanceStat Sensitivity = new PerformanceStat(); - [InspectableField, JsonProperty("sensitivityCurve"), Key(4), RuntimeInspectable] + [InspectableAnimationCurve, JsonProperty("sensitivityCurve"), Key(4), RuntimeInspectable] public float4[] SensitivityCurve; public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item) @@ -44,19 +44,28 @@ public class Sensor : IBehavior { // TODO: Handle Active Detection / Visibility From Reflected Radiance var hardpoint = Entity.Hardpoints[Item.Position.x, Item.Position.y]; - var forward = Entity.HardpointTransforms.ContainsKey(hardpoint) ? + var forward = hardpoint != null && Entity.HardpointTransforms.ContainsKey(hardpoint) ? normalize(Entity.HardpointTransforms[hardpoint].direction.xz) : Entity.Direction; foreach (var entity in Entity.Zone.Entities) - { - var diff = entity.Position.xz - Entity.Position.xz; - var angle = acos(dot(forward, normalize(diff))); - var dist = length(diff); - Entity.EntityInfoGathered[entity] += - entity.Visibility * - Context.Evaluate(_data.Sensitivity, Item.EquippableItem, Entity) * - _data.SensitivityCurve.Evaluate(angle / PI) * - delta / dist; + { + if(entity != Entity) + { + var diff = entity.Position.xz - Entity.Position.xz; + var angle = acos(dot(forward, normalize(diff))); + var dist = length(diff); + float previous; + Entity.EntityInfoGathered.TryGetValue(entity, out previous); + var next = saturate( + previous + + entity.Visibility * + Context.Evaluate(_data.Sensitivity, Item.EquippableItem, Entity) * + _data.SensitivityCurve.Evaluate(angle / PI) * + delta / dist); + next *= 1 - Context.GameplaySettings.TargetInfoDecay * delta; + //Context.Log($"{entity.Name} visibility {(int)(previous * 100)}% -> {(int)(next * 100)}%"); + Entity.EntityInfoGathered[entity] = next; + } } return true; // var ship = Hardpoint.Ship.Ship.transform; diff --git a/Assets/Scripts/ServerShared/Behaviors/SurveyController.cs b/Assets/Scripts/ServerShared/Behaviors/SurveyController.cs index 5ab579dec..6677c9ceb 100644 --- a/Assets/Scripts/ServerShared/Behaviors/SurveyController.cs +++ b/Assets/Scripts/ServerShared/Behaviors/SurveyController.cs @@ -12,144 +12,144 @@ using RethinkDb.Driver.Ast; using Unity.Mathematics; using static Unity.Mathematics.math; -[MessagePackObject, JsonObject(MemberSerialization.OptIn), EntityTypeRestriction(HullType.Ship), Order(-100)] -public class SurveyControllerData : ControllerData -{ - public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item) - { - return new SurveyController(context, this, entity, item); - } -} - -public class SurveyController : ControllerBase, IBehavior, IPersistentBehavior, IInitializableBehavior -{ - private EquippedItem Item { get; } - - private SurveyControllerData _data; - private bool _taskStarted; - private ResourceScanner _scanningTool; - private Switch _toolSwitch; - private Guid _targetPlanet; - private int _asteroid = -1; - - public SurveyController(ItemManager itemManager, SurveyControllerData data, Entity entity, EquippedItem item) : base(itemManager, data, entity) - { - _data = data; - Item = item; - } - - public new void Initialize() - { - _scanningTool = Entity.GetBehavior(); - // _toolSwitch = Entity.GetSwitch(); - base.Initialize(); - } - - public new bool Execute(float delta) - { - // var corporation = _context.ItemData.Get(_entity.Corporation); - // if (surveyTask != null) - // { - // if (!_taskStarted) - // { - // if (surveyTask.Planets.Any()) - // { - // _entity.SetMessage("Moving to survey target."); - // NextPlanet(); - // _scanningTool.ScanTarget = _targetPlanet; - // _scanningTool.Asteroid = _asteroid; - // if (!corporation.PlanetSurveyFloor.ContainsKey(_targetPlanet) || - // corporation.PlanetSurveyFloor[_targetPlanet] + .5f < _scanningTool.MinimumDensity) - // { - // var planetData = _context.ItemData.Get(_targetPlanet); - // MoveTo(() => - // { - // var target = GetPosition(planetData, _asteroid); - // var targetToUs = _entity.Position - target; - // return target + normalize(targetToUs) * _scanningTool.Range / 2; - // }, - // () => GetVelocity(planetData, _asteroid), - // () => _entity.SetMessage("Arrived at target. Scanning for resources.")); - // _taskStarted = true; - // } - // else - // surveyTask.Planets.Remove(_targetPlanet); - // } - // else - // { - // _entity.SetMessage("Survey complete. Returning Home."); - // FinishTask(); - // } - // } - // else - // { - // if (!Moving) - // { - // var planetData = _context.ItemData.Get(_targetPlanet); - // if ((!corporation.PlanetSurveyFloor.ContainsKey(_targetPlanet) || - // corporation.PlanetSurveyFloor[_targetPlanet] + .5f < _scanningTool.MinimumDensity) && - // length(_entity.Position - GetPosition(planetData, _asteroid)) < _scanningTool.Range) - // { - // _toolSwitch.Activated = true; - // Aim.Objective = GetPosition(planetData, _asteroid); - // Aim.Update(delta); - // } - // else - // { - // _toolSwitch.Activated = false; - // _taskStarted = false; - // } - // } - // } - // } - return base.Execute(delta); - } - - private void NextPlanet() - { - var planets = Task.Planets.Select(id => Zone.Planets[id]); - var nearestPlanet = planets.MinBy(p => lengthsq(Entity.Position.xz - GetPosition(p))); - _asteroid = nearestPlanet is AsteroidBeltData ? Zone.NearestAsteroid(nearestPlanet.ID, Entity.Position.xz) : -1; - _targetPlanet = nearestPlanet.ID; - } - - private float2 GetPosition(BodyData planet, int asteroid = -1) - { - if (planet is AsteroidBeltData) - { - if(asteroid == -1) asteroid = Zone.NearestAsteroid(planet.ID, Entity.Position.xz); - return Zone.AsteroidBelts[planet.ID].Positions[asteroid].xz; - } - return Zone.GetOrbitPosition(planet.Orbit); - } - - private float2 GetVelocity(BodyData planet, int asteroid = -1) - { - if (planet is AsteroidBeltData) - { - if(asteroid == -1) asteroid = Zone.NearestAsteroid(planet.ID, Entity.Position.xz); - return Zone.AsteroidBelts[planet.ID].Velocities[asteroid]; - } - return Zone.GetOrbitVelocity(planet.Orbit); - } - - public PersistentBehaviorData Store() - { - return new SurveyControllerPersistence - { - Task = Task - }; - } - - public void Restore(PersistentBehaviorData data) - { - var surveyControllerPersistence = data as SurveyControllerPersistence; - Task = surveyControllerPersistence.Task; - } -} - -public class SurveyControllerPersistence : PersistentBehaviorData -{ - [JsonProperty("task"), Key(0)] - public Survey Task; -} \ No newline at end of file +// [MessagePackObject, JsonObject(MemberSerialization.OptIn), EntityTypeRestriction(HullType.Ship), Order(-100)] +// public class SurveyControllerData : ControllerData +// { +// public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item) +// { +// return new SurveyController(context, this, entity, item); +// } +// } +// +// public class SurveyController : ControllerBase, IBehavior, IPersistentBehavior, IInitializableBehavior +// { +// private EquippedItem Item { get; } +// +// private SurveyControllerData _data; +// private bool _taskStarted; +// private ResourceScanner _scanningTool; +// private Switch _toolSwitch; +// private Guid _targetPlanet; +// private int _asteroid = -1; +// +// public SurveyController(ItemManager itemManager, SurveyControllerData data, Entity entity, EquippedItem item) : base(itemManager, data, entity) +// { +// _data = data; +// Item = item; +// } +// +// public new void Initialize() +// { +// _scanningTool = Entity.GetBehavior(); +// // _toolSwitch = Entity.GetSwitch(); +// base.Initialize(); +// } +// +// public new bool Execute(float delta) +// { +// // var corporation = _context.ItemData.Get(_entity.Corporation); +// // if (surveyTask != null) +// // { +// // if (!_taskStarted) +// // { +// // if (surveyTask.Planets.Any()) +// // { +// // _entity.SetMessage("Moving to survey target."); +// // NextPlanet(); +// // _scanningTool.ScanTarget = _targetPlanet; +// // _scanningTool.Asteroid = _asteroid; +// // if (!corporation.PlanetSurveyFloor.ContainsKey(_targetPlanet) || +// // corporation.PlanetSurveyFloor[_targetPlanet] + .5f < _scanningTool.MinimumDensity) +// // { +// // var planetData = _context.ItemData.Get(_targetPlanet); +// // MoveTo(() => +// // { +// // var target = GetPosition(planetData, _asteroid); +// // var targetToUs = _entity.Position - target; +// // return target + normalize(targetToUs) * _scanningTool.Range / 2; +// // }, +// // () => GetVelocity(planetData, _asteroid), +// // () => _entity.SetMessage("Arrived at target. Scanning for resources.")); +// // _taskStarted = true; +// // } +// // else +// // surveyTask.Planets.Remove(_targetPlanet); +// // } +// // else +// // { +// // _entity.SetMessage("Survey complete. Returning Home."); +// // FinishTask(); +// // } +// // } +// // else +// // { +// // if (!Moving) +// // { +// // var planetData = _context.ItemData.Get(_targetPlanet); +// // if ((!corporation.PlanetSurveyFloor.ContainsKey(_targetPlanet) || +// // corporation.PlanetSurveyFloor[_targetPlanet] + .5f < _scanningTool.MinimumDensity) && +// // length(_entity.Position - GetPosition(planetData, _asteroid)) < _scanningTool.Range) +// // { +// // _toolSwitch.Activated = true; +// // Aim.Objective = GetPosition(planetData, _asteroid); +// // Aim.Update(delta); +// // } +// // else +// // { +// // _toolSwitch.Activated = false; +// // _taskStarted = false; +// // } +// // } +// // } +// // } +// return base.Execute(delta); +// } +// +// private void NextPlanet() +// { +// var planets = Task.Planets.Select(id => Zone.Planets[id]); +// var nearestPlanet = planets.MinBy(p => lengthsq(Entity.Position.xz - GetPosition(p))); +// _asteroid = nearestPlanet is AsteroidBeltData ? Zone.NearestAsteroid(nearestPlanet.ID, Entity.Position.xz) : -1; +// _targetPlanet = nearestPlanet.ID; +// } +// +// private float2 GetPosition(BodyData planet, int asteroid = -1) +// { +// if (planet is AsteroidBeltData) +// { +// if(asteroid == -1) asteroid = Zone.NearestAsteroid(planet.ID, Entity.Position.xz); +// return Zone.AsteroidBelts[planet.ID].Positions[asteroid].xz; +// } +// return Zone.GetOrbitPosition(planet.Orbit); +// } +// +// private float2 GetVelocity(BodyData planet, int asteroid = -1) +// { +// if (planet is AsteroidBeltData) +// { +// if(asteroid == -1) asteroid = Zone.NearestAsteroid(planet.ID, Entity.Position.xz); +// return Zone.AsteroidBelts[planet.ID].Velocities[asteroid]; +// } +// return Zone.GetOrbitVelocity(planet.Orbit); +// } +// +// public PersistentBehaviorData Store() +// { +// return new SurveyControllerPersistence +// { +// Task = Task +// }; +// } +// +// public void Restore(PersistentBehaviorData data) +// { +// var surveyControllerPersistence = data as SurveyControllerPersistence; +// Task = surveyControllerPersistence.Task; +// } +// } +// +// public class SurveyControllerPersistence : PersistentBehaviorData +// { +// [JsonProperty("task"), Key(0)] +// public Survey Task; +// } \ No newline at end of file diff --git a/Assets/Scripts/ServerShared/Behaviors/TowingController.cs b/Assets/Scripts/ServerShared/Behaviors/TowingController.cs index 9e8ea7cf1..beeae5baa 100644 --- a/Assets/Scripts/ServerShared/Behaviors/TowingController.cs +++ b/Assets/Scripts/ServerShared/Behaviors/TowingController.cs @@ -11,94 +11,94 @@ using Newtonsoft.Json; using Unity.Mathematics; using static Unity.Mathematics.math; -[MessagePackObject, JsonObject(MemberSerialization.OptIn), EntityTypeRestriction(HullType.Ship), Order(-100)] -public class TowingControllerData : ControllerData -{ - public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item) - { - return new TowingController(context, this, entity, item); - } -} - -public class TowingController : ControllerBase, IBehavior, IPersistentBehavior -{ - - private TowingControllerData _data; - private EquippedItem Item { get; } - private bool _taskStarted; - - public TowingController(ItemManager itemManager, TowingControllerData data, Entity entity, EquippedItem item) : base(itemManager, data, entity) - { - _data = data; - Item = item; - } - - public new bool Execute(float delta) - { - if (Task != null) - { - if (!_taskStarted) - { - MoveTo(Task.Station, true, OnPickup); - _taskStarted = true; - } - } - return base.Execute(delta); - } - - // void OnZoneArrival() - // { - // var towingTask = _context.ItemData.Get(Task); - // - // _entity.SetMessage("Entering pickup phase."); - // - // MoveTo(_context.ItemData.Get(towingTask.Station), true, OnPickup); - // } - - void OnPickup() - { - Task.Station.SetParent(Entity); - - Entity.SetMessage("Entering delivery phase."); - - MoveTo(() => - { - var orbitParent = Zone.GetOrbitPosition(Task.OrbitParent); - var parentToUs = Entity.Position.xz - orbitParent; - return orbitParent + normalize(parentToUs) * Task.OrbitDistance; - }, () => Zone.GetOrbitVelocity(Task.OrbitParent), OnDelivery); - } - - void OnDelivery() - { - Task.Station.RemoveParent(); - - Entity.SetMessage("Target delivered. Returning Home."); - - var orbit = Zone.CreateOrbit(Task.OrbitParent, Entity.Position.xz); - Task.Station.OrbitData = orbit.ID; - - FinishTask(); - _taskStarted = false; - } - - public PersistentBehaviorData Store() - { - return new TowingControllerPersistence - { - Task = Task - }; - } - - public void Restore(PersistentBehaviorData data) - { - var towingControllerPersistence = data as TowingControllerPersistence; - Task = towingControllerPersistence.Task; - } -} - -public class TowingControllerPersistence : PersistentBehaviorData -{ - [JsonProperty("task"), Key(0)] - public StationTowing Task; -} \ No newline at end of file +// [MessagePackObject, JsonObject(MemberSerialization.OptIn), EntityTypeRestriction(HullType.Ship), Order(-100)] +// public class TowingControllerData : ControllerData +// { +// public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item) +// { +// return new TowingController(context, this, entity, item); +// } +// } +// +// public class TowingController : ControllerBase, IBehavior, IPersistentBehavior +// { +// +// private TowingControllerData _data; +// private EquippedItem Item { get; } +// private bool _taskStarted; +// +// public TowingController(ItemManager itemManager, TowingControllerData data, Entity entity, EquippedItem item) : base(itemManager, data, entity) +// { +// _data = data; +// Item = item; +// } +// +// public new bool Execute(float delta) +// { +// if (Task != null) +// { +// if (!_taskStarted) +// { +// MoveTo(Task.Station, true, OnPickup); +// _taskStarted = true; +// } +// } +// return base.Execute(delta); +// } +// +// // void OnZoneArrival() +// // { +// // var towingTask = _context.ItemData.Get(Task); +// // +// // _entity.SetMessage("Entering pickup phase."); +// // +// // MoveTo(_context.ItemData.Get(towingTask.Station), true, OnPickup); +// // } +// +// void OnPickup() +// { +// Task.Station.SetParent(Entity); +// +// Entity.SetMessage("Entering delivery phase."); +// +// MoveTo(() => +// { +// var orbitParent = Zone.GetOrbitPosition(Task.OrbitParent); +// var parentToUs = Entity.Position.xz - orbitParent; +// return orbitParent + normalize(parentToUs) * Task.OrbitDistance; +// }, () => Zone.GetOrbitVelocity(Task.OrbitParent), OnDelivery); +// } +// +// void OnDelivery() +// { +// Task.Station.RemoveParent(); +// +// Entity.SetMessage("Target delivered. Returning Home."); +// +// var orbit = Zone.CreateOrbit(Task.OrbitParent, Entity.Position.xz); +// Task.Station.OrbitData = orbit.ID; +// +// FinishTask(); +// _taskStarted = false; +// } +// +// public PersistentBehaviorData Store() +// { +// return new TowingControllerPersistence +// { +// Task = Task +// }; +// } +// +// public void Restore(PersistentBehaviorData data) +// { +// var towingControllerPersistence = data as TowingControllerPersistence; +// Task = towingControllerPersistence.Task; +// } +// } +// +// public class TowingControllerPersistence : PersistentBehaviorData +// { +// [JsonProperty("task"), Key(0)] +// public StationTowing Task; +// } \ No newline at end of file diff --git a/Assets/Scripts/ServerShared/Behaviors/TurretController.cs b/Assets/Scripts/ServerShared/Behaviors/TurretController.cs index e1c91d353..187dc6b4c 100644 --- a/Assets/Scripts/ServerShared/Behaviors/TurretController.cs +++ b/Assets/Scripts/ServerShared/Behaviors/TurretController.cs @@ -105,7 +105,7 @@ public class TurretController : IBehavior } else { - EquippedEntity.Target.Value = EquippedEntity.Zone.Entities.FirstOrDefault(e => e is Ship); + EquippedEntity.Target.Value = EquippedEntity.VisibleHostiles.FirstOrDefault(e => e is Ship); } return true; } diff --git a/Assets/Scripts/ServerShared/Behaviors/WanderController.cs b/Assets/Scripts/ServerShared/Behaviors/WanderController.cs index 0c7c95299..78bd9ef82 100644 --- a/Assets/Scripts/ServerShared/Behaviors/WanderController.cs +++ b/Assets/Scripts/ServerShared/Behaviors/WanderController.cs @@ -12,67 +12,67 @@ using RethinkDb.Driver.Ast; using Unity.Mathematics; using static Unity.Mathematics.math; -[MessagePackObject, JsonObject(MemberSerialization.OptIn), EntityTypeRestriction(HullType.Ship), Order(-100)] -public class WanderControllerData : ControllerData -{ - [InspectableField, JsonProperty("randomDockTime"), Key(6)] - public float RandomDockTime = 5; - - public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item) - { - return new WanderController(context, this, entity, item); - } -} - -public class WanderController : ControllerBase, IBehavior -{ - public WanderTarget WanderTarget; - - private WanderControllerData _data; - private EquippedItem Item { get; } - private Guid _target; - private float _dockTime = -1; - - public WanderController(ItemManager itemManager, WanderControllerData data, Entity entity, EquippedItem item) : base(itemManager, data, entity) - { - _data = data; - Item = item; - } - - public new bool Execute(float delta) - { - if (!Moving && _dockTime < 0) - { - NextTarget(); - } - - _dockTime -= delta; - return base.Execute(delta); - } - - private void NextTarget() - { - if (WanderTarget == WanderTarget.Planets) - { - var planets = Zone.Planets.Values.ToArray(); - var randomPlanet = planets[ItemManager.Random.NextInt(planets.Length)]; - MoveTo(() => Zone.GetOrbitPosition(randomPlanet.Orbit), () => Zone.GetOrbitVelocity(randomPlanet.Orbit)); - } - else if (WanderTarget == WanderTarget.Orbitals) - { - var entities = Zone.Entities.Where(e=>e is OrbitalEntity).ToArray(); - var randomEntity = entities[ItemManager.Random.NextInt(entities.Length)]; - MoveTo(randomEntity, true, () => - { - Entity.SetParent(randomEntity); - _dockTime = ItemManager.Random.NextFloat(_data.RandomDockTime); - }); - } - } -} - -public enum WanderTarget -{ - Planets, - Orbitals -} \ No newline at end of file +// [MessagePackObject, JsonObject(MemberSerialization.OptIn), EntityTypeRestriction(HullType.Ship), Order(-100)] +// public class WanderControllerData : ControllerData +// { +// [InspectableField, JsonProperty("randomDockTime"), Key(6)] +// public float RandomDockTime = 5; +// +// public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item) +// { +// return new WanderController(context, this, entity, item); +// } +// } +// +// public class WanderController : ControllerBase, IBehavior +// { +// public WanderTarget WanderTarget; +// +// private WanderControllerData _data; +// private EquippedItem Item { get; } +// private Guid _target; +// private float _dockTime = -1; +// +// public WanderController(ItemManager itemManager, WanderControllerData data, Entity entity, EquippedItem item) : base(itemManager, data, entity) +// { +// _data = data; +// Item = item; +// } +// +// public new bool Execute(float delta) +// { +// if (!Moving && _dockTime < 0) +// { +// NextTarget(); +// } +// +// _dockTime -= delta; +// return base.Execute(delta); +// } +// +// private void NextTarget() +// { +// if (WanderTarget == WanderTarget.Planets) +// { +// var planets = Zone.Planets.Values.ToArray(); +// var randomPlanet = planets[ItemManager.Random.NextInt(planets.Length)]; +// MoveTo(() => Zone.GetOrbitPosition(randomPlanet.Orbit), () => Zone.GetOrbitVelocity(randomPlanet.Orbit)); +// } +// else if (WanderTarget == WanderTarget.Orbitals) +// { +// var entities = Zone.Entities.Where(e=>e is OrbitalEntity).ToArray(); +// var randomEntity = entities[ItemManager.Random.NextInt(entities.Length)]; +// MoveTo(randomEntity, true, () => +// { +// Entity.SetParent(randomEntity); +// _dockTime = ItemManager.Random.NextFloat(_data.RandomDockTime); +// }); +// } +// } +// } +// +// public enum WanderTarget +// { +// Planets, +// Orbitals +// } \ No newline at end of file diff --git a/Assets/Scripts/ServerShared/Behaviors/Weapon.cs b/Assets/Scripts/ServerShared/Behaviors/Weapon.cs index b6c699eeb..16ca8e21d 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Weapon.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Weapon.cs @@ -73,6 +73,8 @@ public abstract class Weapon : IActivatedBehavior public EquippedItem Item { get; } public ItemManager Context { get; } + public abstract float DamagePerSecond { get; } + public abstract float RangeDamagePerSecond(float range); public abstract int Ammo { get; } public WeaponData WeaponData => _data; public BehaviorData Data => _data; diff --git a/Assets/Scripts/ServerShared/Entity.cs b/Assets/Scripts/ServerShared/Entity.cs index 31175b19f..d775da861 100644 --- a/Assets/Scripts/ServerShared/Entity.cs +++ b/Assets/Scripts/ServerShared/Entity.cs @@ -37,6 +37,8 @@ public abstract class Entity public readonly ReactiveCollection Equipment = new ReactiveCollection(); public readonly ReactiveCollection CargoBays = new ReactiveCollection(); public readonly ReactiveCollection DockingBays = new ReactiveCollection(); + public readonly ReactiveCollection VisibleEntities = new ReactiveCollection(); + public readonly ReactiveCollection VisibleHostiles = new ReactiveCollection(); public Entity Parent; public List Children = new List(); @@ -51,11 +53,11 @@ public abstract class Entity public readonly Dictionary Messages = new Dictionary(); public readonly Dictionary VisibilitySources = new Dictionary(); - public readonly Dictionary EntityInfoGathered = new Dictionary(); + public readonly ReactiveDictionary EntityInfoGathered = new ReactiveDictionary(); public readonly Dictionary HardpointTransforms = new Dictionary(); - public readonly (List behaviors, List items)[] TriggerGroups; + public readonly (List weapons, List items)[] TriggerGroups; public List PopulationAssignments = new List(); @@ -66,20 +68,20 @@ public abstract class Entity private EquippedItem[] _orderedEquipment; private List _weapons = new List(); - private List _weaponsInRange = new List(); protected bool _active; public IEnumerable Weapons { get => _weapons; } - public IEnumerable WeaponsInRange - { - get => _weaponsInRange; - } + public float TargetRange { get; private set; } public float MaxTemp { get; private set; } public float MinTemp { get; private set; } + public bool ShieldEnabled // TODO: MAKE SHIELDS + { + get => true; + } public ItemManager ItemManager { get; } public int AssignedPopulation => PopulationAssignments.Sum(pa => pa.AssignedPopulation); public float Mass { get; private set; } @@ -88,31 +90,48 @@ public abstract class Entity public Subject<(int2 pos, float damage)> ArmorDamage = new Subject<(int2, float)>(); public Subject<(EquippedItem item, float damage)> ItemDamage = new Subject<(EquippedItem, float)>(); public Subject HullDamage = new Subject(); + public Subject Docked = new Subject(); public UniRx.IObservable ItemDestroyed; public UniRx.IObservable HullArmorDepleted; public UniRx.IObservable HardpointArmorDepleted; + public UniRx.IObservable WeaponDestroyed; - public bool Active + private List _subscriptions = new List(); + + public virtual void Activate() { - get => _active; - set + _active = true; + foreach (var item in Equipment) + foreach (var behavior in item.Behaviors) { - _active = value; - if (_active) - { - foreach (var item in Equipment) - foreach (var behavior in item.Behaviors) - { - if(behavior is IInitializableBehavior initializableBehavior) - initializableBehavior.Initialize(); - } - OnActivate(); - } + if(behavior is IInitializableBehavior initializableBehavior) + initializableBehavior.Initialize(); } + //foreach(var entity in Zone.Entities) EntityInfoGathered.Add(entity, 0); + _subscriptions.Add(Zone.Entities.ObserveRemove().Subscribe(remove => + { + if (Target.Value == remove.Value) Target.Value = null; + EntityInfoGathered.Remove(remove.Value); + VisibleEntities.Remove(remove.Value); + VisibleHostiles.Remove(remove.Value); + })); + _subscriptions.Add(VisibleEntities.ObserveRemove().Subscribe(remove => + { + if (Target.Value == remove.Value) Target.Value = null; + })); + GenerateTriggerGroups(); } - protected virtual void OnActivate(){} + public virtual void Deactivate() + { + foreach(var s in _subscriptions) s.Dispose(); + _subscriptions.Clear(); + _active = false; + EntityInfoGathered.Clear(); + VisibleEntities.Clear(); + VisibleHostiles.Clear(); + } public Entity(ItemManager itemManager, Zone zone, EquippableItem hull) { @@ -121,12 +140,42 @@ public abstract class Entity Hull = hull; Name = hull.Name; MapEntity(); - TriggerGroups = new (List triggers, List items)[itemManager.GameplaySettings.TriggerGroupCount]; + TriggerGroups = new (List triggers, List items)[itemManager.GameplaySettings.TriggerGroupCount]; for(int i=0; i(), new List()); + TriggerGroups[i] = (new List(), new List()); ItemDestroyed = ItemDamage.Where(x => x.item.EquippableItem.Durability < .01f).Select(x=>x.item); + WeaponDestroyed = ItemDestroyed.Select(x => x.Behaviors.FirstOrDefault(b => b is Weapon) as Weapon).Where(x => x != null); HullArmorDepleted = ArmorDamage.Where(x => Armor[x.pos.x, x.pos.y] < .01f).Select(x => x.pos); + + EntityInfoGathered.ObserveReplace().Subscribe(replace => + { + if (replace.OldValue < ItemManager.GameplaySettings.TargetDetectionInfoThreshold && + replace.NewValue > ItemManager.GameplaySettings.TargetDetectionInfoThreshold) + { + VisibleEntities.Add(replace.Key); + if(IsHostileTo(replace.Key)) + VisibleHostiles.Add(replace.Key); + } + if (replace.OldValue > ItemManager.GameplaySettings.TargetDetectionInfoThreshold && + replace.NewValue < ItemManager.GameplaySettings.TargetDetectionInfoThreshold) + { + VisibleEntities.Remove(replace.Key); + if(IsHostileTo(replace.Key)) + VisibleHostiles.Add(replace.Key); + } + }); + EntityInfoGathered.ObserveRemove().Subscribe(remove => VisibleEntities.Remove(remove.Key)); + } + + public bool IsHostileTo(Entity other) + { + if (Faction == null) + { + return other.Faction != null; + } + + return Faction.PlayerHostile && other.Faction == null; } private void MapEntity() @@ -165,6 +214,17 @@ public abstract class Entity GearOccupancy = new EquippedItem[hullData.Shape.Width, hullData.Shape.Height]; } + public void GenerateTriggerGroups() + { + foreach (var group in Weapons + .GroupBy(w => w.Item.EquippableItem.Data) + .Select((weapons, index) => (weapons, index))) + { + TriggerGroups[group.index].weapons = group.weapons.ToList(); + TriggerGroups[group.index].items = group.weapons.Select(w=>w.Item).ToList(); + } + } + public void AddHeat(int2 position, float heat, bool ignoreThermalMass = false) { if (ignoreThermalMass) @@ -439,6 +499,8 @@ public abstract class Entity bay.DockedShip = ship; ship.SetParent(this); Zone.Entities.Remove(ship); + Deactivate(); + ship.Docked.OnNext(this); } return bay; @@ -459,6 +521,7 @@ public abstract class Entity bay.DockedShip = null; ship.RemoveParent(); Zone.Entities.Add(ship); + ship.Activate(); return true; } @@ -556,15 +619,8 @@ public abstract class Entity public virtual void Update(float delta) { var hullData = ItemManager.GetData(Hull) as HullData; - - _weaponsInRange.Clear(); - if (Target.Value != null) - { - var dist = length(Position - Target.Value.Position); - foreach (var w in _weapons) - if (w.MinRange < dist && dist < w.Range) - _weaponsInRange.Add(w); - } + + TargetRange = Target.Value == null ? -1 : length(Position - Target.Value.Position); foreach (var v in VisibilitySources.Keys.ToArray()) { @@ -572,6 +628,37 @@ public abstract class Entity if (VisibilitySources[v] < 0.01f) VisibilitySources.Remove(v); } + + UpdateTemperature(delta); + + if (_active) + { + foreach (var equippedItem in _orderedEquipment) + { + equippedItem.Update(delta); + } + + foreach (var message in Messages.Keys.ToArray()) + { + Messages[message] = Messages[message] - delta; + if (Messages[message] < 0) + Messages.Remove(message); + } + } + foreach(var child in Children) + child.Update(delta); + + if (Parent != null) + { + Position = Parent.Position; + Velocity = Parent.Velocity; + } + else Position.y = Zone.GetHeight(Position.xz) + hullData.GridOffset; + } + + private void UpdateTemperature(float delta) + { + var hullData = ItemManager.GetData(Hull) as HullData; MaxTemp = Single.MinValue; MinTemp = Single.MaxValue; @@ -657,65 +744,12 @@ public abstract class Entity var swap = Temperature; Temperature = NewTemperature; NewTemperature = swap; - - if (Active) - { - foreach (var equippedItem in _orderedEquipment) - { - equippedItem.Update(delta); - } - - foreach (var message in Messages.Keys.ToArray()) - { - Messages[message] = Messages[message] - delta; - if (Messages[message] < 0) - Messages.Remove(message); - } - } - foreach(var child in Children) - child.Update(delta); - - if (Parent != null) - { - Position = Parent.Position; - Velocity = Parent.Velocity; - } - else Position.y = Zone.GetHeight(Position.xz) + hullData.GridOffset; } public void SetMessage(string message) { Messages[message] = ItemManager.GameplaySettings.MessageDuration; } - - // public void OnBeforeSerialize() - // { - // // Filter item behavior collections by those with any persistent behaviors - // // For each item create an object containing the item ID and a list of persistent behaviors - // // Then turn that into a dictionary mapping from item ID to an array of every behaviors persistent data - // PersistedBehaviors = EquippedItems - // .Where(item => item.Behaviors.Any(b=>b is IPersistentBehavior)) - // .Select(item => new {equippable=item, behaviors = item.Behaviors - // .Where(b=>b is IPersistentBehavior) - // .Cast()}) - // .ToDictionary(x=> x.equippable.Position, x=>x.behaviors.Select(b => b.Store()).ToArray()); - // } - // - // public void OnAfterDeserialize() - // { - // foreach(var item in EquippedItems) - // Hydrate(item); - // - // // Iterate only over the behaviors of items which contain persistent data - // // Filter the behaviors for each item to get the persistent ones, then cast them and combine with the persisted data array for that item - // foreach (var persistentBehaviorData in EquippedItems - // .Where(item => PersistedBehaviors.ContainsKey(item.Position)) - // .SelectMany(item => item.Behaviors - // .Where(b=> b is IPersistentBehavior) - // .Cast() - // .Zip(PersistedBehaviors[item.Position], (behavior, data) => new{behavior, data}))) - // persistentBehaviorData.behavior.Restore(persistentBehaviorData.data); - // } } public class EquippedItem @@ -727,6 +761,9 @@ public class EquippedItem public IBehavior[] Behaviors; public Dictionary BehaviorGroups; + + public event Action OnDisable; + public event Action OnEnable; public float Conductivity { get; } @@ -734,7 +771,10 @@ public class EquippedItem public int SortPosition; - public bool Online => EquippableItem.Durability > .01f && Temperature > _data.MinimumTemperature && Temperature < _data.MaximumTemperature; + public bool Online + { + get => _online; + } public float Temperature { @@ -749,6 +789,7 @@ public class EquippedItem protected readonly ItemManager _itemManager; private readonly EquippableItemData _data; private Entity _entity; + private bool _online; public EquippedItem(ItemManager itemManager, EquippableItem item, int2 position, Entity entity) { @@ -792,16 +833,22 @@ public class EquippedItem public void Update(float delta) { - if (Temperature < _data.MinimumTemperature || Temperature > _data.MaximumTemperature) { + _entity.ItemDamage.OnNext((this, delta)); EquippableItem.Durability -= delta; } - foreach (var behavior in Behaviors)//.Where(b => b is IAlwaysUpdatedBehavior).Cast()) + foreach (var behavior in Behaviors) if(behavior is IAlwaysUpdatedBehavior alwaysUpdatedBehavior) alwaysUpdatedBehavior.Update(delta); - if (Online) + var previouslyOnline = _online; + _online = EquippableItem.Durability > .01f && Temperature > _data.MinimumTemperature && Temperature < _data.MaximumTemperature; + + if (!previouslyOnline && _online) OnEnable?.Invoke(); + if (previouslyOnline && !_online) OnDisable?.Invoke(); + + if (_online) { foreach (var group in BehaviorGroups.Values) { diff --git a/Assets/Scripts/ServerShared/EntitySerializer.cs b/Assets/Scripts/ServerShared/EntitySerializer.cs index faec15760..f817aca75 100644 --- a/Assets/Scripts/ServerShared/EntitySerializer.cs +++ b/Assets/Scripts/ServerShared/EntitySerializer.cs @@ -114,12 +114,14 @@ public class EntityPack } for (var bayIndex = 0; bayIndex < pack.CargoContents.Length; bayIndex++) - foreach (var (position, item) in pack.CargoContents[bayIndex]) - entity.CargoBays[bayIndex].TryStore(instantiate ? itemManager.Instantiate(item) : item, position); + if(entity.CargoBays.Count >= bayIndex + 1) + foreach (var (position, item) in pack.CargoContents[bayIndex]) + entity.CargoBays[bayIndex].TryStore(instantiate ? itemManager.Instantiate(item) : item, position); for (var bayIndex = 0; bayIndex < pack.DockingBayContents.Length; bayIndex++) - foreach (var (position, item) in pack.DockingBayContents[bayIndex]) - entity.DockingBays[bayIndex].TryStore(instantiate ? itemManager.Instantiate(item) : item, position); + if(entity.DockingBays.Count >= bayIndex + 1) + foreach (var (position, item) in pack.DockingBayContents[bayIndex]) + entity.DockingBays[bayIndex].TryStore(instantiate ? itemManager.Instantiate(item) : item, position); // Iterate only over the behaviors of items which contain persistent data // Filter the behaviors for each item to get the persistent ones, then cast them and combine with the persisted data array for that item diff --git a/Assets/Scripts/ServerShared/Extensions.cs b/Assets/Scripts/ServerShared/Extensions.cs index 09ba7bcab..141986414 100644 --- a/Assets/Scripts/ServerShared/Extensions.cs +++ b/Assets/Scripts/ServerShared/Extensions.cs @@ -289,14 +289,10 @@ public static class Extensions return t * (t * (a * t + b) + c) + d; } - public static float AngleDiff(this float2 a, float2 b) + public static float Angle(this float2 from, float2 to) { - var directionAngle = atan2(b.y, b.x); - var currentAngle = atan2(a.y, a.x); - var d1 = directionAngle - currentAngle; - var d2 = directionAngle - 2 * PI - currentAngle; - var d3 = directionAngle + 2 * PI - currentAngle; - return abs(d1) < abs(d2) ? abs(d1) < abs(d3) ? d1 : d3 : abs(d2) < abs(d3) ? d2 : d3; + var num = sqrt(lengthsq(from) * lengthsq(to)); + return num < 1.00000000362749E-15 ? 0.0f : acos(clamp(dot(from, to) / num, -1f, 1f)) * 57.29578f; } // https://stackoverflow.com/a/3188835 diff --git a/Assets/Scripts/ServerShared/Noise1D.cs b/Assets/Scripts/ServerShared/Noise1D.cs index 93ffdaa4e..15d30ab76 100644 --- a/Assets/Scripts/ServerShared/Noise1D.cs +++ b/Assets/Scripts/ServerShared/Noise1D.cs @@ -1,10 +1,4 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Unity.Mathematics; +using Unity.Mathematics; using static Unity.Mathematics.math; public static class Noise1D diff --git a/Assets/Scripts/ServerShared/Settings.cs b/Assets/Scripts/ServerShared/Settings.cs index 97315826e..a8e9fb7c8 100644 --- a/Assets/Scripts/ServerShared/Settings.cs +++ b/Assets/Scripts/ServerShared/Settings.cs @@ -116,4 +116,8 @@ public class GameplaySettings public float TargetArmorInfoThreshold; public float TargetGearInfoThreshold; public float ConvergenceMinimumDistance; + public float AgentRangeExponent = .25f; + public float AgentForwardLerp = .5f; + public float AgentMaxForwardDistance = 50; + public float AgentFiringMinDot = .99f; } \ No newline at end of file diff --git a/Assets/Scripts/ServerShared/Ship.cs b/Assets/Scripts/ServerShared/Ship.cs index 09eb37e37..77c34f3f8 100644 --- a/Assets/Scripts/ServerShared/Ship.cs +++ b/Assets/Scripts/ServerShared/Ship.cs @@ -40,11 +40,20 @@ public class Ship : Entity public float RightStrafeThrust { get; private set; } public float ClockwiseTorque { get; private set; } public float CounterClockwiseTorque { get; private set; } + + public float TurnTime(float2 direction) + { + var angleDiff = Direction.Angle(normalize(direction)); + var clockwise = dot(direction, Direction.Rotate(ItemRotation.Clockwise)) > 0; + return angleDiff / ((clockwise ? ClockwiseTorque : CounterClockwiseTorque) / Mass); + } public quaternion Rotation { get; private set; } - protected override void OnActivate() + public override void Activate() { + base.Activate(); + _allThrusters = GetBehaviors().ToArray(); _forwardThrusters = new HashSet(_allThrusters diff --git a/Assets/Scripts/UI/InventoryPanel.cs b/Assets/Scripts/UI/InventoryPanel.cs index aa6e39bd9..5657f112b 100644 --- a/Assets/Scripts/UI/InventoryPanel.cs +++ b/Assets/Scripts/UI/InventoryPanel.cs @@ -327,7 +327,7 @@ public class InventoryPanel : MonoBehaviour { var rect = cell.GetComponent(); var point = Rect.PointToNormalized(rect.rect, rect.InverseTransformPoint(data.position)); - Debug.Log($"Clicked at pos {data.position}, normalized {point}"); +// Debug.Log($"Clicked at pos {data.position}, normalized {point}"); if (hullData.Shape[int2(v.x - 1, v.y)] && point.x < ThermalToggleRegionSize) { entity.HullConductivity[v.x - 1, v.y].x = !entity.HullConductivity[v.x - 1, v.y].x; diff --git a/Assets/Shaders/Compute/Stardust/Stardust.shader b/Assets/Shaders/Compute/Stardust/Stardust.shader index 5f9514e58..28699295f 100644 --- a/Assets/Shaders/Compute/Stardust/Stardust.shader +++ b/Assets/Shaders/Compute/Stardust/Stardust.shader @@ -7,8 +7,8 @@ } SubShader { + Tags { "Queue"="AlphaTest" "RenderType"="TransparentCutout" "IgnoreProjector"="True" } Pass { - Tags { "RenderType"="Opaque" } CGPROGRAM #pragma vertex particle_vertex diff --git a/Assets/Shaders/DitheredParticles.shader b/Assets/Shaders/DitheredParticles.shader index 07d921a78..d7e2f97b3 100644 --- a/Assets/Shaders/DitheredParticles.shader +++ b/Assets/Shaders/DitheredParticles.shader @@ -15,6 +15,7 @@ Shader "Aetheria/Dithered Particles" { Tags { "RenderType"="Opaque" } LOD 200 + Cull Off CGPROGRAM #include "Dither Functions.cginc" diff --git a/Assets/Shaders/GlowFade.shader b/Assets/Shaders/GlowFade.shader new file mode 100644 index 000000000..7a804521a --- /dev/null +++ b/Assets/Shaders/GlowFade.shader @@ -0,0 +1,88 @@ +Shader "Aetheria/GlowFade" +{ + Properties + { + _Color ("Color", Color) = (1,1,1,1) + _MainTex ("Albedo (RGB)", 2D) = "white" {} + + _Fade ("Fade", Range(0.0, 1.0)) = 0.0 + _FadeSharpness ("Fade Sharpness", Float) = 1.0 + _FadeTex ("Fade Texture", 2D) = "white" {} + _FadeEdge ("Fade Edge", Range(0.0, 1.0)) = 1.0 + [HDR] _EdgeColor ("Edge Color", Color) = (1,1,1,1) + + _Glossiness("Smoothness", Range(0.0, 1.0)) = 1.0 + [Gamma] _Metallic("Metallic", Range(0.0, 1.0)) = 0.0 + _MetallicGlossMap("Metallic", 2D) = "white" {} + + _BumpMap("Normal Map", 2D) = "bump" {} + _BumpScale("Normal Scale", Float) = 1.0 + + _OcclusionStrength("Strength", Range(0.0, 1.0)) = 1.0 + _OcclusionMap("Occlusion", 2D) = "white" {} + } + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 200 + Cull Off + + CGPROGRAM + #include "Dither Functions.cginc" + // Physically based Standard lighting model, and enable shadows on all light types + #pragma surface surf Standard fullforwardshadows + + // Use shader model 3.0 target, to get nicer looking lighting + #pragma target 3.0 + + sampler2D _MainTex; + sampler2D _MetallicGlossMap; + sampler2D _OcclusionMap; + sampler2D _FadeTex; + sampler2D _BumpMap; + + struct Input + { + float2 uv_MainTex; + float2 uv_FadeTex; + float4 screenPos; + }; + + half _Fade; + half _FadeSharpness; + half _FadeEdge; + half _Glossiness; + half _Metallic; + half _BumpScale; + half _OcclusionStrength; + fixed4 _Color; + half3 _EdgeColor; + + // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. + // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. + // #pragma instancing_options assumeuniformscaling + UNITY_INSTANCING_BUFFER_START(Props) + // put more per-instance properties here + UNITY_INSTANCING_BUFFER_END(Props) + + void surf (Input IN, inout SurfaceOutputStandard o) + { + half f = tex2D (_FadeTex, IN.uv_FadeTex).r + (1-_Fade); + half3 e = _EdgeColor * smoothstep(1 - _FadeEdge, 1, f); + o.Emission = e; + // Apply screen space dithering + float2 screenUV = IN.screenPos.xy / IN.screenPos.w; + ditherClip(screenUV, _FadeSharpness - f * _FadeSharpness); + fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; + o.Albedo = c.rgb; + o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_MainTex)) * _BumpScale; + fixed4 m = tex2D (_MetallicGlossMap, IN.uv_MainTex); + o.Metallic = _Metallic * m.r; + o.Smoothness = _Glossiness * m.a; + fixed4 oc = tex2D (_OcclusionMap, IN.uv_MainTex); + o.Occlusion = oc.r * _OcclusionStrength; + } + ENDCG + } + FallBack "Diffuse" +} diff --git a/Assets/Shaders/GlowFade.shader.meta b/Assets/Shaders/GlowFade.shader.meta new file mode 100644 index 000000000..560ce6548 --- /dev/null +++ b/Assets/Shaders/GlowFade.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: ddff0b48b92c991499817d2a0f5d5059 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/Raymarching/VolumeRender.shader b/Assets/Shaders/Raymarching/VolumeRender.shader index dc7831b68..181adbdc4 100644 --- a/Assets/Shaders/Raymarching/VolumeRender.shader +++ b/Assets/Shaders/Raymarching/VolumeRender.shader @@ -34,6 +34,7 @@ uniform sampler2D _Patch; uniform sampler2D _Displacement; uniform sampler2D _TintTexture; + //uniform sampler3D _NoiseTex; #include "UnityCG.cginc" @@ -86,15 +87,15 @@ float tri(in float x){return abs(frac(x)-.5);} float3 tri3(in float3 p){return float3( tri(p.z+tri(p.y*1.)), tri(p.z+tri(p.x*1.)), tri(p.y+tri(p.x*1.)));} - float triNoise3d(in float3 p, in float spd) + float triNoise3d(in float3 p) { float z=1.4; float rz = 0.; float3 bp = p; for (float i=0.; i<=2.; i++ ) { - float3 dg = tri3(bp*2.); - p += (dg+_Time.y*spd); + float3 dg = tri3(bp * 2.); + p += dg + _Time.y * _NoiseSpeed; bp *= 1.8; z *= 1.5; @@ -118,8 +119,9 @@ { float patch = tex2Dlod(_Patch, half4(uv, 0, 0)).r; float displacement = tex2Dlod(_Displacement, half4(uv, 0, 0)).r; - - float noise = pow(triNoise3d(pos*_NoiseFrequency, _NoiseSpeed),2);// + triNoise3d(pos*_NoiseFrequency*2, _NoiseSpeed * 2) * .5; + + //float noise = tex3D(_NoiseTex, pos*_NoiseFrequency); + float noise = pow(triNoise3d(pos*_NoiseFrequency),2);// + triNoise3d(pos*_NoiseFrequency*2, _NoiseSpeed * 2) * .5; pos.y += noise * _NoiseStrength; float patchDensity = saturate((-abs(pos.y+displacement)+patch)/_GridPatchBlend)*_GridPatchDensity; float floorDist = -pos.y-(surface)+_GridFloorOffset; diff --git a/Assets/Shaders/Shield.shader b/Assets/Shaders/Shield.shader new file mode 100644 index 000000000..fe20284f2 --- /dev/null +++ b/Assets/Shaders/Shield.shader @@ -0,0 +1,133 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ + +Shader "Aetheria/Shield" +{ + Properties + { + [HDR]_Color ("Color", Color) = (1,1,1,1) + _Offset ("Offset", CUBE) = "gray" {} + _Albedo ("Albedo", CUBE) = "black" {} + _MainTex ("Albedo (RGB)", 2D) = "white" {} + _TextureGamma ("Texture Gamma", Float) = 2 + _AlbedoGamma ("Albedo Gamma", Float) = 2 + _Gradient ("Gradient", 2D) = "white" {} + _GradientMul ("Gradient Multiplier", Float) = 1 + _Impact ("Impact Direction", Vector) = (0,0,1) + _Radius ("Impact Radius", Float) = .1 + _Blend ("Impact Blend", Float) = 2 + _NoiseSpeed ("Noise Speed", Float) = 2 + _NoiseScale ("Noise Scale", Float) = .1 + _NoiseAmplitude ("Noise Amplitude", Float) = .1 + _OffsetSize ("Offset Scale", Float) = .1 + _Alpha ("Alpha", Float) = 1 + _DitherSampleOffset ("Dither Offset", Float) = 0 + } + SubShader + { + Tags { "RenderType"="Opaque" } + LOD 200 + Cull Off + + CGPROGRAM + #include "Dither Functions.cginc" + // Physically based Standard lighting model, and enable shadows on all light types + #pragma surface surf Standard vertex:vert + + // Use shader model 3.0 target, to get nicer looking lighting + #pragma target 3.0 + + sampler2D _MainTex; + sampler2D _Gradient; + samplerCUBE _Offset; + samplerCUBE _Albedo; + + struct appdata_particles { + float4 vertex : POSITION; + float3 normal : NORMAL; + float2 texcoord : TEXCOORD0; + }; + + struct Input { + float2 uv_MainTex; + float4 screenPos; + float3 objectPos; + }; + + float tri(in float x){return abs(frac(x)-.5);} + float3 tri3(in float3 p){return float3( tri(p.z+tri(p.y*1.)), tri(p.z+tri(p.x*1.)), tri(p.y+tri(p.x*1.)));} + + float triNoise3d(in float3 p, in float spd) + { + float z=1.4; + float rz = 0.; + float3 bp = p; + for (float i=0.; i<=2.; i++ ) + { + float3 dg = tri3(bp*2.); + p += (dg+_Time.y*spd); + + bp *= 1.8; + z *= 1.5; + p *= 1.2; + + rz+= (tri(p.z+tri(p.x+tri(p.y))))/z; + bp += 0.14; + } + return rz; + } + + void vert(inout appdata_particles v, out Input o) + { + UNITY_INITIALIZE_OUTPUT(Input,o); + o.uv_MainTex = v.texcoord.xy; + o.objectPos = v.vertex.xyz; + } + + fixed4 _Color; + float3 _Impact; + float _Radius; + float _Blend; + float _NoiseSpeed; + float _NoiseScale; + float _NoiseAmplitude; + float _OffsetSize; + float _TextureGamma; + float _AlbedoGamma; + float _Alpha; + float _DitherSampleOffset; + float _GradientMul; + + void surf (Input IN, inout SurfaceOutputStandard o) + { + // Albedo comes from a texture tinted by color + float a = pow(tex2D (_MainTex, IN.uv_MainTex).a, _TextureGamma);// * _Color * IN.color; + + float3 pos = normalize(IN.objectPos); + float noise = triNoise3d(pos*_NoiseScale, _NoiseSpeed) * _NoiseAmplitude; + float3 offset = normalize(texCUBElod(_Offset, float4(pos + noise, 0)).rgb - float3(.5,.5,.5)); + float albedo = pow(texCUBElod (_Albedo, float4(pos + offset * _OffsetSize, 0)).x, _AlbedoGamma); + + float dist = dot(pos,normalize(_Impact)); + a *= albedo; + float cl = a; + a *= _Alpha * smoothstep(1 - _Radius, 1 - _Radius * _Blend, dist); + + // Apply screen space dithering + float2 screenUV = IN.screenPos.xy / IN.screenPos.w; + ditherClip(screenUV + _DitherSampleOffset, a); + + fixed3 c = tex2D (_Gradient, cl*_GradientMul) * _Color; + + o.Emission = c.rgb; + + // Metallic and smoothness come from slider variables + o.Metallic = 0; + o.Smoothness = 0; + o.Alpha = 1; + } + ENDCG + } + FallBack "Diffuse" +} diff --git a/Assets/Shaders/Shield.shader.meta b/Assets/Shaders/Shield.shader.meta new file mode 100644 index 000000000..414723387 --- /dev/null +++ b/Assets/Shaders/Shield.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4a4576dc60336e049bde3717977bed90 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/ViewNormalEmissiveGlowFade.shader b/Assets/Shaders/ViewNormalEmissiveGlowFade.shader new file mode 100644 index 000000000..fdc1a3d8d --- /dev/null +++ b/Assets/Shaders/ViewNormalEmissiveGlowFade.shader @@ -0,0 +1,113 @@ +// Upgrade NOTE: upgraded instancing buffer 'Props' to new syntax. + +Shader "Aetheria/View Dependent Emissive Glow Fade" { + Properties { + _Color ("Color", Color) = (1,1,1,1) + _MainTex ("Albedo (RGB)", 2D) = "white" {} + _BumpMap ("Bumpmap", 2D) = "bump" {} + _BumpPower ("Bump Power", Range (0.01,5)) = 1 + _Rotation ("Normal Rotation", Float) = 0 + _Glossiness ("Smoothness", Range(0,1)) = 0.5 + _MetallicGlossMap("Metallic", 2D) = "white" {} + _EmissionColor ("Emission Color", Color) = (1,1,1,1) + _Emission ("Emission Strength", Float) = 0 + _EmissionFresnel ("Emission Fresnel", Float) = 1.0 + _EmissionRoughnessFresnelPower("Emission Roughness Fresnel Power", Float) = 1.0 + [MaterialToggle] _ReverseRim("ReverseRim", Float) = 0 + + _Fade ("Fade", Range(0.0, 1.0)) = 0.0 + _FadeSharpness ("Fade Sharpness", Float) = 1.0 + _FadeTex ("Fade Texture", 2D) = "white" {} + _FadeEdge ("Fade Edge", Range(0.0, 1.0)) = 1.0 + [HDR] _EdgeColor ("Edge Color", Color) = (1,1,1,1) + } + SubShader { + Tags { "RenderType"="Opaque" } + LOD 200 + + CGPROGRAM + #include "Dither Functions.cginc" + // Physically based Standard lighting model, and enable shadows on all light types + #pragma surface surf Standard fullforwardshadows + //#pragma multi_compile REVERSE_RIM_ON REVERSE_RIM_OFF + + // Use shader model 3.0 target, to get nicer looking lighting + #pragma target 3.0 + + sampler2D _MainTex; + sampler2D _BumpMap; + sampler2D _MetallicGlossMap; + sampler2D _FadeTex; + + struct Input { + float2 uv_MainTex; + float2 uv_BumpMap; + float2 uv_FadeTex; + float3 viewDir; + float3 worldNormal; + float4 screenPos; + INTERNAL_DATA + }; + + half _Glossiness; + half _Metallic; + fixed4 _Color; + fixed4 _EmissionColor; + float _BumpPower; + float _Rotation; + float _Emission; + float _EmissionFresnel; + float _EmissionRoughnessFresnelPower; + half _ReverseRim; + + half _Fade; + half _FadeSharpness; + half _FadeEdge; + half3 _EdgeColor; + + // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. + // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. + // #pragma instancing_options assumeuniformscaling + UNITY_INSTANCING_BUFFER_START(Props) + // put more per-instance properties here + UNITY_INSTANCING_BUFFER_END(Props) + + void surf (Input IN, inout SurfaceOutputStandard o) { + // Albedo comes from a texture tinted by color + half f = tex2D (_FadeTex, IN.uv_FadeTex).r + (1-_Fade); + half3 e = _EdgeColor * smoothstep(1 - _FadeEdge, 1, f); + o.Emission = e; + // Apply screen space dithering + float2 screenUV = IN.screenPos.xy / IN.screenPos.w; + ditherClip(screenUV, _FadeSharpness - f * _FadeSharpness); + + fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; + o.Albedo = c.rgb; + + float sinX = sin ( _Rotation ); + float cosX = cos ( _Rotation ); + float sinY = sin ( _Rotation ); + float2x2 rotationMatrix = float2x2( cosX, -sinX, sinY, cosX); + + fixed3 normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); + normal.xy = mul ( normal.xy, rotationMatrix); + normal.z = normal.z / _BumpPower; + normal = normalize(normal); + o.Normal = normal; + + // Metallic and smoothness come from a texture + float2 metalSmooth = tex2D (_MetallicGlossMap, IN.uv_MainTex).ra; + o.Metallic = metalSmooth.x; + o.Smoothness = metalSmooth.y * _Glossiness; + + half rim = saturate(dot (normalize(IN.viewDir), o.Normal)); + if(_ReverseRim > .5) + rim = 1 - rim; + o.Emission += _Emission * _EmissionColor * pow(rim,_EmissionFresnel / pow(metalSmooth.x, _EmissionRoughnessFresnelPower)); + + o.Alpha = c.a; + } + ENDCG + } + FallBack "Diffuse" +} diff --git a/Assets/Shaders/ViewNormalEmissiveGlowFade.shader.meta b/Assets/Shaders/ViewNormalEmissiveGlowFade.shader.meta new file mode 100644 index 000000000..9ec0c6047 --- /dev/null +++ b/Assets/Shaders/ViewNormalEmissiveGlowFade.shader.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: fe8c4273cecc4ade93ae54e087dff063 +timeCreated: 1613539338 \ No newline at end of file diff --git a/Assets/ShieldAnimation.cs b/Assets/ShieldAnimation.cs new file mode 100644 index 000000000..863facdc7 --- /dev/null +++ b/Assets/ShieldAnimation.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using Random = UnityEngine.Random; + +public class ShieldAnimation : MonoBehaviour +{ + public AnimationCurve Alpha; + public AnimationCurve Radius; + public AnimationCurve AlbedoGamma; + public AnimationCurve TextureGamma; + public AnimationCurve GradientMultiplier; + public float Duration; + + private float _lerp; + private Material _material; + + public Vector3 Direction + { + set { _material.SetVector("_Impact", value); } + } + + void OnEnable() + { + _material = GetComponent().material; + _material.SetFloat("_DitherSampleOffset", Random.value); + _lerp = 0; + } + + void Update() + { + _lerp += Time.deltaTime / Duration; + if(_lerp > 1) GetComponent().ReturnToPool(); + _material.SetFloat("_Alpha", Alpha.Evaluate(_lerp)); + _material.SetFloat("_Radius", Radius.Evaluate(_lerp)); + _material.SetFloat("_AlbedoGamma", AlbedoGamma.Evaluate(_lerp)); + _material.SetFloat("_TextureGamma", TextureGamma.Evaluate(_lerp)); + _material.SetFloat("_GradientMul", GradientMultiplier.Evaluate(_lerp)); + } +} diff --git a/Assets/Scripts/ServerShared/Behaviors/Controller.cs.meta b/Assets/ShieldAnimation.cs.meta similarity index 83% rename from Assets/Scripts/ServerShared/Behaviors/Controller.cs.meta rename to Assets/ShieldAnimation.cs.meta index b89af0f31..93e681fa3 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Controller.cs.meta +++ b/Assets/ShieldAnimation.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 0bd22c9213b660e4d845f7a751f18848 +guid: c959273c4a61f124abd3728581b4aa38 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/ShieldManager.cs b/Assets/ShieldManager.cs new file mode 100644 index 000000000..962f7c5b5 --- /dev/null +++ b/Assets/ShieldManager.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using Unity.Mathematics; +using static Unity.Mathematics.math; +using UnityEngine; + +public class ShieldManager : MonoBehaviour +{ + public Prototype ShieldPrototype; + public float CollisionHitDuration = 3; + + public Entity Entity { get; set; } + + private void OnCollisionEnter(Collision other) + { + var otherShield = other.collider.GetComponent(); + if (!otherShield) + { + Debug.Log("Shield collision occurred, but other collider isn't a shield!"); + return; + } + var contact = other.GetContact(0); + var normal = normalize(float2(contact.normal.x, contact.normal.z)); + var tangent = normal.Rotate(ItemRotation.CounterClockwise); + var v1n = dot(normal, Entity.Velocity); + var v1t = dot(tangent, Entity.Velocity); + var v2n = dot(normal, otherShield.Entity.Velocity); + //var v2t = dot(tangent, otherShield.Entity.Velocity); + + var v1np = PostCollisionVelocity(v1n, Entity.Mass, v2n, otherShield.Entity.Mass); + Entity.Velocity = tangent * v1t + normal * v1np; + if(Entity.ShieldEnabled) ShowHit(contact.point, CollisionHitDuration); + } + + private float PostCollisionVelocity(float v1, float m1, float v2, float m2) + { + return (v1 * (m1 - m2) + m2 * v2) / (m1 + m2); + } + + public void ShowHit(Vector3 point, float duration) + { + var shield = ShieldPrototype.Instantiate(); + shield.Direction = shield.transform.InverseTransformPoint(point); + shield.Duration = duration; + } +} diff --git a/Assets/Scripts/ServerShared/Behaviors/PatrolController.cs.meta b/Assets/ShieldManager.cs.meta similarity index 83% rename from Assets/Scripts/ServerShared/Behaviors/PatrolController.cs.meta rename to Assets/ShieldManager.cs.meta index 4c1bde5cb..017e3dc5b 100644 --- a/Assets/Scripts/ServerShared/Behaviors/PatrolController.cs.meta +++ b/Assets/ShieldManager.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: cc2d16773614011488d30e38edf7c3bb +guid: a42e4b31178f74d43b17322b0ae8f178 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/ShieldTest.cs b/Assets/ShieldTest.cs new file mode 100644 index 000000000..aee32990e --- /dev/null +++ b/Assets/ShieldTest.cs @@ -0,0 +1,23 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using Unity.Mathematics; +using static Unity.Mathematics.math; + +public class ShieldTest : MonoBehaviour +{ + public float Acceleration; + private float _velocity; + + // Update is called once per frame + void Update() + { + _velocity += -sign(transform.position.x) * Acceleration * Time.deltaTime; + transform.position += Vector3.right * (_velocity * Time.deltaTime); + } + + private void OnCollisionEnter(Collision other) + { + _velocity = -_velocity; + } +} diff --git a/Assets/Scripts/ServerShared/Agents/Locomotion.cs.meta b/Assets/ShieldTest.cs.meta similarity index 83% rename from Assets/Scripts/ServerShared/Agents/Locomotion.cs.meta rename to Assets/ShieldTest.cs.meta index b9865e02d..5f5459432 100644 --- a/Assets/Scripts/ServerShared/Agents/Locomotion.cs.meta +++ b/Assets/ShieldTest.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c3af5050375d08242a52bdf7f7de558e +guid: 28d5bea988fad35428986b994b4cf42e MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Steel.mat b/Assets/Steel.mat new file mode 100644 index 000000000..fc4d8d0ca --- /dev/null +++ b/Assets/Steel.mat @@ -0,0 +1,83 @@ +%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: Steel + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _MAINTEX _METALLICGLOSSMAP _NORMALMAP _OCCLUSIONMAP _PARALLAXMAP + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: -3888315358723833787, guid: cbc61995a46604441ab9de4f1c68e290, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 4, y: 4} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 108215966750249586, guid: cbc61995a46604441ab9de4f1c68e290, + type: 3} + m_Scale: {x: 4, y: 4} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 4793252353645218242, guid: cbc61995a46604441ab9de4f1c68e290, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: -4384182597330533215, guid: cbc61995a46604441ab9de4f1c68e290, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 4600200897981803784, guid: cbc61995a46604441ab9de4f1c68e290, + type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Steel.mat.meta b/Assets/Steel.mat.meta new file mode 100644 index 000000000..d645ba6a4 --- /dev/null +++ b/Assets/Steel.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4c998decce894b4458e1bc667975aeea +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Textures/Clouds.tif.meta b/Assets/Textures/Clouds.tif.meta index e44a38460..74790c1c7 100644 --- a/Assets/Textures/Clouds.tif.meta +++ b/Assets/Textures/Clouds.tif.meta @@ -55,6 +55,8 @@ TextureImporter: textureType: 0 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 @@ -63,7 +65,7 @@ TextureImporter: platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 + maxTextureSize: 512 resizeAlgorithm: 0 textureFormat: -1 textureCompression: 1 @@ -75,7 +77,7 @@ TextureImporter: forceMaximumCompressionQuality_BC6H_BC7: 0 - serializedVersion: 3 buildTarget: Standalone - maxTextureSize: 2048 + maxTextureSize: 512 resizeAlgorithm: 0 textureFormat: -1 textureCompression: 1 diff --git a/Assets/Textures/clouds.png b/Assets/Textures/clouds.png new file mode 100644 index 000000000..b7fc0f4af --- /dev/null +++ b/Assets/Textures/clouds.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d560c4f091b05d85f4c7301566ed825159c4c103ba30455900a491a074a17cd9 +size 94614 diff --git a/Assets/Textures/clouds.png.meta b/Assets/Textures/clouds.png.meta new file mode 100644 index 000000000..2bd99f713 --- /dev/null +++ b/Assets/Textures/clouds.png.meta @@ -0,0 +1,108 @@ +fileFormatVersion: 2 +guid: df0632a08c5f1a1498fa325c755dc459 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + 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 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + 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: 1 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: 63 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: 63 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Textures/dissolve.jpg b/Assets/Textures/dissolve.jpg new file mode 100644 index 000000000..570e8412d --- /dev/null +++ b/Assets/Textures/dissolve.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:73b7c70f0b81ca8af9de2ba5dcc3ce2f79d9e0e9611d9e3174cadeb98d9e417c +size 3270 diff --git a/Assets/Textures/dissolve.jpg.meta b/Assets/Textures/dissolve.jpg.meta new file mode 100644 index 000000000..03afb2fbc --- /dev/null +++ b/Assets/Textures/dissolve.jpg.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 3e254191e5adabf4a806ca38b0363ee4 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + 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 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + 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 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Textures/studio.hdr b/Assets/Textures/studio.hdr new file mode 100644 index 000000000..b39058eaa --- /dev/null +++ b/Assets/Textures/studio.hdr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:64271aacf4ab0271e9de0517610c12014d9010f8a6b992de975ec2e9b4ac3b61 +size 3126311 diff --git a/Assets/Textures/studio.hdr.meta b/Assets/Textures/studio.hdr.meta new file mode 100644 index 000000000..500cb6205 --- /dev/null +++ b/Assets/Textures/studio.hdr.meta @@ -0,0 +1,108 @@ +fileFormatVersion: 2 +guid: 3aff5e4f12da60e42b543a55f412144f +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + 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 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + 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: 2 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 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 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Textures/studio2.hdr b/Assets/Textures/studio2.hdr new file mode 100644 index 000000000..46098ccd7 --- /dev/null +++ b/Assets/Textures/studio2.hdr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2886bb8c5fd16ab05542d7bc741e0fc641eca66c1182623a6ca5a03abf9556c +size 29457922 diff --git a/Assets/Textures/studio2.hdr.meta b/Assets/Textures/studio2.hdr.meta new file mode 100644 index 000000000..2b4d8d3b0 --- /dev/null +++ b/Assets/Textures/studio2.hdr.meta @@ -0,0 +1,108 @@ +fileFormatVersion: 2 +guid: 2cd5af9c042f8c2409442e43b090016d +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + 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 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + 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: 2 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 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 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Textures/studio3.hdr b/Assets/Textures/studio3.hdr new file mode 100644 index 000000000..65fdceac6 --- /dev/null +++ b/Assets/Textures/studio3.hdr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:83ef170df75bfcb17ac0511b71dd59607694b016a60efbd68f35cac9d8a4e38e +size 25044990 diff --git a/Assets/Textures/studio3.hdr.meta b/Assets/Textures/studio3.hdr.meta new file mode 100644 index 000000000..c5524a88e --- /dev/null +++ b/Assets/Textures/studio3.hdr.meta @@ -0,0 +1,108 @@ +fileFormatVersion: 2 +guid: 589f8d25c07df474ebf6e5cf31ac21c4 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + 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 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + 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: 2 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 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 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Economy.Shared.Unity.csproj b/Economy.Shared.Unity.csproj index 1421127af..d6ef02c3d 100644 --- a/Economy.Shared.Unity.csproj +++ b/Economy.Shared.Unity.csproj @@ -110,6 +110,7 @@ + @@ -118,12 +119,10 @@ - - @@ -173,6 +172,7 @@ + @@ -191,10 +191,10 @@ - + - + @@ -232,6 +232,7 @@ + @@ -302,8 +303,7 @@ - - + @@ -336,7 +336,7 @@ - + @@ -345,10 +345,11 @@ + - + @@ -356,10 +357,10 @@ - + @@ -373,6 +374,7 @@ + @@ -397,7 +399,7 @@ - + @@ -416,6 +418,7 @@ + @@ -443,7 +446,6 @@ - @@ -511,7 +513,7 @@ - + diff --git a/GameData/Loadouts/Djinni.preset b/GameData/Loadouts/Djinni.preset index c0ae56d7e012612cbfa2b7b67adb7b23b05a71ac..39a79f45d4e4e98fbd5de3c1038fef4aad899739 100644 GIT binary patch literal 7259 zcmd^?4NMbf7{`ycAPki%sK_RE=q9Keh#15Pr5~2>S~WQQnyXN;e3kJbA37sWhYDh8 z323IEsK5{_L8nHTGHA?fHj}x`Xoj0ElQ_p58aHqg*n96?d+qh!ip7~_UM^4Wz4v*3 z&;NPeySKgSI&q3JBSX1Q&&{q`)9NpOKYZ`$zPD1fXC`8XF!%IBYCU&X$mUl4lD*N* z50vYh0=u2b5Iq;89R_hBhIL^RG#U(hen5@J$raEVhrSUe^(msyvqfJ?Rae`9ycstG zfIRPY^E2xcBa{jy>Vk?`_qN zJ>*e|8TgA^YXR}|#l1(TmtBau_)$3KSJ*E)E>b0?W-4=df%$=GBwq5{`EI{A)T{_^ zEq#zNCG}HNaFh#+2b~8B~2AvKDezc_DZl((plWpLKv>mmZ$-y5a`WgY9V^$xqo9V*D1Ud!0 z3wAS|#xm%{459CC4!4`>fcI0EIlpaASc|2e;INxDgB}m1I=9fv-m98Q!TP79Jpt6mw|cH&J1S#}ueu!EK5o*ZPet-fd7={0 z(nx%7az+3n*Cf~nbaDa;cUA1jDoj2aq2t7lO_)_%4K_Q!8O!%;9IC)ZIICo#mtk#q zrRtJoU7gqy%*9^PY2jSnsowgzlG`!c?s#4HkC@yG=BCECgB@P0=XR(6cx3KRcOy!i ze{-#Pq>aZMV91p%g=duaJfe0-{rW?SU*Sv;vc*w|2zdpP4tibtTj@ScQ1?mET+#L~ zqA^E3cd#fwsB6Rbkr#Wo9y{s>AJ@xNX$9#_o4TGmFL@Zd9JH z%+0Yu(sD(bw`XRY?+KAID=`=R76?`HtRx0Lb3?;Czivh~bm6_$t%&ZR8XA^+PKF41 zSsL0UyM<~fe`75R(H&$%)0TT8LSB-F^5<>FkPS`r-HGT9vY{PI!x16>%Z4uUJE0x$ z-y<%6)vLM1(@zODy~)x5q61dj4U2ixfzvz*WW{gyzqwu->(^pni3vQ)adbukpD_i!Y8v4 z3QwVu4S4lekhO^*I(_*r$_$cLRJs@s=qvvYG#+!hck(QQ!|y zRqF?=yRk`eRh=aR{EaP_!1rT*I|lwyo%K=s8KlLcGUdRAeQ){?G{(sjHz+d{$+;QU z@0~#azaL$hiTq9CkL@I~oPow|1rq`%G;1WL3|dP>t<0R9<6^WU;U`GQ>DV4Z$7agxYW*;bXE!8RV47pKu@)!fR8YxhjimhytkzPhj!W z)Dzl;k#DMt^tTaZ3?Y*ep5~U80t|@|b06z#vsEDb21~HeV;u$Vz(CwG&f+)Q)#Yln F`XA12dp-aF delta 1352 zcma)6eQXnT7{2!IXxBCLdUxCH?%Hjj0SB8D2Xkxbx~%fCWn*k$^dAhxuNg?0F^Xm* zj+tm&XKe3DV1@)12fBoT8()9GVw$!PGl^(4I@CCjKc*O$DIxe3&);3k%*d9I-2Lu- ze((D{&-=cA+;`QzWpOVPqP{+tSW;OmX&OcKXSkP+Y`?H7vZL;anj#o~>A& z7?hdN#*GgrlAD>@pEmb_x3n;U;vXqQtTi}nk(k=v*ijSwPC)QR2WNr}R+2eeG(#A|(? z8V^bV3RYE9z@TicqOAAJP-txDzm#E@-o_ku+DEQ;T1BaUd? z`Tdm_8y-96`t0gQnTlt~7QJ8YCdBqV-uE5D`oy5JP>Yb@e{zJ`gG{pHBn7 zPUN3xej)m7X;b9o=+k7Oi^Rl?&2OJyAvpc<;C(3Ib61|ik{(=KWUT%zUl>Dc65XAd z5wi2XwbyXVb)JstzhO)$gHPnKh2!~{K0O|e=@aAOK8i991`)9gA<>RHw*yDqE;N$w z5YJ;kV9+HEB?9AmA5H#w5>6 zG5z0J+y5y#67HpVk9R@mSki!fP90~N;FbXrT9Pa31LgrvG?aTe#!6b9rHqZS8MmnDUIWfkgF)|TU8 zpQ4i6e$|7sN}-U_(kU%vJ|rMD=`?;&O2Meonw*V!O-hU;Da_i>1_YY%UHJxeIR@1H za#Jd&oYkMxc;Eqd&*br{CTVHrdUn0ER>4J{{!1IH^Kk_ diff --git a/GameData/Loadouts/Longinus.preset b/GameData/Loadouts/Longinus.preset index 7847dc8b838f4fdbca715c872f91f953950d0744..52fa99cdd10b211a63205c155a70d381b68139f4 100644 GIT binary patch literal 6112 zcmd^@3s4hB7{@OO_(CBT1}IjITCJ#+hf+}>M;<(a5D|(fDm6eFqmfVu70_CsC@7$i zP@>ZcDDn^_pxF9CMMLDpoB%sudNjNEHm-yO03k)(TRmQ*ScgY5`OGMDI|so+C)EREi)236x4n81Gl|#U;iMDXgQ(HA7SE!{?G!^!mN7K;Yi* zmN__H9qjdW<5ML4{w-OlH!o7ar?Df2pYsVcGEXCjR7xR6q9c!P=r_^?sC=i!G~>%Z ziw(CtYhEuQRV@gjJkLWoRHY-u7GFno(&X$WI1x9X;4NNz*pL||v^x)1=AU(e>c zHQRDF1eX6ku8#jhfe*)Tfg{vOLkP@#>F~b8NJD_KHH#UWw>h8U$i`W?O<&q^4^cUl zEI{N^l3Ynmk&j_!owM*xsU4AM?5tJ+)jnQi%v{UhgnIu?^WxLjjTRbuUoZ7v&gV;L zK70vJ)LT1*MIU!*;Xtuad!)VZEJUWHmi@ee9cn9Zk5>fy@PcoV5HnnEVGg@xD;ndP zT-n-Ku!gx0QMstUKr*FR%7-gPAKtgcnO%I_og|q4FbgqMQdvKpmhT$*nOoA$z~Sw` z2t<2XyvPu7IE~8-7fYf;gy8~+FTDps&DGQ1$UyXE+s_T`K;X)0d$g>f#oRN+^gv?z zq_D@OzR{v6KFymK^^*O;fOsL&kBn%BEku`<2eCbKKo%l8YA|+f4+x9iG1#&1tUfJ7 z)YznWU{4!t#h-~A;Pn9+2t{vB8rT{2b0JcOfgN#U*80de!7dMlL4fhXsXKGP-Lx>{ zgKfBWm#L}FR;o{2v&E;}LkiiJpe-O;EyLSZS2h>TaQ|&?;w`H)HXiRbgSNc2$G{B$ zY#Fy#UCW=*c*i4k$bF-%C$a#9gr}Tc7x%sJ4>Qgt&b_NEtmCGDlpS#~kd$FKX}eW@ zo6vLuqwt%A8LXreUfAZNPKcR#WqE_=@g}O-`XcqSB44p6b`{YDr=&W}O5qh&1bG%S zawX54F8UVvig-~HVJN}&gbAOmvOQQs6}ZW4tiwvi%=QPuvFaf$K^N2)pK?>166fqt z?Ee-aDXE;*lYLDLi{1B~<*rVj;xoC7C5#M>1`iudF)uQVfREi`dK-#LYJ^Zj6LwTV z+<_X}VAKLhd0Py1tT+TU)T31aaR+878f4N6NqJig{rEvF%uv*DEDPce%uxENwEd8j z|D~aB)@8C6HtFolQC1cEEUks$sWQ+qTjM~l?S@Re=@}@g7Eh1^3vK0Iik&5~@-5TM z3p~I^76sX6dXGsjFG~M+$LxJSKt*kvA!i!4IMA8#=OHO?d~sm=b?-^h?b~iZ6v8G& zXOBG%N%@aV3U#_cfhdGc3g!REhNQgdNhzth`E17c>OJgi7I%C>KwPWB7hD_Q0}9Qb zA09>gP7PjGGo?~8_9z~7Vn4^|L^Wr7nccNRmAemtD>R_e8$8z9-CdI{N*%;0GvC<$ z;-mYlGVqoo5Yw2vSjZOz>A=^cS3t;!85voc9z6YOk`Ui z7JPNk9z%9I)WyR~T4-mhcKV%8;(zt(IxW_l?<@S(P8Czy(bmn*SIEV>ykre9XyEiS zdj`A?0f+vAA*y3EgMOMo!%EPA_tUi^;DF=1LGv&u9%x!TGXj+Gz|hsfOL^L~en7E- z2+2fH8mu$k(3j~W;LtaRfl*%LL}}K5^yJB|Urmklr0&=aInNxNypO|g@&+!} z$?|MMEcR|~d*K519Ky_xn7;%0t&?}LNwAo141*YX`~4S)Nv~H!j6Ncv2Q^Zc#qLq! zX}A&cY{Ja!9#@h0Ks#&Lx$jN-lxrc!TNKAGVQ=IHAtjz`y zncOHWJGoz&b@Du6T}Eaoj|<4-nEYE#kvi`n^%U;d>%45#e5a$|rd$|YG8 zEUQ*^-W?fjy8f?h_A2N6qEv-|{PNTyoNi=h1)6xETwObCyQJUjZ%=m}K4THXaLV@K zY&;RD$iR2-RQO)co?|homsf3nzZH@c6rA((N{aGx6nyhjN^??i+Q|S47v`yq-l-C6 zy_dZ_5gppK<`v^9J8v0KxJdStFWp!1-*4sO8`DpfE`Pe#CqFM;At*5=GqEHew@28q z8OnUhzJAXq@(pDHg-+*`)}pHPCGP83Lir-J7tI5viHmukXHH_Aenh}lyW2+URJ_Bq z{9|rO%UmRYal!oM*JQ9<`Q{JHjolu4H$9a)sqZfN0Vo%D{5>!=1GB}m-201-AH8tz z=6K6J<;&zy21c-!b9GhQGGB>!c6q+Om!(;y1=M0Yu?UA2F0e^+rLO(X6jpXzHoMW- zx#gf21M3lie~lF;cQS5!?0+L5(z^WL&*cI6IhDECQo#`cQ}d3*WgDVARyfWt`DuM4 zV0l1JVsS}kGG^?7t+PC3u;Z{my6a?p&6HJgmcc-WgZ#tsHR|fW8{ho8-!xe*T(@No zD4TnhYXtDKu5jCQ&ab>z%U5Hqb7oO;X=aInQ+{Gm3KsKm1ZdEmI9vg0`;U7zj?lpw zpcYYYaA+AR0m|<58CQVXr}>BB2pyaO8Xu5^L(51BP~Gw}Tmfq5uCfA0=->)ayS#rJ zacCKq0qUx`cJg2SUYCi|QX4i&Xo8v#6I?nWA%IcbFkvtBSdIvYe__}jVKCim-J(^M z)BAPAmbwEAvSJ*?45pp-)%i-awG*>Guw$#r!4cEA5{K>0_lI$4p?l&0mDkujwa5>L z3vqeMZqIoi99jm6r|c`HzsBK0oSwS9(hG+cdVA`K!2HE7j!FmCxJ+~QQ(78Y^?h9c zFmGg*r78rc<`rXaRe3NlOq?`{8Pu#g{e^YiRbF%d_0!HIp1dX}56q$4SswtKRqKo2 z8rZwI`ZcXp_|44Rrn1&Ku_!%X!6~s)!LY&*Gw+>p{>8vBpaRD$C(FlZDV3wl-NXZ8*1V{o&30`%M zU|EWZ1t4c&GXlf0B2CEQ>vxQTIee54q`+CNVI~I3f_gIeo_#?pE)e>9b6mbzf&PoPw&DcwUml zKCi}nvK^!OWMxKi7JC`fhd_=$vy8FL", + "ignore": false, + "defaultInstantiationMode": 1, + "supportsModification": true + }, + "newSceneOverride": 0 +} \ No newline at end of file diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index 4f088982e..a07de8dc8 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:60da33cbbdd3558ab4a7ddf3cf85ef640457b6a7d63a45502e3baf55f16d0a6f -size 482 +oid sha256:983167af0454576c700553e065cefc2ab2e12b586202bf3d4fe7037fce01afe1 +size 488 diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset index 620d9a189..41ee8dea7 100644 --- a/UserSettings/EditorUserSettings.asset +++ b/UserSettings/EditorUserSettings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a8d6ea99fabe08bd673c3526938e2e7d79b85571e90bd9abfd5d11e43ab24ad1 -size 1077 +oid sha256:507d4e3c0c9eac4926b09dd673287d6df644ac0b325de8446cda94d313628e04 +size 1193