Targeting
Target locking
Crosshairs
Improved HUD schematic feedback
Equipment Heat Damage
Equipment Disabling
This commit is contained in:
Reinier Vens 2021-01-10 03:59:47 +00:00
commit fddd485262
100 changed files with 10091 additions and 7885 deletions

6
.vsconfig Normal file
View file

@ -0,0 +1,6 @@
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Workload.ManagedGame"
]
}

View file

@ -1,23 +1,23 @@
 
Microsoft Visual Studio Solution File, Format Version 11.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2010 # Visual Studio 15
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp.csproj", "{f084b629-16e6-9ccd-eff8-10a39db37a52}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp.csproj", "{29B684F0-E616-CD9C-EFF8-10A39DB37A52}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Economy.Shared.Unity", "Economy.Shared.Unity.csproj", "{c2362ba6-dee9-92b9-0779-f5fcf5968986}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Economy.Shared.Unity", "Economy.Shared.Unity.csproj", "{A62B36C2-E9DE-B992-0779-F5FCF5968986}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniRx", "UniRx.csproj", "{4d885cb7-1f9e-abb3-b070-7265b432ecda}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniRx", "UniRx.csproj", "{B75C884D-9E1F-B3AB-B070-7265B432ECDA}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MessagePack", "MessagePack.csproj", "{c511ef21-dc27-883d-b027-9a4b6f36bae4}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MessagePack", "MessagePack.csproj", "{21EF11C5-27DC-3D88-B027-9A4B6F36BAE4}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-firstpass", "Assembly-CSharp-firstpass.csproj", "{a442877d-fc0d-6756-0a98-3ca4312f9253}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-firstpass", "Assembly-CSharp-firstpass.csproj", "{7D8742A4-0DFC-5667-0A98-3CA4312F9253}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Substance.EditorHelper", "Substance.EditorHelper.csproj", "{dd909206-f54e-1c12-ed74-b4e22d464f6a}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Substance.EditorHelper", "Substance.EditorHelper.csproj", "{069290DD-4EF5-121C-ED74-B4E22D464F6A}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Substance.Platform", "Substance.Platform.csproj", "{2ca9591a-f6e2-fafd-e598-0f0563c5ae57}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Substance.Platform", "Substance.Platform.csproj", "{1A59A92C-E2F6-FDFA-E598-0F0563C5AE57}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-Editor", "Assembly-CSharp-Editor.csproj", "{a7fc89e3-14ca-fb82-7d67-c13788bee74a}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-Editor", "Assembly-CSharp-Editor.csproj", "{E389FCA7-CA14-82FB-7D67-C13788BEE74A}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-Editor-firstpass", "Assembly-CSharp-Editor-firstpass.csproj", "{b813e4c7-10f6-4f4d-0de5-991510834dc3}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-Editor-firstpass", "Assembly-CSharp-Editor-firstpass.csproj", "{C7E413B8-F610-4D4F-0DE5-991510834DC3}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -25,42 +25,42 @@ Global
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{f084b629-16e6-9ccd-eff8-10a39db37a52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {29B684F0-E616-CD9C-EFF8-10A39DB37A52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{f084b629-16e6-9ccd-eff8-10a39db37a52}.Debug|Any CPU.Build.0 = Debug|Any CPU {29B684F0-E616-CD9C-EFF8-10A39DB37A52}.Debug|Any CPU.Build.0 = Debug|Any CPU
{f084b629-16e6-9ccd-eff8-10a39db37a52}.Release|Any CPU.ActiveCfg = Release|Any CPU {29B684F0-E616-CD9C-EFF8-10A39DB37A52}.Release|Any CPU.ActiveCfg = Release|Any CPU
{f084b629-16e6-9ccd-eff8-10a39db37a52}.Release|Any CPU.Build.0 = Release|Any CPU {29B684F0-E616-CD9C-EFF8-10A39DB37A52}.Release|Any CPU.Build.0 = Release|Any CPU
{c2362ba6-dee9-92b9-0779-f5fcf5968986}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A62B36C2-E9DE-B992-0779-F5FCF5968986}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{c2362ba6-dee9-92b9-0779-f5fcf5968986}.Debug|Any CPU.Build.0 = Debug|Any CPU {A62B36C2-E9DE-B992-0779-F5FCF5968986}.Debug|Any CPU.Build.0 = Debug|Any CPU
{c2362ba6-dee9-92b9-0779-f5fcf5968986}.Release|Any CPU.ActiveCfg = Release|Any CPU {A62B36C2-E9DE-B992-0779-F5FCF5968986}.Release|Any CPU.ActiveCfg = Release|Any CPU
{c2362ba6-dee9-92b9-0779-f5fcf5968986}.Release|Any CPU.Build.0 = Release|Any CPU {A62B36C2-E9DE-B992-0779-F5FCF5968986}.Release|Any CPU.Build.0 = Release|Any CPU
{4d885cb7-1f9e-abb3-b070-7265b432ecda}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B75C884D-9E1F-B3AB-B070-7265B432ECDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4d885cb7-1f9e-abb3-b070-7265b432ecda}.Debug|Any CPU.Build.0 = Debug|Any CPU {B75C884D-9E1F-B3AB-B070-7265B432ECDA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4d885cb7-1f9e-abb3-b070-7265b432ecda}.Release|Any CPU.ActiveCfg = Release|Any CPU {B75C884D-9E1F-B3AB-B070-7265B432ECDA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4d885cb7-1f9e-abb3-b070-7265b432ecda}.Release|Any CPU.Build.0 = Release|Any CPU {B75C884D-9E1F-B3AB-B070-7265B432ECDA}.Release|Any CPU.Build.0 = Release|Any CPU
{c511ef21-dc27-883d-b027-9a4b6f36bae4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {21EF11C5-27DC-3D88-B027-9A4B6F36BAE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{c511ef21-dc27-883d-b027-9a4b6f36bae4}.Debug|Any CPU.Build.0 = Debug|Any CPU {21EF11C5-27DC-3D88-B027-9A4B6F36BAE4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{c511ef21-dc27-883d-b027-9a4b6f36bae4}.Release|Any CPU.ActiveCfg = Release|Any CPU {21EF11C5-27DC-3D88-B027-9A4B6F36BAE4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{c511ef21-dc27-883d-b027-9a4b6f36bae4}.Release|Any CPU.Build.0 = Release|Any CPU {21EF11C5-27DC-3D88-B027-9A4B6F36BAE4}.Release|Any CPU.Build.0 = Release|Any CPU
{a442877d-fc0d-6756-0a98-3ca4312f9253}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7D8742A4-0DFC-5667-0A98-3CA4312F9253}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{a442877d-fc0d-6756-0a98-3ca4312f9253}.Debug|Any CPU.Build.0 = Debug|Any CPU {7D8742A4-0DFC-5667-0A98-3CA4312F9253}.Debug|Any CPU.Build.0 = Debug|Any CPU
{a442877d-fc0d-6756-0a98-3ca4312f9253}.Release|Any CPU.ActiveCfg = Release|Any CPU {7D8742A4-0DFC-5667-0A98-3CA4312F9253}.Release|Any CPU.ActiveCfg = Release|Any CPU
{a442877d-fc0d-6756-0a98-3ca4312f9253}.Release|Any CPU.Build.0 = Release|Any CPU {7D8742A4-0DFC-5667-0A98-3CA4312F9253}.Release|Any CPU.Build.0 = Release|Any CPU
{dd909206-f54e-1c12-ed74-b4e22d464f6a}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {069290DD-4EF5-121C-ED74-B4E22D464F6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{dd909206-f54e-1c12-ed74-b4e22d464f6a}.Debug|Any CPU.Build.0 = Debug|Any CPU {069290DD-4EF5-121C-ED74-B4E22D464F6A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{dd909206-f54e-1c12-ed74-b4e22d464f6a}.Release|Any CPU.ActiveCfg = Release|Any CPU {069290DD-4EF5-121C-ED74-B4E22D464F6A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{dd909206-f54e-1c12-ed74-b4e22d464f6a}.Release|Any CPU.Build.0 = Release|Any CPU {069290DD-4EF5-121C-ED74-B4E22D464F6A}.Release|Any CPU.Build.0 = Release|Any CPU
{2ca9591a-f6e2-fafd-e598-0f0563c5ae57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1A59A92C-E2F6-FDFA-E598-0F0563C5AE57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2ca9591a-f6e2-fafd-e598-0f0563c5ae57}.Debug|Any CPU.Build.0 = Debug|Any CPU {1A59A92C-E2F6-FDFA-E598-0F0563C5AE57}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2ca9591a-f6e2-fafd-e598-0f0563c5ae57}.Release|Any CPU.ActiveCfg = Release|Any CPU {1A59A92C-E2F6-FDFA-E598-0F0563C5AE57}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2ca9591a-f6e2-fafd-e598-0f0563c5ae57}.Release|Any CPU.Build.0 = Release|Any CPU {1A59A92C-E2F6-FDFA-E598-0F0563C5AE57}.Release|Any CPU.Build.0 = Release|Any CPU
{a7fc89e3-14ca-fb82-7d67-c13788bee74a}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E389FCA7-CA14-82FB-7D67-C13788BEE74A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{a7fc89e3-14ca-fb82-7d67-c13788bee74a}.Debug|Any CPU.Build.0 = Debug|Any CPU {E389FCA7-CA14-82FB-7D67-C13788BEE74A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{a7fc89e3-14ca-fb82-7d67-c13788bee74a}.Release|Any CPU.ActiveCfg = Release|Any CPU {E389FCA7-CA14-82FB-7D67-C13788BEE74A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{a7fc89e3-14ca-fb82-7d67-c13788bee74a}.Release|Any CPU.Build.0 = Release|Any CPU {E389FCA7-CA14-82FB-7D67-C13788BEE74A}.Release|Any CPU.Build.0 = Release|Any CPU
{b813e4c7-10f6-4f4d-0de5-991510834dc3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C7E413B8-F610-4D4F-0DE5-991510834DC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{b813e4c7-10f6-4f4d-0de5-991510834dc3}.Debug|Any CPU.Build.0 = Debug|Any CPU {C7E413B8-F610-4D4F-0DE5-991510834DC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{b813e4c7-10f6-4f4d-0de5-991510834dc3}.Release|Any CPU.ActiveCfg = Release|Any CPU {C7E413B8-F610-4D4F-0DE5-991510834DC3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{b813e4c7-10f6-4f4d-0de5-991510834dc3}.Release|Any CPU.Build.0 = Release|Any CPU {C7E413B8-F610-4D4F-0DE5-991510834DC3}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -73,6 +73,6 @@ Material:
- _UVSec: 0 - _UVSec: 0
- _ZWrite: 1 - _ZWrite: 1
m_Colors: m_Colors:
- _Color: {r: 4, g: 4, b: 4, a: 1} - _Color: {r: 255.99997, g: 255.99997, b: 255.99997, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: [] m_BuildTextureStacks: []

View file

@ -86,7 +86,7 @@ Material:
- _Mode: 0 - _Mode: 0
- _OcclusionStrength: 1 - _OcclusionStrength: 1
- _Parallax: 0.02 - _Parallax: 0.02
- _Scale: 1.8794018 - _Scale: 1.832619
- _SmoothnessTextureChannel: 0 - _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1 - _SpecularHighlights: 1
- _SrcBlend: 1 - _SrcBlend: 1

View file

@ -116,6 +116,38 @@
"expectedControlType": "Button", "expectedControlType": "Button",
"processors": "", "processors": "",
"interactions": "" "interactions": ""
},
{
"name": "Target Reticle",
"type": "Button",
"id": "86f2e6cc-b895-4c55-aa19-70220df477d2",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
},
{
"name": "Target Previous",
"type": "Button",
"id": "2cf8e2b2-1463-463b-8f55-e79884f3767d",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
},
{
"name": "Target Next",
"type": "Button",
"id": "1e2bd5af-e174-4533-8c57-b04b7e9df92c",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
},
{
"name": "Target Nearest",
"type": "Button",
"id": "b2a42777-c22b-48f3-9e74-8dc715449845",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
} }
], ],
"bindings": [ "bindings": [
@ -459,6 +491,50 @@
"action": "Fire Group 6", "action": "Fire Group 6",
"isComposite": false, "isComposite": false,
"isPartOfComposite": false "isPartOfComposite": false
},
{
"name": "",
"id": "5211a58c-428b-4ee6-820d-2f67789806d6",
"path": "<Keyboard>/r",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Target Reticle",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "6e13d87d-e5bb-4363-b153-1e0c1e21e4eb",
"path": "<Keyboard>/t",
"interactions": "",
"processors": "",
"groups": "",
"action": "Target Previous",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "e6e3164c-1b59-4eab-99d9-5a3bc294af0b",
"path": "<Keyboard>/y",
"interactions": "",
"processors": "",
"groups": "",
"action": "Target Next",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "b55dd143-367d-4842-82c8-593c301bcd69",
"path": "<Keyboard>/u",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Target Nearest",
"isComposite": false,
"isPartOfComposite": false
} }
] ]
}, },

View file

@ -57,7 +57,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 56c973b8f3781c848b6530c2e7efce05, type: 3} m_Script: {fileID: 11500000, guid: 56c973b8f3781c848b6530c2e7efce05, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
Particles: {fileID: 0} Particles: {fileID: 2200213684891960502}
FadeOutTime: 1 FadeOutTime: 1
ThrustCurve: ThrustCurve:
serializedVersion: 2 serializedVersion: 2
@ -121,7 +121,7 @@ ParticleSystem:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2200213684891960497} m_GameObject: {fileID: 2200213684891960497}
serializedVersion: 6 serializedVersion: 7
lengthInSec: 5 lengthInSec: 5
simulationSpeed: 1 simulationSpeed: 1
stopAction: 0 stopAction: 0
@ -197,7 +197,7 @@ ParticleSystem:
startLifetime: startLifetime:
serializedVersion: 2 serializedVersion: 2
minMaxState: 0 minMaxState: 0
scalar: 10 scalar: 2
minScalar: 5 minScalar: 5
maxCurve: maxCurve:
serializedVersion: 2 serializedVersion: 2
@ -947,7 +947,7 @@ ParticleSystem:
rateOverTime: rateOverTime:
serializedVersion: 2 serializedVersion: 2
minMaxState: 0 minMaxState: 0
scalar: 15 scalar: 500
minScalar: 10 minScalar: 10
maxCurve: maxCurve:
serializedVersion: 2 serializedVersion: 2
@ -2957,7 +2957,7 @@ ParticleSystem:
m_PostInfinity: 2 m_PostInfinity: 2
m_RotationOrder: 4 m_RotationOrder: 4
separateAxes: 0 separateAxes: 0
frequency: 0.1 frequency: 0.01
damping: 1 damping: 1
octaves: 1 octaves: 1
octaveMultiplier: 0.5 octaveMultiplier: 0.5
@ -3729,19 +3729,20 @@ ParticleSystem:
range: {x: 0, y: 1} range: {x: 0, y: 1}
CollisionModule: CollisionModule:
enabled: 0 enabled: 0
serializedVersion: 3 serializedVersion: 4
type: 0 type: 0
collisionMode: 0 collisionMode: 0
colliderForce: 0 colliderForce: 0
multiplyColliderForceByParticleSize: 0 multiplyColliderForceByParticleSize: 0
multiplyColliderForceByParticleSpeed: 0 multiplyColliderForceByParticleSpeed: 0
multiplyColliderForceByCollisionAngle: 1 multiplyColliderForceByCollisionAngle: 1
plane0: {fileID: 0} m_Planes:
plane1: {fileID: 0} - {fileID: 0}
plane2: {fileID: 0} - {fileID: 0}
plane3: {fileID: 0} - {fileID: 0}
plane4: {fileID: 0} - {fileID: 0}
plane5: {fileID: 0} - {fileID: 0}
- {fileID: 0}
m_Dampen: m_Dampen:
serializedVersion: 2 serializedVersion: 2
minMaxState: 0 minMaxState: 0
@ -3915,17 +3916,20 @@ ParticleSystem:
interiorCollisions: 0 interiorCollisions: 0
TriggerModule: TriggerModule:
enabled: 0 enabled: 0
collisionShape0: {fileID: 0} serializedVersion: 2
collisionShape1: {fileID: 0}
collisionShape2: {fileID: 0}
collisionShape3: {fileID: 0}
collisionShape4: {fileID: 0}
collisionShape5: {fileID: 0}
inside: 1 inside: 1
outside: 0 outside: 0
enter: 0 enter: 0
exit: 0 exit: 0
colliderQueryMode: 0
radiusScale: 1 radiusScale: 1
primitives:
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
SubModule: SubModule:
serializedVersion: 2 serializedVersion: 2
enabled: 0 enabled: 0
@ -4242,17 +4246,17 @@ ParticleSystem:
maxColor: {r: 1, g: 1, b: 1, a: 1} maxColor: {r: 1, g: 1, b: 1, a: 1}
maxGradient: maxGradient:
serializedVersion: 2 serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 0} key0: {r: 0, g: 0, b: 0, a: 0}
key1: {r: 1, g: 1, b: 1, a: 1} key1: {r: 0.01, g: 0.01, b: 0.01, a: 1}
key2: {r: 0, g: 0, b: 0, a: 1} key2: {r: 1, g: 0.092499994, b: 0.00999999, a: 1}
key3: {r: 0, g: 0, b: 0, a: 0} key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0} key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0} key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0} key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0} key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0 ctime0: 0
ctime1: 65535 ctime1: 40557
ctime2: 0 ctime2: 65535
ctime3: 0 ctime3: 0
ctime4: 0 ctime4: 0
ctime5: 0 ctime5: 0
@ -4267,7 +4271,7 @@ ParticleSystem:
atime6: 0 atime6: 0
atime7: 0 atime7: 0
m_Mode: 0 m_Mode: 0
m_NumColorKeys: 2 m_NumColorKeys: 3
m_NumAlphaKeys: 3 m_NumAlphaKeys: 3
minGradient: minGradient:
serializedVersion: 2 serializedVersion: 2

BIN
Assets/Resources/Settings.asset (Stored with Git LFS)

Binary file not shown.

BIN
Assets/Resources/Sprites/Indicators/Crosshairs.psd (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,96 @@
fileFormatVersion: 2
guid: ab4e7591714d8144d8ee9e2aba5396c1
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:

View file

@ -6,7 +6,7 @@ TextureImporter:
serializedVersion: 11 serializedVersion: 11
mipmaps: mipmaps:
mipMapMode: 0 mipMapMode: 0
enableMipMap: 1 enableMipMap: 0
sRGBTexture: 1 sRGBTexture: 1
linearTexture: 0 linearTexture: 0
fadeOut: 0 fadeOut: 0
@ -35,13 +35,13 @@ TextureImporter:
filterMode: -1 filterMode: -1
aniso: -1 aniso: -1
mipBias: -100 mipBias: -100
wrapU: -1 wrapU: 1
wrapV: -1 wrapV: 1
wrapW: -1 wrapW: -1
nPOTScale: 1 nPOTScale: 0
lightmap: 0 lightmap: 0
compressionQuality: 50 compressionQuality: 50
spriteMode: 0 spriteMode: 1
spriteExtrude: 1 spriteExtrude: 1
spriteMeshType: 1 spriteMeshType: 1
alignment: 0 alignment: 0
@ -50,11 +50,13 @@ TextureImporter:
spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1 spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1 alphaUsage: 1
alphaIsTransparency: 0 alphaIsTransparency: 1
spriteTessellationDetail: -1 spriteTessellationDetail: -1
textureType: 0 textureType: 8
textureShape: 1 textureShape: 1
singleChannelComponent: 0 singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0 maxTextureSizeSet: 0
compressionQualitySet: 0 compressionQualitySet: 0
textureFormatSet: 0 textureFormatSet: 0
@ -73,13 +75,25 @@ TextureImporter:
overridden: 0 overridden: 0
androidETC2FallbackOverride: 0 androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 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: spriteSheet:
serializedVersion: 2 serializedVersion: 2
sprites: [] sprites: []
outline: [] outline: []
physicsShape: [] physicsShape: []
bones: [] bones: []
spriteID: spriteID: 5e97eb03825dee720800000000000000
internalID: 0 internalID: 0
vertices: [] vertices: []
indices: indices:

View file

@ -6,7 +6,7 @@ TextureImporter:
serializedVersion: 11 serializedVersion: 11
mipmaps: mipmaps:
mipMapMode: 0 mipMapMode: 0
enableMipMap: 1 enableMipMap: 0
sRGBTexture: 1 sRGBTexture: 1
linearTexture: 0 linearTexture: 0
fadeOut: 0 fadeOut: 0
@ -35,13 +35,13 @@ TextureImporter:
filterMode: -1 filterMode: -1
aniso: -1 aniso: -1
mipBias: -100 mipBias: -100
wrapU: -1 wrapU: 1
wrapV: -1 wrapV: 1
wrapW: -1 wrapW: -1
nPOTScale: 1 nPOTScale: 0
lightmap: 0 lightmap: 0
compressionQuality: 50 compressionQuality: 50
spriteMode: 0 spriteMode: 1
spriteExtrude: 1 spriteExtrude: 1
spriteMeshType: 1 spriteMeshType: 1
alignment: 0 alignment: 0
@ -50,11 +50,13 @@ TextureImporter:
spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1 spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1 alphaUsage: 1
alphaIsTransparency: 0 alphaIsTransparency: 1
spriteTessellationDetail: -1 spriteTessellationDetail: -1
textureType: 0 textureType: 8
textureShape: 1 textureShape: 1
singleChannelComponent: 0 singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0 maxTextureSizeSet: 0
compressionQualitySet: 0 compressionQualitySet: 0
textureFormatSet: 0 textureFormatSet: 0
@ -73,13 +75,25 @@ TextureImporter:
overridden: 0 overridden: 0
androidETC2FallbackOverride: 0 androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 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: spriteSheet:
serializedVersion: 2 serializedVersion: 2
sprites: [] sprites: []
outline: [] outline: []
physicsShape: [] physicsShape: []
bones: [] bones: []
spriteID: spriteID: 5e97eb03825dee720800000000000000
internalID: 0 internalID: 0
vertices: [] vertices: []
indices: indices:

Binary file not shown.

View file

@ -6,7 +6,7 @@ TextureImporter:
serializedVersion: 11 serializedVersion: 11
mipmaps: mipmaps:
mipMapMode: 0 mipMapMode: 0
enableMipMap: 1 enableMipMap: 0
sRGBTexture: 1 sRGBTexture: 1
linearTexture: 0 linearTexture: 0
fadeOut: 0 fadeOut: 0
@ -35,13 +35,13 @@ TextureImporter:
filterMode: -1 filterMode: -1
aniso: -1 aniso: -1
mipBias: -100 mipBias: -100
wrapU: -1 wrapU: 1
wrapV: -1 wrapV: 1
wrapW: -1 wrapW: -1
nPOTScale: 1 nPOTScale: 0
lightmap: 0 lightmap: 0
compressionQuality: 50 compressionQuality: 50
spriteMode: 0 spriteMode: 1
spriteExtrude: 1 spriteExtrude: 1
spriteMeshType: 1 spriteMeshType: 1
alignment: 0 alignment: 0
@ -50,11 +50,13 @@ TextureImporter:
spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1 spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1 alphaUsage: 1
alphaIsTransparency: 0 alphaIsTransparency: 1
spriteTessellationDetail: -1 spriteTessellationDetail: -1
textureType: 0 textureType: 8
textureShape: 1 textureShape: 1
singleChannelComponent: 0 singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0 maxTextureSizeSet: 0
compressionQualitySet: 0 compressionQualitySet: 0
textureFormatSet: 0 textureFormatSet: 0
@ -63,7 +65,19 @@ TextureImporter:
platformSettings: platformSettings:
- serializedVersion: 3 - serializedVersion: 3
buildTarget: DefaultTexturePlatform buildTarget: DefaultTexturePlatform
maxTextureSize: 2048 maxTextureSize: 256
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: 256
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: -1 textureFormat: -1
textureCompression: 1 textureCompression: 1
@ -79,7 +93,7 @@ TextureImporter:
outline: [] outline: []
physicsShape: [] physicsShape: []
bones: [] bones: []
spriteID: spriteID: 5e97eb03825dee720800000000000000
internalID: 0 internalID: 0
vertices: [] vertices: []
indices: indices:

View file

@ -6,7 +6,7 @@ TextureImporter:
serializedVersion: 11 serializedVersion: 11
mipmaps: mipmaps:
mipMapMode: 0 mipMapMode: 0
enableMipMap: 1 enableMipMap: 0
sRGBTexture: 1 sRGBTexture: 1
linearTexture: 0 linearTexture: 0
fadeOut: 0 fadeOut: 0
@ -35,13 +35,13 @@ TextureImporter:
filterMode: -1 filterMode: -1
aniso: -1 aniso: -1
mipBias: -100 mipBias: -100
wrapU: -1 wrapU: 1
wrapV: -1 wrapV: 1
wrapW: -1 wrapW: -1
nPOTScale: 1 nPOTScale: 0
lightmap: 0 lightmap: 0
compressionQuality: 50 compressionQuality: 50
spriteMode: 0 spriteMode: 1
spriteExtrude: 1 spriteExtrude: 1
spriteMeshType: 1 spriteMeshType: 1
alignment: 0 alignment: 0
@ -50,11 +50,13 @@ TextureImporter:
spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1 spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1 alphaUsage: 1
alphaIsTransparency: 0 alphaIsTransparency: 1
spriteTessellationDetail: -1 spriteTessellationDetail: -1
textureType: 0 textureType: 8
textureShape: 1 textureShape: 1
singleChannelComponent: 0 singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0 maxTextureSizeSet: 0
compressionQualitySet: 0 compressionQualitySet: 0
textureFormatSet: 0 textureFormatSet: 0
@ -73,13 +75,25 @@ TextureImporter:
overridden: 0 overridden: 0
androidETC2FallbackOverride: 0 androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 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: spriteSheet:
serializedVersion: 2 serializedVersion: 2
sprites: [] sprites: []
outline: [] outline: []
physicsShape: [] physicsShape: []
bones: [] bones: []
spriteID: spriteID: 5e97eb03825dee720800000000000000
internalID: 0 internalID: 0
vertices: [] vertices: []
indices: indices:

View file

@ -6,7 +6,7 @@ TextureImporter:
serializedVersion: 11 serializedVersion: 11
mipmaps: mipmaps:
mipMapMode: 0 mipMapMode: 0
enableMipMap: 1 enableMipMap: 0
sRGBTexture: 1 sRGBTexture: 1
linearTexture: 0 linearTexture: 0
fadeOut: 0 fadeOut: 0
@ -35,13 +35,13 @@ TextureImporter:
filterMode: -1 filterMode: -1
aniso: -1 aniso: -1
mipBias: -100 mipBias: -100
wrapU: -1 wrapU: 1
wrapV: -1 wrapV: 1
wrapW: -1 wrapW: -1
nPOTScale: 1 nPOTScale: 0
lightmap: 0 lightmap: 0
compressionQuality: 50 compressionQuality: 50
spriteMode: 0 spriteMode: 1
spriteExtrude: 1 spriteExtrude: 1
spriteMeshType: 1 spriteMeshType: 1
alignment: 0 alignment: 0
@ -50,11 +50,13 @@ TextureImporter:
spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1 spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1 alphaUsage: 1
alphaIsTransparency: 0 alphaIsTransparency: 1
spriteTessellationDetail: -1 spriteTessellationDetail: -1
textureType: 0 textureType: 8
textureShape: 1 textureShape: 1
singleChannelComponent: 0 singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0 maxTextureSizeSet: 0
compressionQualitySet: 0 compressionQualitySet: 0
textureFormatSet: 0 textureFormatSet: 0
@ -63,7 +65,19 @@ TextureImporter:
platformSettings: platformSettings:
- serializedVersion: 3 - serializedVersion: 3
buildTarget: DefaultTexturePlatform buildTarget: DefaultTexturePlatform
maxTextureSize: 2048 maxTextureSize: 256
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: 256
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: -1 textureFormat: -1
textureCompression: 1 textureCompression: 1
@ -79,7 +93,7 @@ TextureImporter:
outline: [] outline: []
physicsShape: [] physicsShape: []
bones: [] bones: []
spriteID: spriteID: 5e97eb03825dee720800000000000000
internalID: 0 internalID: 0
vertices: [] vertices: []
indices: indices:

View file

@ -6,7 +6,7 @@ TextureImporter:
serializedVersion: 11 serializedVersion: 11
mipmaps: mipmaps:
mipMapMode: 0 mipMapMode: 0
enableMipMap: 1 enableMipMap: 0
sRGBTexture: 1 sRGBTexture: 1
linearTexture: 0 linearTexture: 0
fadeOut: 0 fadeOut: 0
@ -35,13 +35,13 @@ TextureImporter:
filterMode: -1 filterMode: -1
aniso: -1 aniso: -1
mipBias: -100 mipBias: -100
wrapU: -1 wrapU: 1
wrapV: -1 wrapV: 1
wrapW: -1 wrapW: -1
nPOTScale: 1 nPOTScale: 0
lightmap: 0 lightmap: 0
compressionQuality: 50 compressionQuality: 50
spriteMode: 0 spriteMode: 1
spriteExtrude: 1 spriteExtrude: 1
spriteMeshType: 1 spriteMeshType: 1
alignment: 0 alignment: 0
@ -50,11 +50,13 @@ TextureImporter:
spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1 spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1 alphaUsage: 1
alphaIsTransparency: 0 alphaIsTransparency: 1
spriteTessellationDetail: -1 spriteTessellationDetail: -1
textureType: 0 textureType: 8
textureShape: 1 textureShape: 1
singleChannelComponent: 0 singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0 maxTextureSizeSet: 0
compressionQualitySet: 0 compressionQualitySet: 0
textureFormatSet: 0 textureFormatSet: 0
@ -73,13 +75,25 @@ TextureImporter:
overridden: 0 overridden: 0
androidETC2FallbackOverride: 0 androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 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: spriteSheet:
serializedVersion: 2 serializedVersion: 2
sprites: [] sprites: []
outline: [] outline: []
physicsShape: [] physicsShape: []
bones: [] bones: []
spriteID: spriteID: 5e97eb03825dee720800000000000000
internalID: 0 internalID: 0
vertices: [] vertices: []
indices: indices:

BIN
Assets/Resources/Sprites/Indicators/crosshair1.png (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,108 @@
fileFormatVersion: 2
guid: d7a931f8856dbbc4baf9482c09aef9b5
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: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
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
- 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: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Resources/Sprites/Indicators/crosshair2.png (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,108 @@
fileFormatVersion: 2
guid: 38349fa02dd9b124e9cc0b8297207532
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: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
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
- 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: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Resources/Sprites/Indicators/crosshair3.png (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,108 @@
fileFormatVersion: 2
guid: 2f61bb4910b33e843bd899b70c62d6d4
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: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
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
- 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: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Resources/Sprites/Indicators/crosshair4.png (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,108 @@
fileFormatVersion: 2
guid: dfe5fa577b37cda4594be6b0bc3f3e8a
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: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
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
- 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: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Resources/Sprites/Indicators/crosshair5.png (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,108 @@
fileFormatVersion: 2
guid: 9730d39719943424aa7ab4e3aab9068f
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: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
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
- 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: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Resources/Sprites/Neon_Small_Knob.png (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,108 @@
fileFormatVersion: 2
guid: d23cc6ec7e0596043a4ea25708e389c6
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
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: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
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
- 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: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Resources/Sprites/area12border.png (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,108 @@
fileFormatVersion: 2
guid: 83dc7c26ab88ff54891783a590181336
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
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: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
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
- 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: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Resources/Sprites/dot.png (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,108 @@
fileFormatVersion: 2
guid: c2e79c6e20279d04881764c3a171cb17
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
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: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
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
- 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: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View file

@ -6,7 +6,7 @@ TextureImporter:
serializedVersion: 11 serializedVersion: 11
mipmaps: mipmaps:
mipMapMode: 0 mipMapMode: 0
enableMipMap: 0 enableMipMap: 1
sRGBTexture: 1 sRGBTexture: 1
linearTexture: 0 linearTexture: 0
fadeOut: 0 fadeOut: 0
@ -55,6 +55,8 @@ TextureImporter:
textureType: 8 textureType: 8
textureShape: 1 textureShape: 1
singleChannelComponent: 0 singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0 maxTextureSizeSet: 0
compressionQualitySet: 0 compressionQualitySet: 0
textureFormatSet: 0 textureFormatSet: 0
@ -63,7 +65,7 @@ TextureImporter:
platformSettings: platformSettings:
- serializedVersion: 3 - serializedVersion: 3
buildTarget: DefaultTexturePlatform buildTarget: DefaultTexturePlatform
maxTextureSize: 2048 maxTextureSize: 128
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: -1 textureFormat: -1
textureCompression: 1 textureCompression: 1
@ -75,7 +77,7 @@ TextureImporter:
forceMaximumCompressionQuality_BC6H_BC7: 0 forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3 - serializedVersion: 3
buildTarget: Standalone buildTarget: Standalone
maxTextureSize: 2048 maxTextureSize: 128
resizeAlgorithm: 0 resizeAlgorithm: 0
textureFormat: -1 textureFormat: -1
textureCompression: 1 textureCompression: 1

File diff suppressed because it is too large Load diff

View file

@ -20,6 +20,10 @@ using float2 = Unity.Mathematics.float2;
public class ActionGameManager : MonoBehaviour public class ActionGameManager : MonoBehaviour
{ {
public PlaceUIElementWorldspace ViewDot;
public PlaceUIElementWorldspace TargetIndicator;
public Prototype LockIndicator;
public PlaceUIElementWorldspace[] Crosshairs;
public EventLog EventLog; public EventLog EventLog;
public GameSettings Settings; public GameSettings Settings;
public SectorRenderer SectorRenderer; public SectorRenderer SectorRenderer;
@ -48,6 +52,8 @@ public class ActionGameManager : MonoBehaviour
// private ShipInput _shipInput; // private ShipInput _shipInput;
private float2 _shipYawPitch; private float2 _shipYawPitch;
private float3 _viewDirection; private float3 _viewDirection;
private (HardpointData[] hardpoints, Transform[] barrels, PlaceUIElementWorldspace crosshair)[] ArticulationGroups;
private (TargetLock targetLock, PlaceUIElementWorldspace indicator, Rotate spin)[] LockingIndicators;
public List<Ship> PlayerShips { get; } = new List<Ship>(); public List<Ship> PlayerShips { get; } = new List<Ship>();
public DatabaseCache ItemData { get; private set; } public DatabaseCache ItemData { get; private set; }
@ -163,6 +169,38 @@ public class ActionGameManager : MonoBehaviour
else Undock(); else Undock();
}; };
_input.Player.TargetReticle.performed += context =>
{
var underReticle = Zone.Entities.MaxBy(x => dot(normalize(x.Position - _currentShip.Position), _currentShip.LookDirection));
_currentShip.Target.Value = _currentShip.Target.Value == underReticle ? null : underReticle;
TargetIndicator.gameObject.SetActive(_currentShip.Target.Value != null);
};
_input.Player.TargetNearest.performed += context =>
{
_currentShip.Target.Value = Zone.Entities.MaxBy(x => length(x.Position - _currentShip.Position));
};
_input.Player.TargetNext.performed += context =>
{
var targets = Zone.Entities.OrderBy(x => length(x.Position - _currentShip.Position)).ToArray();
if(_currentShip.Target.Value != null)
{
var currentTargetIndex = Array.IndexOf(targets, _currentShip.Target.Value);
_currentShip.Target.Value = targets[(currentTargetIndex + 1) % targets.Length];
}
};
_input.Player.TargetPrevious.performed += context =>
{
var targets = Zone.Entities.OrderBy(x => length(x.Position - _currentShip.Position)).ToArray();
if (_currentShip.Target.Value != null)
{
var currentTargetIndex = Array.IndexOf(targets, _currentShip.Target.Value);
_currentShip.Target.Value = targets[(currentTargetIndex + targets.Length - 1) % targets.Length];
}
};
#region Trigger Groups #region Trigger Groups
_input.Player.PreviousWeaponGroup.performed += context => _input.Player.PreviousWeaponGroup.performed += context =>
@ -452,6 +490,10 @@ public class ActionGameManager : MonoBehaviour
ship.TryEquip(ItemManager.CreateInstance(autocannonData, .5f, 1) as EquippableItem); ship.TryEquip(ItemManager.CreateInstance(autocannonData, .5f, 1) as EquippableItem);
ship.TryEquip(ItemManager.CreateInstance(autocannonData, .5f, 1) as EquippableItem); ship.TryEquip(ItemManager.CreateInstance(autocannonData, .5f, 1) as EquippableItem);
var lrmmData = ItemData.GetAll<GearData>().First(x => x.Name == "LRMM72");
ship.TryEquip(ItemManager.CreateInstance(lrmmData, .5f, 1) as EquippableItem);
ship.TryEquip(ItemManager.CreateInstance(lrmmData, .5f, 1) as EquippableItem);
var cargoData = ItemData.GetAll<CargoBayData>().First(x => x.Name == "Cargo Bay 4x4"); var cargoData = ItemData.GetAll<CargoBayData>().First(x => x.Name == "Cargo Bay 4x4");
ship.TryEquip(ItemManager.CreateInstance(cargoData, .5f, 1) as EquippableItem); ship.TryEquip(ItemManager.CreateInstance(cargoData, .5f, 1) as EquippableItem);
@ -496,6 +538,8 @@ public class ActionGameManager : MonoBehaviour
Cursor.lockState = CursorLockMode.None; Cursor.lockState = CursorLockMode.None;
_input.Player.Disable(); _input.Player.Disable();
GameplayUI.SetActive(false); GameplayUI.SetActive(false);
if(LockingIndicators!=null) foreach(var (_, indicator, _) in LockingIndicators)
indicator.GetComponent<Prototype>().ReturnToPool();
} }
} }
} }
@ -506,16 +550,19 @@ public class ActionGameManager : MonoBehaviour
if (_currentShip.Parent == null) return; if (_currentShip.Parent == null) return;
if (_currentShip.GetBehavior<Cockpit>() == null) if (_currentShip.GetBehavior<Cockpit>() == null)
{ {
ConfirmationDialog.Clear();
ConfirmationDialog.Title.text = "Can't undock. Missing cockpit component!"; ConfirmationDialog.Title.text = "Can't undock. Missing cockpit component!";
ConfirmationDialog.Show(); ConfirmationDialog.Show();
} }
else if (_currentShip.GetBehavior<Thruster>() == null) else if (_currentShip.GetBehavior<Thruster>() == null)
{ {
ConfirmationDialog.Clear();
ConfirmationDialog.Title.text = "Can't undock. Missing thruster component!"; ConfirmationDialog.Title.text = "Can't undock. Missing thruster component!";
ConfirmationDialog.Show(); ConfirmationDialog.Show();
} }
else if (_currentShip.GetBehavior<Reactor>() == null) else if (_currentShip.GetBehavior<Reactor>() == null)
{ {
ConfirmationDialog.Clear();
ConfirmationDialog.Title.text = "Can't undock. Missing reactor component!"; ConfirmationDialog.Title.text = "Can't undock. Missing reactor component!";
ConfirmationDialog.Show(); ConfirmationDialog.Show();
} }
@ -528,10 +575,35 @@ public class ActionGameManager : MonoBehaviour
FollowCamera.enabled = true; FollowCamera.enabled = true;
FollowCamera.LookAt = SectorRenderer.EntityInstances[_currentShip].LookAtPoint; 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]
.GetBarrel(_currentShip.Hardpoints[item.Position.x, item.Position.y])
.GetComponentInParent<ArticulationPoint>()?.Group ?? -1)
.Select((group, index) => {
return (
group.Select(item => _currentShip.Hardpoints[item.Position.x, item.Position.y]).ToArray(),
group.Select(item => SectorRenderer.EntityInstances[_currentShip].GetBarrel(_currentShip.Hardpoints[item.Position.x, item.Position.y])).ToArray(),
Crosshairs[index]
);
}).ToArray();
foreach (var crosshair in Crosshairs)
crosshair.gameObject.SetActive(false);
foreach (var group in ArticulationGroups)
group.crosshair.gameObject.SetActive(true);
LockingIndicators = _currentShip.GetBehaviors<TargetLock>().Select(x =>
{
var i = LockIndicator.Instantiate<PlaceUIElementWorldspace>();
return (x, i, i.GetComponent<Rotate>());
}).ToArray();
Cursor.lockState = CursorLockMode.Locked; Cursor.lockState = CursorLockMode.Locked;
GameplayUI.SetActive(true); GameplayUI.SetActive(true);
_input.Player.Enable(); _input.Player.Enable();
ShipPanel.Display(_currentShip); ShipPanel.Display(_currentShip, true);
SchematicDisplay.ShowShip(_currentShip); SchematicDisplay.ShowShip(_currentShip);
} }
else else
@ -593,4 +665,37 @@ public class ActionGameManager : MonoBehaviour
Zone.Update(_time, Time.deltaTime); Zone.Update(_time, Time.deltaTime);
SectorRenderer.Time = _time; SectorRenderer.Time = _time;
} }
private void LateUpdate()
{
UpdateTargetIndicators();
}
private void UpdateTargetIndicators()
{
if (_currentShip == null || _currentShip.Parent != null) return;
ViewDot.Target = SectorRenderer.EntityInstances[_currentShip].LookAtPoint.position;
if (_currentShip.Target.Value != null)
TargetIndicator.Target = _currentShip.Target.Value.Position;
var distance = length((float3)ViewDot.Target - _currentShip.Position);
foreach (var (_, barrels, crosshair) in ArticulationGroups)
{
var averagePosition = Vector3.zero;
foreach (var barrel in barrels)
averagePosition += barrel.position + barrel.forward * distance;
averagePosition /= barrels.Length;
crosshair.Target = averagePosition;
}
foreach (var (targetLock, indicator, spin) in LockingIndicators)
{
var showLockingIndicator = targetLock.Lock > .01f && _currentShip.Target.Value != null;
indicator.gameObject.SetActive(showLockingIndicator);
if(showLockingIndicator)
indicator.Target = _currentShip.Target.Value.Position;
indicator.NoiseAmplitude = Settings.GameplaySettings.LockIndicatorNoiseAmplitude * (1 - targetLock.Lock);
indicator.NoiseFrequency = Settings.GameplaySettings.LockIndicatorFrequency.Evaluate(targetLock.Lock);
spin.Speed = Settings.GameplaySettings.LockSpinSpeed.Evaluate(targetLock.Lock);
}
}
} }

View file

@ -129,6 +129,38 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
""expectedControlType"": ""Button"", ""expectedControlType"": ""Button"",
""processors"": """", ""processors"": """",
""interactions"": """" ""interactions"": """"
},
{
""name"": ""Target Reticle"",
""type"": ""Button"",
""id"": ""86f2e6cc-b895-4c55-aa19-70220df477d2"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """"
},
{
""name"": ""Target Previous"",
""type"": ""Button"",
""id"": ""2cf8e2b2-1463-463b-8f55-e79884f3767d"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """"
},
{
""name"": ""Target Next"",
""type"": ""Button"",
""id"": ""1e2bd5af-e174-4533-8c57-b04b7e9df92c"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """"
},
{
""name"": ""Target Nearest"",
""type"": ""Button"",
""id"": ""b2a42777-c22b-48f3-9e74-8dc715449845"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """"
} }
], ],
""bindings"": [ ""bindings"": [
@ -472,6 +504,50 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
""action"": ""Fire Group 6"", ""action"": ""Fire Group 6"",
""isComposite"": false, ""isComposite"": false,
""isPartOfComposite"": false ""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""5211a58c-428b-4ee6-820d-2f67789806d6"",
""path"": ""<Keyboard>/r"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard&Mouse"",
""action"": ""Target Reticle"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""6e13d87d-e5bb-4363-b153-1e0c1e21e4eb"",
""path"": ""<Keyboard>/t"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Target Previous"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""e6e3164c-1b59-4eab-99d9-5a3bc294af0b"",
""path"": ""<Keyboard>/y"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Target Next"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""b55dd143-367d-4842-82c8-593c301bcd69"",
""path"": ""<Keyboard>/u"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard&Mouse"",
""action"": ""Target Nearest"",
""isComposite"": false,
""isPartOfComposite"": false
} }
] ]
}, },
@ -1052,6 +1128,10 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
m_Player_NextWeapon = m_Player.FindAction("Next Weapon", throwIfNotFound: true); m_Player_NextWeapon = m_Player.FindAction("Next Weapon", throwIfNotFound: true);
m_Player_PreviousWeapon = m_Player.FindAction("Previous Weapon", throwIfNotFound: true); m_Player_PreviousWeapon = m_Player.FindAction("Previous Weapon", throwIfNotFound: true);
m_Player_ToggleWeaponGroup = m_Player.FindAction("Toggle Weapon Group", throwIfNotFound: true); m_Player_ToggleWeaponGroup = m_Player.FindAction("Toggle Weapon Group", throwIfNotFound: true);
m_Player_TargetReticle = m_Player.FindAction("Target Reticle", throwIfNotFound: true);
m_Player_TargetPrevious = m_Player.FindAction("Target Previous", throwIfNotFound: true);
m_Player_TargetNext = m_Player.FindAction("Target Next", throwIfNotFound: true);
m_Player_TargetNearest = m_Player.FindAction("Target Nearest", throwIfNotFound: true);
// UI // UI
m_UI = asset.FindActionMap("UI", throwIfNotFound: true); m_UI = asset.FindActionMap("UI", throwIfNotFound: true);
m_UI_Navigate = m_UI.FindAction("Navigate", throwIfNotFound: true); m_UI_Navigate = m_UI.FindAction("Navigate", throwIfNotFound: true);
@ -1131,6 +1211,10 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
private readonly InputAction m_Player_NextWeapon; private readonly InputAction m_Player_NextWeapon;
private readonly InputAction m_Player_PreviousWeapon; private readonly InputAction m_Player_PreviousWeapon;
private readonly InputAction m_Player_ToggleWeaponGroup; private readonly InputAction m_Player_ToggleWeaponGroup;
private readonly InputAction m_Player_TargetReticle;
private readonly InputAction m_Player_TargetPrevious;
private readonly InputAction m_Player_TargetNext;
private readonly InputAction m_Player_TargetNearest;
public struct PlayerActions public struct PlayerActions
{ {
private @AetheriaInput m_Wrapper; private @AetheriaInput m_Wrapper;
@ -1149,6 +1233,10 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
public InputAction @NextWeapon => m_Wrapper.m_Player_NextWeapon; public InputAction @NextWeapon => m_Wrapper.m_Player_NextWeapon;
public InputAction @PreviousWeapon => m_Wrapper.m_Player_PreviousWeapon; public InputAction @PreviousWeapon => m_Wrapper.m_Player_PreviousWeapon;
public InputAction @ToggleWeaponGroup => m_Wrapper.m_Player_ToggleWeaponGroup; public InputAction @ToggleWeaponGroup => m_Wrapper.m_Player_ToggleWeaponGroup;
public InputAction @TargetReticle => m_Wrapper.m_Player_TargetReticle;
public InputAction @TargetPrevious => m_Wrapper.m_Player_TargetPrevious;
public InputAction @TargetNext => m_Wrapper.m_Player_TargetNext;
public InputAction @TargetNearest => m_Wrapper.m_Player_TargetNearest;
public InputActionMap Get() { return m_Wrapper.m_Player; } public InputActionMap Get() { return m_Wrapper.m_Player; }
public void Enable() { Get().Enable(); } public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); } public void Disable() { Get().Disable(); }
@ -1200,6 +1288,18 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
@ToggleWeaponGroup.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnToggleWeaponGroup; @ToggleWeaponGroup.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnToggleWeaponGroup;
@ToggleWeaponGroup.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnToggleWeaponGroup; @ToggleWeaponGroup.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnToggleWeaponGroup;
@ToggleWeaponGroup.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnToggleWeaponGroup; @ToggleWeaponGroup.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnToggleWeaponGroup;
@TargetReticle.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnTargetReticle;
@TargetReticle.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnTargetReticle;
@TargetReticle.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnTargetReticle;
@TargetPrevious.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnTargetPrevious;
@TargetPrevious.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnTargetPrevious;
@TargetPrevious.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnTargetPrevious;
@TargetNext.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnTargetNext;
@TargetNext.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnTargetNext;
@TargetNext.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnTargetNext;
@TargetNearest.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnTargetNearest;
@TargetNearest.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnTargetNearest;
@TargetNearest.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnTargetNearest;
} }
m_Wrapper.m_PlayerActionsCallbackInterface = instance; m_Wrapper.m_PlayerActionsCallbackInterface = instance;
if (instance != null) if (instance != null)
@ -1246,6 +1346,18 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
@ToggleWeaponGroup.started += instance.OnToggleWeaponGroup; @ToggleWeaponGroup.started += instance.OnToggleWeaponGroup;
@ToggleWeaponGroup.performed += instance.OnToggleWeaponGroup; @ToggleWeaponGroup.performed += instance.OnToggleWeaponGroup;
@ToggleWeaponGroup.canceled += instance.OnToggleWeaponGroup; @ToggleWeaponGroup.canceled += instance.OnToggleWeaponGroup;
@TargetReticle.started += instance.OnTargetReticle;
@TargetReticle.performed += instance.OnTargetReticle;
@TargetReticle.canceled += instance.OnTargetReticle;
@TargetPrevious.started += instance.OnTargetPrevious;
@TargetPrevious.performed += instance.OnTargetPrevious;
@TargetPrevious.canceled += instance.OnTargetPrevious;
@TargetNext.started += instance.OnTargetNext;
@TargetNext.performed += instance.OnTargetNext;
@TargetNext.canceled += instance.OnTargetNext;
@TargetNearest.started += instance.OnTargetNearest;
@TargetNearest.performed += instance.OnTargetNearest;
@TargetNearest.canceled += instance.OnTargetNearest;
} }
} }
} }
@ -1439,6 +1551,10 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
void OnNextWeapon(InputAction.CallbackContext context); void OnNextWeapon(InputAction.CallbackContext context);
void OnPreviousWeapon(InputAction.CallbackContext context); void OnPreviousWeapon(InputAction.CallbackContext context);
void OnToggleWeaponGroup(InputAction.CallbackContext context); void OnToggleWeaponGroup(InputAction.CallbackContext context);
void OnTargetReticle(InputAction.CallbackContext context);
void OnTargetPrevious(InputAction.CallbackContext context);
void OnTargetNext(InputAction.CallbackContext context);
void OnTargetNearest(InputAction.CallbackContext context);
} }
public interface IUIActions public interface IUIActions
{ {

View file

@ -8,6 +8,8 @@ public class ArticulationPoint : MonoBehaviour
{ {
public Transform Target; public Transform Target;
public int Group;
public float YawMin; public float YawMin;
public float YawMax; public float YawMax;

View file

@ -29,6 +29,8 @@ public class GameSettings : ScriptableObject
public Color HardpointHitColor; public Color HardpointHitColor;
public Color GearHitColor; public Color GearHitColor;
public Color ThermalHitColor; public Color ThermalHitColor;
public Gradient ArmorGradient;
public Gradient DurabilityGradient;
[HideInInspector] public Sprite[] ItemIcons; [HideInInspector] public Sprite[] ItemIcons;
} }

View file

@ -6,6 +6,7 @@ using UnityEngine;
using static Unity.Mathematics.math; using static Unity.Mathematics.math;
using static Unity.Mathematics.noise; using static Unity.Mathematics.noise;
using Random = UnityEngine.Random; using Random = UnityEngine.Random;
using static Noise1D;
public class GuidedProjectile : MonoBehaviour public class GuidedProjectile : MonoBehaviour
{ {
@ -41,8 +42,9 @@ public class GuidedProjectile : MonoBehaviour
_active = _alive = true; _active = _alive = true;
_phase = Random.value * 100; _phase = Random.value * 100;
_prevDist = Single.MaxValue; _prevDist = Single.MaxValue;
var main = Particles.main; Particles.startColor = Color.white;
main.startColor = Color.white; //var main = Particles.main;
//main.startColor = new ParticleSystem.MinMaxGradient { mode = ParticleSystemGradientMode.Color, color = Color.white };
Particles.Clear(true); Particles.Clear(true);
Particles.Play(true); Particles.Play(true);
} }
@ -71,8 +73,7 @@ public class GuidedProjectile : MonoBehaviour
var right = cross(dir, float3(0, 1, 0)); var right = cross(dir, float3(0, 1, 0));
var up = cross(dir, right); var up = cross(dir, right);
var dodge = normalize(lerp( var dodge = normalize(lerp(
normalize(right * snoise(position * Frequency + float3(1) * _phase) + normalize(right * noise(Time.time * Frequency + _phase) + up * noise(Time.time * Frequency + (100 + _phase))),
up * snoise(position * Frequency + float3(1) * (100 + _phase))),
Vector3.up, LiftCurve.Evaluate(curveLerp))); Vector3.up, LiftCurve.Evaluate(curveLerp)));
var desired = Vector3.Slerp(dodge, dir, GuidanceCurve.Evaluate(curveLerp)).normalized * TopSpeed; var desired = Vector3.Slerp(dodge, dir, GuidanceCurve.Evaluate(curveLerp)).normalized * TopSpeed;
var thrust = Thrust * ThrustCurve.Evaluate(curveLerp); var thrust = Thrust * ThrustCurve.Evaluate(curveLerp);
@ -80,14 +81,15 @@ public class GuidedProjectile : MonoBehaviour
} }
var ray = new Ray(t.position, Velocity); var ray = new Ray(t.position, Velocity);
if (Physics.Raycast(ray, out var hit, Velocity.magnitude, LayerMask.NameToLayer("Combat"))) if (Physics.Raycast(ray, out var hit, Velocity.magnitude * Time.deltaTime))
{ {
var hull = hit.collider.GetComponent<HullCollider>(); var hull = hit.collider.GetComponent<HullCollider>();
if (hull) if (hull)
{ {
hull.SendHit(Damage, Penetration, Spread, DamageType, SourceEntity, hit, Velocity.normalized); hull.SendHit(Damage, Penetration, Spread, DamageType, SourceEntity, hit, Velocity.normalized);
} }
StartCoroutine(Kill()); if (hit.transform.gameObject.layer == 1)
StartCoroutine(Kill());
} }
if(_alive) if(_alive)
t.position += Velocity * Time.deltaTime; t.position += Velocity * Time.deltaTime;
@ -100,8 +102,9 @@ public class GuidedProjectile : MonoBehaviour
while (Time.time - startTime < FadeOutTime) while (Time.time - startTime < FadeOutTime)
{ {
var lerp = 1 - (Time.time - startTime) / FadeOutTime; var lerp = 1 - (Time.time - startTime) / FadeOutTime;
var main = Particles.main; Particles.startColor = Color.white * lerp;
main.startColor = Color.white * lerp; //var main = Particles.main;
//main.startColor = new ParticleSystem.MinMaxGradient { mode = ParticleSystemGradientMode.Color, color = Color.white * lerp };
yield return null; yield return null;
} }

View file

@ -13,7 +13,6 @@ public class InventoryCell : MonoBehaviour
{ {
public Image Background; public Image Background;
public Image Icon; public Image Icon;
public TextMeshProUGUI Label;
public ObservablePointerClickTrigger PointerClickTrigger; public ObservablePointerClickTrigger PointerClickTrigger;
public ObservableBeginDragTrigger BeginDragTrigger; public ObservableBeginDragTrigger BeginDragTrigger;

View file

@ -236,7 +236,7 @@ public class SectorRenderer : MonoBehaviour
} }
instantWeapon.OnFire += () => instantWeapon.OnFire += () =>
_guidedProjectileManagers[launcherData].Launch(launcherData, item, instance, EntityInstances[entity.Target]); _guidedProjectileManagers[launcherData].Launch(launcherData, item, instance, EntityInstances[entity.Target.Value]);
} }
} }
} }
@ -438,6 +438,7 @@ public class SectorRenderer : MonoBehaviour
// Subtract surface damage from hardpoint armor // Subtract surface damage from hardpoint armor
entity.HardpointArmor[hardpoint] = max(entity.HardpointArmor[hardpoint] - surfaceDamage, 0); entity.HardpointArmor[hardpoint] = max(entity.HardpointArmor[hardpoint] - surfaceDamage, 0);
entity.HardpointDamage.OnNext((hardpoint, surfaceDamage));
var penetratingDamage = remainder + hit.Damage * hit.Penetration; var penetratingDamage = remainder + hit.Damage * hit.Penetration;
@ -639,10 +640,10 @@ public class SectorRenderer : MonoBehaviour
entity.Key.HardpointTransforms[x.Key] = (x.Value[0].position, x.Value[0].forward); entity.Key.HardpointTransforms[x.Key] = (x.Value[0].position, x.Value[0].forward);
} }
if (entity.Key.Target != null && !EntityInstances.ContainsKey(entity.Key.Target)) if (entity.Key.Target.Value != null && !EntityInstances.ContainsKey(entity.Key.Target.Value))
entity.Key.Target = null; entity.Key.Target.Value = null;
entity.Value.LookAtPoint.position = entity.Value.Transform.position + (Vector3) entity.Key.LookDirection * (entity.Key.Target != null entity.Value.LookAtPoint.position = entity.Value.Transform.position + (Vector3) entity.Key.LookDirection * (entity.Key.Target.Value != null
? (EntityInstances[entity.Key.Target].Transform.position - entity.Value.Transform.position).magnitude : 100); ? (EntityInstances[entity.Key.Target.Value].Transform.position - entity.Value.Transform.position).magnitude : 10000);
entity.Value.Transform.position = entity.Key.Position; entity.Value.Transform.position = entity.Key.Position;
} }

View file

@ -4,7 +4,7 @@ MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2
defaultReferences: [] defaultReferences: []
executionOrder: 300 executionOrder: 50
icon: {instanceID: 0} icon: {instanceID: 0}
userData: userData:
assetBundleName: assetBundleName:

View file

@ -15,7 +15,7 @@ using static Unity.Mathematics.noise;
public interface IBehavior public interface IBehavior
{ {
bool Update(float delta); bool Execute(float delta);
BehaviorData Data { get; } BehaviorData Data { get; }
} }
@ -42,7 +42,7 @@ public interface IInitializableBehavior
public interface IAlwaysUpdatedBehavior public interface IAlwaysUpdatedBehavior
{ {
void AlwaysUpdate(float delta); void Update(float delta);
} }
public interface IProgressBehavior public interface IProgressBehavior
@ -118,6 +118,7 @@ public abstract class PersistentBehaviorData
Union(32, typeof(CockpitData)), Union(32, typeof(CockpitData)),
Union(33, typeof(HeatsinkData)), Union(33, typeof(HeatsinkData)),
Union(34, typeof(TurretControllerData)), Union(34, typeof(TurretControllerData)),
Union(35, typeof(TargetLockData)),
JsonConverter(typeof(JsonKnownTypesConverter<BehaviorData>)), JsonObject(MemberSerialization.OptIn)] JsonConverter(typeof(JsonKnownTypesConverter<BehaviorData>)), JsonObject(MemberSerialization.OptIn)]
public abstract class BehaviorData public abstract class BehaviorData
{ {

View file

@ -51,7 +51,7 @@ public class Capacitor : IBehavior
Item = item; Item = item;
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
Capacity = Context.Evaluate(_data.Capacity, Item.EquippableItem, Entity); Capacity = Context.Evaluate(_data.Capacity, Item.EquippableItem, Entity);
Efficiency = Context.Evaluate(_data.Efficiency, Item.EquippableItem, Entity); Efficiency = Context.Evaluate(_data.Efficiency, Item.EquippableItem, Entity);

View file

@ -38,7 +38,7 @@ public class Cockpit : IBehavior
Heatstroke = 0; Heatstroke = 0;
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
if (Item.Temperature > Context.GameplaySettings.HeatstrokeTemperature) if (Item.Temperature > Context.GameplaySettings.HeatstrokeTemperature)
{ {

View file

@ -39,7 +39,7 @@ public class ConstantWeapon : IBehavior, IAlwaysUpdatedBehavior
Item = item; Item = item;
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
if (!_firing) if (!_firing)
{ {
@ -51,7 +51,7 @@ public class ConstantWeapon : IBehavior, IAlwaysUpdatedBehavior
return true; return true;
} }
public void AlwaysUpdate(float delta) public void Update(float delta)
{ {
// Update executes after AlwaysUpdate, // Update executes after AlwaysUpdate,
// so if the stop flag didn't get disabled previous frame, // so if the stop flag didn't get disabled previous frame,

View file

@ -93,7 +93,7 @@ public abstract class ControllerBase<T> : IBehavior, IController<T>, IInitializa
Moving = false; Moving = false;
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
if (Available) if (Available)
{ {

View file

@ -42,7 +42,7 @@ public class Cooldown : IBehavior, IAlwaysUpdatedBehavior, IProgressBehavior
Context = context; Context = context;
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
if (_cooldown < 0) if (_cooldown < 0)
{ {
@ -54,7 +54,7 @@ public class Cooldown : IBehavior, IAlwaysUpdatedBehavior, IProgressBehavior
} }
public void AlwaysUpdate(float delta) public void Update(float delta)
{ {
_cooldown -= delta / Context.Evaluate(_data.Cooldown, Item.EquippableItem, Entity); _cooldown -= delta / Context.Evaluate(_data.Cooldown, Item.EquippableItem, Entity);
} }

View file

@ -40,7 +40,7 @@ public class EnergyDraw : IBehavior
Context = context; Context = context;
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
Entity.Energy -= Context.Evaluate(_data.Draw, Item.EquippableItem, Entity) * (_data.PerSecond ? delta : 1); Entity.Energy -= Context.Evaluate(_data.Draw, Item.EquippableItem, Entity) * (_data.PerSecond ? delta : 1);
return true; return true;

View file

@ -82,7 +82,7 @@ public class Factory : IBehavior//, IPersistentBehavior, IPopulationAssignment
Item = item; Item = item;
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
// ToolingTime = Context.Evaluate(_data.ToolingTime, Item, Entity); // ToolingTime = Context.Evaluate(_data.ToolingTime, Item, Entity);
// var blueprint = Context.ItemData.Get<BlueprintData>(_blueprint); // var blueprint = Context.ItemData.Get<BlueprintData>(_blueprint);

View file

@ -24,11 +24,7 @@ public class HaulingControllerData : ControllerData
public class HaulingController : ControllerBase<HaulingTask>, IBehavior, IPersistentBehavior public class HaulingController : ControllerBase<HaulingTask>, IBehavior, IPersistentBehavior
{ {
public BehaviorData Data => _data;
private HaulingControllerData _data; private HaulingControllerData _data;
private ItemManager ItemManager { get; }
private Entity Entity { get; }
private EquippedItem Item { get; } private EquippedItem Item { get; }
private bool _taskStarted; private bool _taskStarted;
@ -39,13 +35,11 @@ public class HaulingController : ControllerBase<HaulingTask>, IBehavior, IPersis
public HaulingController(ItemManager itemManager, HaulingControllerData data, Entity entity, EquippedItem item) : base(itemManager, data, entity) public HaulingController(ItemManager itemManager, HaulingControllerData data, Entity entity, EquippedItem item) : base(itemManager, data, entity)
{ {
ItemManager = itemManager;
_data = data; _data = data;
Entity = entity;
Item = item; Item = item;
} }
public new bool Update(float delta) public new bool Execute(float delta)
{ {
if (Task != null) if (Task != null)
{ {
@ -56,7 +50,7 @@ public class HaulingController : ControllerBase<HaulingTask>, IBehavior, IPersis
_taskStarted = true; _taskStarted = true;
} }
} }
return base.Update(delta); return base.Execute(delta);
} }
// void OnOriginZoneArrival() // void OnOriginZoneArrival()

View file

@ -40,7 +40,7 @@ public class Heat : IBehavior
Context = context; Context = context;
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
Item.AddHeat(Context.Evaluate(_data.Heat, Item.EquippableItem, Entity) * (_data.PerSecond ? delta : 1)); Item.AddHeat(Context.Evaluate(_data.Heat, Item.EquippableItem, Entity) * (_data.PerSecond ? delta : 1));

View file

@ -35,7 +35,7 @@ public class Heatsink : IBehavior
Item = item; Item = item;
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
return true; return true;
} }

View file

@ -38,7 +38,7 @@ public class Hitscan : IBehavior
Item = item; Item = item;
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
// TODO: Implement hitscan weapons! // TODO: Implement hitscan weapons!
Range = Context.Evaluate(_data.Range, Item.EquippableItem, Entity); Range = Context.Evaluate(_data.Range, Item.EquippableItem, Entity);

View file

@ -37,7 +37,7 @@ public class ItemUsage : IBehavior
Context = context; Context = context;
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
var cargo = Entity.FindItemInCargo(_data.Item); var cargo = Entity.FindItemInCargo(_data.Item);
if (cargo == null) return false; if (cargo == null) return false;

View file

@ -21,143 +21,17 @@ public class LauncherData : InstantWeaponData
[InspectableField, JsonProperty("thrust"), Key(12)] [InspectableField, JsonProperty("thrust"), Key(12)]
public PerformanceStat Thrust = new PerformanceStat(); public PerformanceStat Thrust = new PerformanceStat();
[InspectableField, JsonProperty("lockAngle"), Key(13)] [InspectableField, JsonProperty("frequency"), Key(13)]
public float LockAngle;
[InspectableField, JsonProperty("frequency"), Key(14)]
public float DodgeFrequency; public float DodgeFrequency;
[InspectableField, JsonProperty("launchSpeed"), Key(15)] [InspectableField, JsonProperty("launchSpeed"), Key(14)]
public PerformanceStat LaunchSpeed = new PerformanceStat(); public PerformanceStat LaunchSpeed = new PerformanceStat();
[InspectableField, JsonProperty("missileSpeed"), Key(16)] [InspectableField, JsonProperty("missileSpeed"), Key(15)]
public PerformanceStat MissileSpeed = new PerformanceStat(); public PerformanceStat MissileSpeed = new PerformanceStat();
[InspectableField, JsonProperty("lockOnTime"), Key(17)]
public PerformanceStat LockOnTime = new PerformanceStat();
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item) public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)
{ {
return new InstantWeapon(context, this, entity, item); return new InstantWeapon(context, this, entity, item);
} }
} }
public class Launcher : IBehavior, IAlwaysUpdatedBehavior
{
private bool _locking;
private float _lockingTimer;
private float _cooldown; // normalized
private bool _locked;
private LauncherData _data;
private Entity Entity { get; }
private EquippedItem Item { get; }
private ItemManager Context { get; }
private float _firingVisibility;
public BehaviorData Data => _data;
public Launcher(ItemManager context, LauncherData m, Entity entity, EquippedItem item)
{
Context = context;
_data = m;
Entity = entity;
Item = item;
// _audio = hp.Proxy.GetComponent<AudioSource>();
// if(_audio==null)
// _audio = hp.Proxy.gameObject.AddComponent<AudioSource>();
// _audio.clip = _launcher.BeepSound;
// _audio.loop = true;
// _audio.volume = .5f;
}
public bool Activate()
{
_locking = true;
_lockingTimer = 1;
return true;
}
public void Deactivate()
{
// if (_lockingTimer < 0)
// {
// Fire(0);
// if(_launcher.BurstCount>1)
// Observable.Interval(TimeSpan.FromSeconds(_launcher.BurstTime.Evaluate(Hardpoint) / (_launcher.BurstCount-1))).Take(_launcher.BurstCount-1)
// .Subscribe(l => Fire(l+1));
// _lockingTimer = _cooldown = 1;
// _locking = _locked = false;
// _audio.Stop();
// }
// _locking = false;
// _lockingTimer = 1;
}
public bool Update(float delta)
{
// _firingVisibility += _launcher.Visibility.Evaluate(Hardpoint);
// Hardpoint.Temperature += _launcher.Heat.Evaluate(Hardpoint) / Hardpoint.HeatCapacity;
// var inst = GameObject.Instantiate(_launcher.MissilePrefab).transform;
// var missile = inst.GetComponent<Bullet>();
// missile.Target = Hardpoint.Ship.Ship.Target;
// missile.Source = Hardpoint.Ship.Ship.Hitpoints;
// missile.Lifetime = _launcher.Range.Evaluate(Hardpoint) / _launcher.MissileSpeed.Evaluate(Hardpoint);
// missile.Damage = _launcher.Damage.Evaluate(Hardpoint);
// inst.position = Hardpoint.Proxy.position;
// inst.rotation = Hardpoint.Proxy.rotation;
// inst.GetComponent<Rigidbody>().velocity = _launcher.LaunchSpeed.Evaluate(Hardpoint) * Hardpoint.Proxy.forward;
// Physics.IgnoreCollision(Hardpoint.Ship.Ship.GetComponent<Collider>(), inst.GetComponent<Collider>());
// var proj = inst.gameObject.AddComponent<GuidedProjectile>();
// proj.GuidanceCurve = _launcher.GuidanceCurve;
// proj.ThrustCurve = _launcher.ThrustCurve;
// proj.LiftCurve = _launcher.LiftCurve;
// proj.TopSpeed = _launcher.MissileSpeed.Evaluate(Hardpoint);
// proj.Frequency = _launcher.DodgeFrequency;
// proj.Target = Hardpoint.Ship.Ship.Target;
// proj.Source = Hardpoint.Ship.Ship.Hitpoints;
// proj.Thrust = _launcher.Thrust.Evaluate(Hardpoint);
// _audio.PlayOneShot(_launcher.Sounds.RandomElement());
// Debug.Log($"Firing bullet {b}");
return true;
}
public void AlwaysUpdate(float delta)
{
// if (Ship.Target == null)
// return;
//
// if (_locking && _cooldown < 0)
// {
// //if the crosshair stays under a certain LockOnBuffer distance for a certain amount of time (LockOnTime)
// if (acos(Vector2.Dot(Ship.Direction, (Ship.Target.transform.position-Ship.transform.position).normalized)) * Mathf.Rad2Deg < _launcher.LockOnDegrees)
// {
// var d = delta / _launcher.LockOnTime.Evaluate(Hardpoint);
// _lockingTimer -= d;
// if (!_locked && _lockingTimer < 0)
// {
// _locked = true;
// _audio.Play();
// } else if(Mathf.Repeat(_lockingTimer,1.0f/(_launcher.Beeps+1))-d<0)
// GameManager.Instance.InterfaceAudio.PlayOneShot(_launcher.BeepSound);
// }
// else
// {
// _lockingTimer = 1;
// _audio.Stop();
// }
// }
// else
// {
// _cooldown -= delta / _launcher.Cooldown.Evaluate(Hardpoint);
// }
//
//
// if (_firingVisibility > 0.01f)
// {
// Hardpoint.Ship.Visibility += _firingVisibility;
// _firingVisibility = 0;
// }
}
}

View file

@ -22,7 +22,6 @@ public class MiningControllerData : ControllerData
public class MiningController : ControllerBase<Mining>, IBehavior, IPersistentBehavior, IInitializableBehavior public class MiningController : ControllerBase<Mining>, IBehavior, IPersistentBehavior, IInitializableBehavior
{ {
public BehaviorData Data => _data;
private MiningControllerData _data; private MiningControllerData _data;
private EquippedItem Item { get; } private EquippedItem Item { get; }
@ -44,7 +43,7 @@ public class MiningController : ControllerBase<Mining>, IBehavior, IPersistentBe
base.Initialize(); base.Initialize();
} }
public new bool Update(float delta) public new bool Execute(float delta)
{ {
// if (Task != null) // if (Task != null)
// { // {
@ -88,7 +87,7 @@ public class MiningController : ControllerBase<Mining>, IBehavior, IPersistentBe
// } // }
// } // }
// } // }
return base.Update(delta); return base.Execute(delta);
} }
// private void OnArriveHome() // private void OnArriveHome()

View file

@ -52,7 +52,7 @@ public class MiningTool : IBehavior
Context = context; Context = context;
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
Range = Context.Evaluate(_data.Range, Item.EquippableItem, Entity); Range = Context.Evaluate(_data.Range, Item.EquippableItem, Entity);
var asteroidTransform = Entity.Zone.GetAsteroidTransform(AsteroidBelt, Asteroid); var asteroidTransform = Entity.Zone.GetAsteroidTransform(AsteroidBelt, Asteroid);

View file

@ -45,7 +45,7 @@ public class PatrolController : IBehavior, IInitializableBehavior
RandomTarget(); RandomTarget();
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
_locomotion.Objective = Entity.Zone.GetOrbitPosition(_targetOrbit); _locomotion.Objective = Entity.Zone.GetOrbitPosition(_targetOrbit);
_locomotion.Update(delta); _locomotion.Update(delta);

View file

@ -37,7 +37,7 @@ public class Radiance : IBehavior
Context = context; Context = context;
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
// TODO: Light system! // TODO: Light system!
return true; return true;

View file

@ -39,7 +39,7 @@ public class Radiator : IBehavior
Item = item; Item = item;
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
Emissivity = Context.Evaluate(_data.Emissivity, Item.EquippableItem, Entity); Emissivity = Context.Evaluate(_data.Emissivity, Item.EquippableItem, Entity);
var rad = pow(Item.Temperature, Context.GameplaySettings.HeatRadiationExponent) * Context.GameplaySettings.HeatRadiationMultiplier * Emissivity; var rad = pow(Item.Temperature, Context.GameplaySettings.HeatRadiationExponent) * Context.GameplaySettings.HeatRadiationMultiplier * Emissivity;

View file

@ -62,7 +62,7 @@ public class Reactor : IBehavior, IOrderedBehavior
}); });
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
var charge = Context.Evaluate(_data.Charge, Item.EquippableItem, Entity) * delta; var charge = Context.Evaluate(_data.Charge, Item.EquippableItem, Entity) * delta;
var efficiency = Context.Evaluate(_data.Efficiency, Item.EquippableItem, Entity); var efficiency = Context.Evaluate(_data.Efficiency, Item.EquippableItem, Entity);

View file

@ -40,7 +40,7 @@ public class Reflector : IBehavior
Item = item; Item = item;
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
// TODO: Light system! // TODO: Light system!
return true; return true;

View file

@ -65,7 +65,7 @@ public class ResourceScanner : IBehavior, IAlwaysUpdatedBehavior
Context = context; Context = context;
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
var planetData = Context.ItemData.Get<BodyData>(ScanTarget); var planetData = Context.ItemData.Get<BodyData>(ScanTarget);
if (planetData != null) if (planetData != null)
@ -103,7 +103,7 @@ public class ResourceScanner : IBehavior, IAlwaysUpdatedBehavior
return false; return false;
} }
public void AlwaysUpdate(float delta) public void Update(float delta)
{ {
Range = Context.Evaluate(_data.Range, Item.EquippableItem, Entity); Range = Context.Evaluate(_data.Range, Item.EquippableItem, Entity);
MinimumDensity = Context.Evaluate(_data.MinimumDensity, Item.EquippableItem, Entity); MinimumDensity = Context.Evaluate(_data.MinimumDensity, Item.EquippableItem, Entity);

View file

@ -35,7 +35,7 @@ public class Sensor : IBehavior
Context = context; Context = context;
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
// TODO: Handle Active Detection / Visibility From Reflected Radiance // TODO: Handle Active Detection / Visibility From Reflected Radiance
return true; return true;

View file

@ -42,7 +42,7 @@ public class Shield : IBehavior
// TODO: Detect hits on Ship, keep a list of callbacks that modify the hit by reference // TODO: Detect hits on Ship, keep a list of callbacks that modify the hit by reference
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
return true; return true;
} }

View file

@ -81,7 +81,7 @@ public class StatModifier : IBehavior, IInitializableBehavior, IDisposableBehavi
} }
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
foreach (var stat in _stats) foreach (var stat in _stats)
(_data.Type == StatModifierType.Constant (_data.Type == StatModifierType.Constant

View file

@ -24,7 +24,6 @@ public class SurveyControllerData : ControllerData
public class SurveyController : ControllerBase<Survey>, IBehavior, IPersistentBehavior, IInitializableBehavior public class SurveyController : ControllerBase<Survey>, IBehavior, IPersistentBehavior, IInitializableBehavior
{ {
private EquippedItem Item { get; } private EquippedItem Item { get; }
public BehaviorData Data => _data;
private SurveyControllerData _data; private SurveyControllerData _data;
private bool _taskStarted; private bool _taskStarted;
@ -46,7 +45,7 @@ public class SurveyController : ControllerBase<Survey>, IBehavior, IPersistentBe
base.Initialize(); base.Initialize();
} }
public new bool Update(float delta) public new bool Execute(float delta)
{ {
// var corporation = _context.ItemData.Get<Corporation>(_entity.Corporation); // var corporation = _context.ItemData.Get<Corporation>(_entity.Corporation);
// if (surveyTask != null) // if (surveyTask != null)
@ -103,7 +102,7 @@ public class SurveyController : ControllerBase<Survey>, IBehavior, IPersistentBe
// } // }
// } // }
// } // }
return base.Update(delta); return base.Execute(delta);
} }
private void NextPlanet() private void NextPlanet()

View file

@ -36,7 +36,7 @@ public class Switch : IBehavior
Context = context; Context = context;
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
return Activated; return Activated;
} }

View file

@ -0,0 +1,87 @@
/* 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.Collections.Generic;
using MessagePack;
using Newtonsoft.Json;
using Unity.Mathematics;
using static Unity.Mathematics.math;
[MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(-11), RuntimeInspectable]
public class TargetLockData : BehaviorData
{
[InspectableField, JsonProperty("speed"), Key(1), RuntimeInspectable]
public PerformanceStat Speed = new PerformanceStat();
[InspectableField, JsonProperty("sensorImpact"), Key(2), RuntimeInspectable]
public PerformanceStat SensorImpact = new PerformanceStat();
[InspectableField, JsonProperty("threshold"), Key(3), RuntimeInspectable]
public PerformanceStat Threshold = new PerformanceStat();
[InspectableField, JsonProperty("directionImpact"), Key(4), RuntimeInspectable]
public PerformanceStat DirectionImpact = new PerformanceStat();
[InspectableField, JsonProperty("decay"), Key(5), RuntimeInspectable]
public PerformanceStat Decay = new PerformanceStat();
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)
{
return new TargetLock(context, this, entity, item);
}
}
public class TargetLock : IBehavior, IAlwaysUpdatedBehavior
{
private TargetLockData _data;
public Entity Entity { get; }
public EquippedItem Item { get; }
public ItemManager Context { get; }
public BehaviorData Data => _data;
public float Lock { get; private set; }
public float Speed { get; private set; }
public float SensorImpact { get; private set; }
public float Threshold { get; private set; }
public float DirectionImpact { get; private set; }
public float Decay { get; private set; }
public TargetLock(ItemManager context, TargetLockData data, Entity entity, EquippedItem item)
{
Context = context;
_data = data;
Entity = entity;
Item = item;
}
public bool Execute(float delta)
{
// TODO: Hook into sensory systems to influence lock speed
return Lock > .99f;
}
public void Update(float delta)
{
if (Entity.Target.Value != null)
{
Speed = Context.Evaluate(_data.Speed, Item.EquippableItem, Entity);
SensorImpact = Context.Evaluate(_data.SensorImpact, Item.EquippableItem, Entity);
Threshold = Context.Evaluate(_data.Threshold, Item.EquippableItem, Entity);
DirectionImpact = Context.Evaluate(_data.DirectionImpact, Item.EquippableItem, Entity);
Decay = Context.Evaluate(_data.Decay, Item.EquippableItem, Entity);
var degrees = acos(dot(normalize(Entity.Target.Value.Position - Entity.Position), normalize(Entity.LookDirection))) * 57.2958f;
if (degrees < Threshold)
{
var lerp = 1 - unlerp(0, 90, degrees);
Lock = saturate(Lock + pow(lerp, DirectionImpact) * delta * Speed);
return;
}
}
Lock = saturate(Lock - Decay * delta);
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7d1880b94a9e9f74e9c13be8d5fd8dee
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -42,7 +42,7 @@ public class Thermotoggle : IBehavior
TargetTemperature = data.TargetTemperature; TargetTemperature = data.TargetTemperature;
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
return Item.Temperature < TargetTemperature ^ _data.HighPass; return Item.Temperature < TargetTemperature ^ _data.HighPass;
} }

View file

@ -63,7 +63,7 @@ public class Thruster : IAnalogBehavior
Torque = -dot(toCenter, float2(1, 0).Rotate(item.EquippableItem.Rotation)); Torque = -dot(toCenter, float2(1, 0).Rotate(item.EquippableItem.Rotation));
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
Thrust = Context.Evaluate(_data.Thrust, Item.EquippableItem, Entity); Thrust = Context.Evaluate(_data.Thrust, Item.EquippableItem, Entity);
Entity.Velocity -= Entity.Direction.Rotate(Item.EquippableItem.Rotation) * _input * Thrust / Entity.Mass * delta; Entity.Velocity -= Entity.Direction.Rotate(Item.EquippableItem.Rotation) * _input * Thrust / Entity.Mass * delta;

View file

@ -22,7 +22,6 @@ public class TowingControllerData : ControllerData
public class TowingController : ControllerBase<StationTowing>, IBehavior, IPersistentBehavior public class TowingController : ControllerBase<StationTowing>, IBehavior, IPersistentBehavior
{ {
public BehaviorData Data => _data;
private TowingControllerData _data; private TowingControllerData _data;
private EquippedItem Item { get; } private EquippedItem Item { get; }
@ -34,7 +33,7 @@ public class TowingController : ControllerBase<StationTowing>, IBehavior, IPersi
Item = item; Item = item;
} }
public new bool Update(float delta) public new bool Execute(float delta)
{ {
if (Task != null) if (Task != null)
{ {
@ -44,7 +43,7 @@ public class TowingController : ControllerBase<StationTowing>, IBehavior, IPersi
_taskStarted = true; _taskStarted = true;
} }
} }
return base.Update(delta); return base.Execute(delta);
} }
// void OnZoneArrival() // void OnZoneArrival()

View file

@ -45,7 +45,7 @@ public class Trigger : IBehavior
{ {
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
if (_pulled) if (_pulled)
{ {

View file

@ -57,7 +57,7 @@ public class Turning : IAnalogBehavior
{ {
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
Torque = Context.Evaluate(_data.Torque, Item.EquippableItem, Entity); Torque = Context.Evaluate(_data.Torque, Item.EquippableItem, Entity);
Entity.Direction = mul(Entity.Direction, Unity.Mathematics.float2x2.Rotate(_input * Torque / Entity.Mass * delta)); Entity.Direction = mul(Entity.Direction, Unity.Mathematics.float2x2.Rotate(_input * Torque / Entity.Mass * delta));

View file

@ -66,11 +66,11 @@ public class TurretController : IBehavior
} }
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
if (EquippedEntity.Target != null) if (EquippedEntity.Target.Value != null)
{ {
var diff = EquippedEntity.Target.Position - EquippedEntity.Position; var diff = EquippedEntity.Target.Value.Position - EquippedEntity.Position;
EquippedEntity.LookDirection = normalize(diff); EquippedEntity.LookDirection = normalize(diff);
var dist = length(diff); var dist = length(diff);
@ -86,7 +86,7 @@ public class TurretController : IBehavior
} }
else else
{ {
EquippedEntity.Target = EquippedEntity.Zone.Entities.FirstOrDefault(e => e is Ship); EquippedEntity.Target.Value = EquippedEntity.Zone.Entities.FirstOrDefault(e => e is Ship);
} }
return true; return true;
} }

View file

@ -41,7 +41,7 @@ public class VelocityConversion : IBehavior
{ {
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
return true; return true;
} }

View file

@ -44,7 +44,7 @@ public class VelocityLimit : IBehavior
{ {
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
Limit = Context.Evaluate(_data.TopSpeed, Item.EquippableItem, Entity); Limit = Context.Evaluate(_data.TopSpeed, Item.EquippableItem, Entity);
if (length(Entity.Velocity) > Limit) if (length(Entity.Velocity) > Limit)

View file

@ -42,13 +42,13 @@ public class Visibility : IBehavior, IAlwaysUpdatedBehavior
Context = context; Context = context;
} }
public bool Update(float delta) public bool Execute(float delta)
{ {
Entity.VisibilitySources[this] = Context.Evaluate(_data.Visibility, Item.EquippableItem, Entity); Entity.VisibilitySources[this] = Context.Evaluate(_data.Visibility, Item.EquippableItem, Entity);
return true; return true;
} }
public void AlwaysUpdate(float delta) public void Update(float delta)
{ {
// TODO: Time independent decay? // TODO: Time independent decay?
if(Entity.VisibilitySources.ContainsKey(this)) if(Entity.VisibilitySources.ContainsKey(this))

View file

@ -27,7 +27,6 @@ public class WanderControllerData : ControllerData
public class WanderController : ControllerBase<WanderTask>, IBehavior public class WanderController : ControllerBase<WanderTask>, IBehavior
{ {
public WanderTarget WanderTarget; public WanderTarget WanderTarget;
public BehaviorData Data => _data;
private WanderControllerData _data; private WanderControllerData _data;
private EquippedItem Item { get; } private EquippedItem Item { get; }
@ -40,7 +39,7 @@ public class WanderController : ControllerBase<WanderTask>, IBehavior
Item = item; Item = item;
} }
public new bool Update(float delta) public new bool Execute(float delta)
{ {
if (!Moving && _dockTime < 0) if (!Moving && _dockTime < 0)
{ {
@ -48,7 +47,7 @@ public class WanderController : ControllerBase<WanderTask>, IBehavior
} }
_dockTime -= delta; _dockTime -= delta;
return base.Update(delta); return base.Execute(delta);
} }
private void NextTarget() private void NextTarget()

View file

@ -65,53 +65,29 @@ public class InstantWeapon : IBehavior, IAlwaysUpdatedBehavior
Item = item; Item = item;
} }
// private void Fire() public bool Execute(float delta)
// {
// Hardpoint.Temperature += _projectileWeapon.Heat.Evaluate(Hardpoint) / Hardpoint.HeatCapacity;
// var inst = GameObject.Instantiate(_projectileWeapon.BulletPrefab).transform;
// Physics.IgnoreCollision(Hardpoint.Ship.Ship.GetComponent<Collider>(), inst.GetComponent<Collider>());
// var bullet = inst.GetComponent<Bullet>();
// bullet.Target = Hardpoint.Ship.Ship.Target;
// bullet.Source = Hardpoint.Ship.Ship.Hitpoints;
// bullet.Lifetime = _projectileWeapon.Range.Evaluate(Hardpoint) / _projectileWeapon.Velocity.Evaluate(Hardpoint);
// bullet.Damage = _projectileWeapon.Damage.Evaluate(Hardpoint);
// inst.position = Hardpoint.Proxy.position;
// inst.rotation = Hardpoint.Proxy.rotation;
// inst.GetComponent<Rigidbody>().velocity = _projectileWeapon.Velocity.Evaluate(Hardpoint) * Vector3.RotateTowards(-inst.forward, Hardpoint.Ship.Ship.Direction, _projectileWeapon.Deflection * Mathf.Deg2Rad, 1);
// Hardpoint.Ship.Ship.AudioSource.PlayOneShot(_projectileWeapon.Sounds.RandomElement());
// Debug.Log($"Firing bullet {b}");
// }
public bool Update(float delta)
{ {
_burstCount = _data.BurstCount;
_burstTime = Context.Evaluate(_data.BurstTime, Item.EquippableItem, Entity) / _burstCount; _burstTime = Context.Evaluate(_data.BurstTime, Item.EquippableItem, Entity) / _burstCount;
if (_burstTime < .01f) _burstTimer = 0;
{ Fire(delta);
for(int i=0; i<_data.BurstCount; i++)
OnFire?.Invoke();
}
else
{
_burstCount = _data.BurstCount;
Fire();
}
return true; return true;
} }
private void Fire() private void Fire(float delta)
{ {
_burstCount--; _burstTimer -= delta;
_burstTimer = _burstTime; while (_burstTimer < 0 && _burstCount > 0)
OnFire?.Invoke();
}
public void AlwaysUpdate(float delta)
{
if(_burstCount > 0)
{ {
_burstTimer -= delta; _burstCount--;
if(_burstTimer < 0) _burstTimer += _burstTime;
Fire(); OnFire?.Invoke();
} }
} }
public void Update(float delta)
{
if(_burstCount > 0)
Fire(delta);
}
} }

View file

@ -38,7 +38,7 @@ public abstract class Entity
public Entity Parent; public Entity Parent;
public List<Entity> Children = new List<Entity>(); public List<Entity> Children = new List<Entity>();
public Entity Target; public ReactiveProperty<Entity> Target = new ReactiveProperty<Entity>((Entity)null);
public float3 LookDirection; public float3 LookDirection;
@ -75,6 +75,11 @@ public abstract class Entity
public Subject<(EquippedItem item, float damage)> ItemDamage = new Subject<(EquippedItem, float)>(); public Subject<(EquippedItem item, float damage)> ItemDamage = new Subject<(EquippedItem, float)>();
public Subject<float> HullDamage = new Subject<float>(); public Subject<float> HullDamage = new Subject<float>();
public UniRx.IObservable<EquippedItem> ItemDestroyed;
public UniRx.IObservable<int2> HullArmorDepleted;
public UniRx.IObservable<HardpointData> HardpointArmorDepleted;
public bool Active public bool Active
{ {
get => _active; get => _active;
@ -106,6 +111,10 @@ public abstract class Entity
TriggerGroups = new List<EquippedItem>[itemManager.GameplaySettings.TriggerGroupCount]; TriggerGroups = new List<EquippedItem>[itemManager.GameplaySettings.TriggerGroupCount];
for(int i=0; i<itemManager.GameplaySettings.TriggerGroupCount; i++) for(int i=0; i<itemManager.GameplaySettings.TriggerGroupCount; i++)
TriggerGroups[i] = new List<EquippedItem>(); TriggerGroups[i] = new List<EquippedItem>();
ItemDestroyed = ItemDamage.Where(x => x.item.EquippableItem.Durability < .01f).Select(x=>x.item);
HullArmorDepleted = ArmorDamage.Where(x => Armor[x.pos.x, x.pos.y] < .01f).Select(x => x.pos);
HardpointArmorDepleted = HardpointDamage.Where(x => HardpointArmor[x.hardpoint] < .01f).Select(x => x.hardpoint);
} }
private void MapEntity() private void MapEntity()
@ -523,7 +532,7 @@ public abstract class Entity
heatTransfer += (Temperature[v.x, v.y - 1] - temp) * Conductivity[v.x, v.y].z * Conductivity[v.x, v.y - 1].x; heatTransfer += (Temperature[v.x, v.y - 1] - temp) * Conductivity[v.x, v.y].z * Conductivity[v.x, v.y - 1].x;
if (v.y < hullData.Shape.Height - 1) if (v.y < hullData.Shape.Height - 1)
heatTransfer += (Temperature[v.x, v.y + 1] - temp) * Conductivity[v.x, v.y].x * Conductivity[v.x, v.y + 1].z;; heatTransfer += (Temperature[v.x, v.y + 1] - temp) * Conductivity[v.x, v.y].x * Conductivity[v.x, v.y + 1].z;
newTemp[v.x, v.y] = Temperature[v.x, v.y] + heatTransfer * min(ItemManager.GameplaySettings.HeatConductionMultiplier * delta,1) / ThermalMass[v.x,v.y]; newTemp[v.x, v.y] = Temperature[v.x, v.y] + heatTransfer * min(ItemManager.GameplaySettings.HeatConductionMultiplier * delta,1) / ThermalMass[v.x,v.y];
@ -617,6 +626,8 @@ public class EquippedItem
public int SortPosition; public int SortPosition;
public bool Online => EquippableItem.Durability > .01f && Temperature > _data.MinimumTemperature && Temperature < _data.MaximumTemperature;
public float Temperature public float Temperature
{ {
get get
@ -673,23 +684,27 @@ public class EquippedItem
public void Update(float delta) public void Update(float delta)
{ {
// if(Temperature < _data.MinimumTemperature || Temperature > _data.MaximumTemperature)
// { if (Temperature < _data.MinimumTemperature || Temperature > _data.MaximumTemperature)
// EquippableItem.Durability -= delta; {
// return; EquippableItem.Durability -= delta;
// } }
foreach (var behavior in Behaviors.Where(b => b is IAlwaysUpdatedBehavior).Cast<IAlwaysUpdatedBehavior>()) foreach (var behavior in Behaviors.Where(b => b is IAlwaysUpdatedBehavior).Cast<IAlwaysUpdatedBehavior>())
behavior.AlwaysUpdate(delta); behavior.Update(delta);
foreach (var group in BehaviorGroups) if (Online)
{ {
foreach (var behavior in group.Behaviors) foreach (var group in BehaviorGroups)
{ {
if (!behavior.Update(delta)) foreach (var behavior in group.Behaviors)
break; {
if (!behavior.Execute(delta))
break;
}
} }
} }
} }
} }

View file

@ -0,0 +1,34 @@

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Unity.Mathematics;
using static Unity.Mathematics.math;
public static class Noise1D
{
private const float HASHSCALE = 0.1031f;
static float hash(float p)
{
float3 p3 = frac(float3(p) * HASHSCALE);
p3 += dot(p3, p3.yzx + 19.19f);
return frac((p3.x + p3.y) * p3.z);
}
static float fade(float t) { return t * t * t * (t * (6f* t - 15f) + 10f); }
static float grad(float hash, float p)
{
int i = (int)(1e4 * hash);
return (i & 1) == 0 ? p : -p;
}
public static float noise(float p)
{
float pi = floor(p), pf = p - pi, w = fade(pf);
return lerp(grad(hash(pi), pf), grad(hash(pi + 1.0f), pf - 1.0f), w) * 2.0f;
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 622b46440effa29418055a226c3db195
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -104,4 +104,7 @@ public class GameplaySettings
public float HeatstrokeExponent = 2; public float HeatstrokeExponent = 2;
public float HeatstrokeRecoverySpeed = .2f; public float HeatstrokeRecoverySpeed = .2f;
public float HeatstrokeControlLimit = .75f; public float HeatstrokeControlLimit = .75f;
public float LockIndicatorNoiseAmplitude = 50f;
public ExponentialLerp LockIndicatorFrequency;
public ExponentialLerp LockSpinSpeed;
} }

View file

@ -62,7 +62,7 @@ public class Ship : Entity
foreach (var thruster in _reverseThrusters) thruster.Axis += -MovementDirection.y; foreach (var thruster in _reverseThrusters) thruster.Axis += -MovementDirection.y;
var deltaRot = dot(normalize(LookDirection.xz), normalize(Direction).Rotate(ItemRotation.Clockwise)); var deltaRot = dot(normalize(LookDirection.xz), normalize(Direction).Rotate(ItemRotation.Clockwise));
if (abs(deltaRot) < .01) deltaRot = 0; if (abs(deltaRot) < .0001) deltaRot = 0;
deltaRot = pow(abs(deltaRot), .5f) * sign(deltaRot); deltaRot = pow(abs(deltaRot), .5f) * sign(deltaRot);
foreach (var thruster in _clockwiseThrusters) thruster.Axis += deltaRot; foreach (var thruster in _clockwiseThrusters) thruster.Axis += deltaRot;

View file

@ -34,8 +34,8 @@ public class InventoryPanel : MonoBehaviour
public ExponentialLerp TemperatureAlphaCurve; public ExponentialLerp TemperatureAlphaCurve;
public float MaxTemperature; public float MaxTemperature;
public bool FitToContent; public bool FitToContent;
public float CellHealthPersistDuration; public float CellHitPulseTime;
public float CellHealthFadeTime; public Color CellBackgroundColor = new Color(0, 0, 0, .75f);
Subject<InventoryEventData> _onBeginDrag; Subject<InventoryEventData> _onBeginDrag;
Subject<InventoryEventData> _onDrag; Subject<InventoryEventData> _onDrag;
@ -57,8 +57,10 @@ public class InventoryPanel : MonoBehaviour
public Dictionary<int2, InventoryCell> CellInstances = new Dictionary<int2, InventoryCell>(); public Dictionary<int2, InventoryCell> CellInstances = new Dictionary<int2, InventoryCell>();
private List<IDisposable> _subscriptions = new List<IDisposable>(); private List<IDisposable> _subscriptions = new List<IDisposable>();
private Dictionary<int2, float> _cellHealthFadeoutTime = new Dictionary<int2, float>(); private Dictionary<int2, int> _cellAnimationSequence = new Dictionary<int2, int>();
private Dictionary<int2, Dictionary<HitType, string>> _cellQueuedLabels = new Dictionary<int2, Dictionary<HitType, string>>(); private int _hitSequence = 0;
private bool _hud;
private int2[] _offsets = { private int2[] _offsets = {
int2(0, 1), int2(0, 1),
@ -123,33 +125,6 @@ public class InventoryPanel : MonoBehaviour
} }
_temperatureTexture.Apply(); _temperatureTexture.Apply();
TemperatureDisplay.rectTransform.anchoredPosition = _firstRect.anchoredPosition - Vector2.one * Grid.cellSize * 1.5f; TemperatureDisplay.rectTransform.anchoredPosition = _firstRect.anchoredPosition - Vector2.one * Grid.cellSize * 1.5f;
foreach (var damagedCell in _cellHealthFadeoutTime.Keys.ToArray())
{
var fadeoutTime = _cellHealthFadeoutTime[damagedCell];
if (fadeoutTime < Time.time)
{
StartCoroutine(FadeOutLabel(CellInstances[damagedCell]));
_cellHealthFadeoutTime.Remove(damagedCell);
_cellQueuedLabels[damagedCell].Clear();
continue;
}
var queuedLabels = _cellQueuedLabels[damagedCell];
var currentLabel = queuedLabels.ElementAt((int) ((fadeoutTime - Time.time) / CellHealthPersistDuration * queuedLabels.Count));
if (CellInstances[damagedCell].Label.text != currentLabel.Value)
{
CellInstances[damagedCell].Label.text = currentLabel.Value;
CellInstances[damagedCell].Label.color = currentLabel.Key switch
{
HitType.Armor => Settings.ArmorHitColor,
HitType.Hardpoint => Settings.HardpointHitColor,
HitType.Gear => Settings.GearHitColor,
HitType.Thermal => Settings.ThermalHitColor,
_ => Color.white
};
}
}
} }
} }
@ -167,8 +142,6 @@ public class InventoryPanel : MonoBehaviour
Destroy(empty); Destroy(empty);
EmptyCells.Clear(); EmptyCells.Clear();
_cellQueuedLabels.Clear();
foreach(var node in CellInstances.Values) foreach(var node in CellInstances.Values)
node.GetComponent<Prototype>().ReturnToPool(); node.GetComponent<Prototype>().ReturnToPool();
CellInstances.Clear(); CellInstances.Clear();
@ -182,9 +155,10 @@ public class InventoryPanel : MonoBehaviour
Title.text = "None"; Title.text = "None";
} }
public void Display(Entity entity) public void Display(Entity entity, bool hud = false)
{ {
Clear(); Clear();
_hud = hud;
_displayedEntity = entity; _displayedEntity = entity;
_firstRect = null; _firstRect = null;
@ -224,7 +198,6 @@ public class InventoryPanel : MonoBehaviour
} }
else else
{ {
_cellQueuedLabels.Add(v, new Dictionary<HitType, string>(4));
var cell = NodePrototype.Instantiate<InventoryCell>(); var cell = NodePrototype.Instantiate<InventoryCell>();
if (!_firstRect) if (!_firstRect)
_firstRect = cell.GetComponent<RectTransform>(); _firstRect = cell.GetComponent<RectTransform>();
@ -247,58 +220,55 @@ public class InventoryPanel : MonoBehaviour
_subscriptions.Add(entity.ArmorDamage.Subscribe(hit => _subscriptions.Add(entity.ArmorDamage.Subscribe(hit =>
{ {
var labelText = $"{((int) (entity.Armor[hit.pos.x, hit.pos.y] / hullData.Armor * 100)).ToString()}%"; var hitCells = new[] { hit.pos };
// If there is no set fadeout time, that means this is the first hit and the cell label isn't visible yet StartCoroutine(Pulse(hitCells, HitType.Armor, _hitSequence++));
if (!_cellHealthFadeoutTime.ContainsKey(hit.pos)) StartCoroutine(FadeInLabel(CellInstances[hit.pos])); RefreshCells(hitCells);
// Color and label text will be set according to remaining time until fadeout
_cellQueuedLabels[hit.pos][HitType.Armor] = labelText;
// Set the fadeout time to some time in the future
_cellHealthFadeoutTime[hit.pos] = Time.time + CellHealthPersistDuration;
//RefreshCells(new []{int2(hit.pos)});
})); }));
_subscriptions.Add(entity.ItemDamage.Subscribe(hit => _subscriptions.Add(entity.ItemDamage.Subscribe(hit =>
{ {
var data = entity.ItemManager.GetData(hit.item.EquippableItem); var data = entity.ItemManager.GetData(hit.item.EquippableItem);
var labelText = $"{((int) (hit.item.EquippableItem.Durability / data.Durability * 100)).ToString()}%"; var hitCells = data.Shape.Coordinates.Select(v => v + hit.item.Position).ToArray();
if (!_cellHealthFadeoutTime.ContainsKey(hit.item.Position)) StartCoroutine(FadeInLabel(CellInstances[hit.item.Position])); StartCoroutine(Pulse(hitCells, HitType.Armor, _hitSequence++));
_cellQueuedLabels[hit.item.Position][data.HardpointType == HardpointType.Thermal ? HitType.Thermal : HitType.Gear] = labelText; RefreshCells(hitCells);
_cellHealthFadeoutTime[hit.item.Position] = Time.time + CellHealthPersistDuration;
})); }));
_subscriptions.Add(entity.HardpointDamage.Subscribe(hit => _subscriptions.Add(entity.HardpointDamage.Subscribe(hit =>
{ {
var labelText = $"{((int) (entity.HardpointArmor[hit.hardpoint] / hit.hardpoint.Armor * 100)).ToString()}%"; var hitCells = hit.hardpoint.Shape.Coordinates.Select(v => v + hit.hardpoint.Position).ToArray();
if (!_cellHealthFadeoutTime.ContainsKey(hit.hardpoint.Position)) StartCoroutine(FadeInLabel(CellInstances[hit.hardpoint.Position])); StartCoroutine(Pulse(hitCells, HitType.Armor, _hitSequence++));
_cellQueuedLabels[hit.hardpoint.Position][HitType.Hardpoint] = labelText; RefreshCells(hitCells);
_cellHealthFadeoutTime[hit.hardpoint.Position] = Time.time + CellHealthPersistDuration;
})); }));
} }
private IEnumerator FadeInLabel(InventoryCell cell) private IEnumerator Pulse(int2[] cells, HitType hitType, int sequence)
{ {
cell.Label.gameObject.SetActive(true); foreach (var cell in cells)
float startTime = Time.time;
while (Time.time - startTime < CellHealthFadeTime)
{ {
var lerp = (Time.time - startTime) / CellHealthFadeTime; if(_cellAnimationSequence.ContainsKey(cell))
cell.Label.alpha = lerp; _cellAnimationSequence[cell] = max(_cellAnimationSequence[cell], sequence);
else
_cellAnimationSequence[cell] = sequence;
}
var hitColor = hitType switch
{
HitType.Armor => Settings.ArmorHitColor,
HitType.Hardpoint => Settings.HardpointHitColor,
HitType.Gear => Settings.GearHitColor,
HitType.Thermal => Settings.ThermalHitColor,
_ => Color.white
};
float startTime = Time.time;
while (Time.time - startTime < CellHitPulseTime)
{
var lerp = (Time.time - startTime) / CellHitPulseTime;
foreach(var cell in cells)
if(_cellAnimationSequence[cell] == sequence)
CellInstances[cell].Background.color = Color.Lerp(hitColor, CellBackgroundColor, lerp);
yield return null; yield return null;
} }
cell.Label.alpha = 1; foreach (var cell in cells)
} CellInstances[cell].Background.color = CellBackgroundColor;
private IEnumerator FadeOutLabel(InventoryCell cell)
{
float startTime = Time.time;
while (Time.time - startTime < CellHealthFadeTime)
{
var lerp = (Time.time - startTime) / CellHealthFadeTime;
cell.Label.alpha = 1 - lerp;
yield return null;
}
cell.Label.alpha = 0;
cell.Label.gameObject.SetActive(false);
} }
public void Display(EquippedCargoBay cargo) public void Display(EquippedCargoBay cargo)
@ -446,8 +416,19 @@ public class InventoryPanel : MonoBehaviour
{ {
var hullData = GameManager.ItemManager.GetData(_displayedEntity.Hull) as HullData; var hullData = GameManager.ItemManager.GetData(_displayedEntity.Hull) as HullData;
var interior = hullData.InteriorCells[position]; var interior = hullData.InteriorCells[position];
var item = FakeOccupancy?[position]??false ? FakeEquipment : IgnoreOccupancy?[position]??false ? null : _displayedEntity.GearOccupancy[position.x, position.y];
var hardpoint = _displayedEntity.Hardpoints[position.x, position.y]; var hardpoint = _displayedEntity.Hardpoints[position.x, position.y];
var item = FakeOccupancy?[position] ?? false ? FakeEquipment : IgnoreOccupancy?[position] ?? false ? null : _displayedEntity.GearOccupancy[position.x, position.y];
if (_hud)
{
if (!interior && _displayedEntity.Armor[position.x, position.y] > .01f)
return Settings.ArmorGradient.Evaluate(_displayedEntity.Armor[position.x, position.y] / hullData.Armor);
else if (hardpoint != null && _displayedEntity.HardpointArmor[hardpoint] > .01f)
return Settings.ArmorGradient.Evaluate(_displayedEntity.HardpointArmor[hardpoint] / hardpoint.Armor);
if (item != null) return Settings.DurabilityGradient.Evaluate(item.EquippableItem.Durability / _displayedEntity.ItemManager.GetData(item.EquippableItem).Durability);
return Color.white * .25f;
}
if (hardpoint == null) if (hardpoint == null)
{ {

View file

@ -0,0 +1,52 @@
using UnityEngine;
using Unity.Mathematics;
using static Unity.Mathematics.math;
using static Unity.Mathematics.noise;
using static Noise1D;
/// <summary>
/// Place an UI element to a world position
/// </summary>
[RequireComponent(typeof(RectTransform))]
public class PlaceUIElementWorldspace : MonoBehaviour
{
public float NoiseAmplitude;
public float NoiseFrequency;
public RectTransform CanvasRectTransform;
public float BorderPixels = 10;
public Vector3 Target;
private RectTransform _rectTransform;
private Transform _cameraTransform;
private float _noiseOffset;
void Start()
{
// Get the rect transform
_rectTransform = GetComponent<RectTransform>();
_cameraTransform = Camera.main.transform;
}
private void OnEnable()
{
_noiseOffset = UnityEngine.Random.Range(-100f, 100f);
}
/// <summary>
/// Move the UI element to the world position
/// </summary>
void LateUpdate()
{
if (Target == null)
return;
_noiseOffset += Time.deltaTime * NoiseFrequency;
Vector2 screenPoint = RectTransformUtility.WorldToScreenPoint(Camera.main, Target);
screenPoint *= Mathf.Sign(Vector3.Dot(_cameraTransform.forward, Target - _cameraTransform.position));
screenPoint += new Vector2(noise(_noiseOffset), noise(10 + _noiseOffset)) * NoiseAmplitude;
screenPoint = new Vector2(Mathf.Clamp(screenPoint.x, BorderPixels, Screen.width - BorderPixels),Mathf.Clamp(screenPoint.y, BorderPixels, Screen.height - BorderPixels));
_rectTransform.anchoredPosition = screenPoint - CanvasRectTransform.sizeDelta / 2f;
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 79e1b49bde6c1c54aa6b5c2256e0e382
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

BIN
UpgradeLog.htm Normal file

Binary file not shown.