chore: new filenames according to new Style Guide

This commit is contained in:
Jakob Feldmann 2024-02-22 20:31:19 +01:00
parent 741edc72a7
commit cb92720fa6
50 changed files with 195 additions and 38 deletions

View File

@ -39,7 +39,7 @@ MonoBehaviour:
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cb0ece14d1f711a4fb9325ca819dee95, type: 3}
m_Name: AdaptivePerformanceGeneralSettings
m_Name: Adaptive Performance General Settings
m_EditorClassIdentifier:
Keys: 010000000d000000
Values:

View File

@ -10,7 +10,7 @@ MonoBehaviour:
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c46f07b5ed07e4e92aa78254188d3d10, type: 3}
m_Name: InputSystem.inputsettings
m_Name: Input System Input Settings
m_EditorClassIdentifier:
m_SupportedDevices:
- Gamepad

View File

@ -20,7 +20,7 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: FresnelRippleMaterial
m_Name: BRP Fresnel Ripples
m_Shader: {fileID: 4800000, guid: b965bf942e2a1754ea5b506226e626ed, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0

View File

@ -20,7 +20,7 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: BloomTest
m_Name: Bloom Test
m_Shader: {fileID: 4800000, guid: 8d2bb70cbf9db8d4da26e15b26e74248, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0

View File

@ -7,7 +7,7 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: GlowingWireFrame Variant
m_Name: Glowing Wire Frame Variant
m_Shader: {fileID: -6465566751694194690, guid: 7bbccc5c40aae3e478e0205f25cd16ef, type: 3}
m_Parent: {fileID: -876546973899608171, guid: 7bbccc5c40aae3e478e0205f25cd16ef, type: 3}
m_ModifiedSerializedProperties: 8

View File

@ -7,7 +7,7 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Spaceship9Blue
m_Name: Spaceship9 Blue
m_Shader: {fileID: 4800000, guid: 8d2bb70cbf9db8d4da26e15b26e74248, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0

View File

@ -7,7 +7,7 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Spaceship9Red
m_Name: Spaceship9 Red
m_Shader: {fileID: 4800000, guid: 8d2bb70cbf9db8d4da26e15b26e74248, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0

View File

@ -7,7 +7,7 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: GlossyPBRRipples Variant
m_Name: URP PBR Ripples Variant
m_Shader: {fileID: 4800000, guid: 8a7f26cb4a0b4d446b2ca031d3ff37df, type: 3}
m_Parent: {fileID: 2100000, guid: 78cb0d90576fe15439f3fd294d5eaaba, type: 2}
m_ModifiedSerializedProperties: 8

View File

@ -20,7 +20,7 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: GlossyPBRRipples
m_Name: URP PBR Ripples
m_Shader: {fileID: 4800000, guid: 8a7f26cb4a0b4d446b2ca031d3ff37df, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0

View File

@ -7,7 +7,7 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: HexSphere Variant
m_Name: Hex Sphere Variant
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: -3033667219593020291, guid: 24300c11f962a8e4f9f8125bd2843705, type: 3}
m_ModifiedSerializedProperties: 18

View File

@ -0,0 +1,133 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-5817368176278310424
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: defaultMat
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.8, g: 0.8, b: 0.8, a: 1}
- _Color: {r: 0.8, g: 0.8, b: 0.8, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c6f5f8e387397484fbcfbe020cb4d7d6
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -10,7 +10,7 @@ GameObject:
m_Component:
- component: {fileID: 1530196321467136736}
m_Layer: 0
m_Name: NimbleZoneHexSphere
m_Name: Nimble Zone Hex Sphere
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

View File

@ -93,7 +93,7 @@ GameObject:
m_Component:
- component: {fileID: 930210402018337895}
m_Layer: 0
m_Name: NimbleZoneSphere
m_Name: Nimble Zone Sphere
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

View File

@ -314,7 +314,7 @@ GameObject:
- component: {fileID: 8381686008902273014}
- component: {fileID: 3682778260020431729}
m_Layer: 5
m_Name: PlayerHUDBlue
m_Name: Player HUD Blue
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

View File

@ -13,7 +13,7 @@ GameObject:
- component: {fileID: 7241017989237997212}
- component: {fileID: 7714247707982132918}
m_Layer: 5
m_Name: PlayerHUDRed
m_Name: Player HUD Red
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

View File

@ -10,7 +10,7 @@ MonoBehaviour:
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2ec995e51a6e251468d2a3fd8a686257, type: 3}
m_Name: UniversalRenderPipelineGlobalSettings
m_Name: URP Global Settings
m_EditorClassIdentifier:
k_AssetVersion: 3
m_RenderingLayerNames:

View File

@ -10,7 +10,7 @@ MonoBehaviour:
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3}
m_Name: URP_Renderer
m_Name: URP Renderer
m_EditorClassIdentifier:
debugShaders:
debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, type: 3}

View File

@ -17,7 +17,8 @@ public class GameManager : MonoBehaviour
[SerializeField] int minPlayerCount = 2;
public GameState currentState { get; private set; }
private Dictionary<int, PlayerController> players = new Dictionary<int, PlayerController>();
private Dictionary<int, Tuple<string, int>> playerControlSchemes = new Dictionary<int, Tuple<string, int>>();
private Dictionary<int, Tuple<string, int>> playerControlSchemes =
new Dictionary<int, Tuple<string, int>>();
private float restartMatchTime = 0;
private ControlSchemeDetection controlSchemeDetector;
@ -159,11 +160,13 @@ public class GameManager : MonoBehaviour
}
if (controlScheme.Item1.Contains("Keyboard"))
{
pc.playerInput.SwitchCurrentControlScheme(controlScheme.Item1, InputSystem.GetDeviceById(controlScheme.Item2));
pc.playerInput.SwitchCurrentControlScheme(controlScheme.Item1,
InputSystem.GetDeviceById(controlScheme.Item2));
}
else if (controlScheme.Item1.Contains("Controller"))
{
pc.playerInput.SwitchCurrentControlScheme(controlScheme.Item1, InputSystem.GetDeviceById(controlScheme.Item2));
pc.playerInput.SwitchCurrentControlScheme(controlScheme.Item1,
InputSystem.GetDeviceById(controlScheme.Item2));
}
if (controlScheme.Item1 != "New Player")
{
@ -236,6 +239,7 @@ public class ControlSchemeDetection : IPlayerActions
int bindingIndex = context.action.GetBindingIndexForControl(context.control);
InputBinding binding = context.action.bindings[bindingIndex];
string controlScheme = binding.groups.Split(';')[0];
ControlSchemeDetected.Invoke(this, new Tuple<string, int>(controlScheme, context.control.device.deviceId));
ControlSchemeDetected.Invoke(this, new Tuple<string, int>(controlScheme,
context.control.device.deviceId));
}
}

View File

@ -86,7 +86,8 @@ public class HitFeedbackTestObjectBehavior : MonoBehaviour
Vector3 rotation = transform.rotation.eulerAngles;
Vector3 driftVelocity = currentVelocity - Vector3.Project(currentVelocity, rotation);
antiDriftVelocity = Vector3.Reflect(-driftVelocity, transform.up) - driftVelocity;
antiDriftFactor = Mathf.InverseLerp(absolutMaxVelocity, normalMaxVelocity, currentVelocity.magnitude);
antiDriftFactor = Mathf.InverseLerp(absolutMaxVelocity, normalMaxVelocity,
currentVelocity.magnitude);
antiDriftFactor = Mathf.Max(antiDriftFactor, minAntiDriftFactor);
Debug.DrawRay(transform.position, driftVelocity.normalized * 5, Color.red);
}
@ -97,7 +98,8 @@ public class HitFeedbackTestObjectBehavior : MonoBehaviour
Vector3 DragDecceleration(Vector3 currentVelocity, Zone zone)
{
Vector3 drag = new Vector3();
float minDragFactor = Mathf.InverseLerp(absolutMaxVelocity, normalMaxVelocity, currentVelocity.magnitude);
float minDragFactor = Mathf.InverseLerp(absolutMaxVelocity, normalMaxVelocity,
currentVelocity.magnitude);
float normalDragFactor = Mathf.InverseLerp(normalMaxVelocity, 0, currentVelocity.magnitude);
if (zone == Zone.NimbleZone)
{
@ -135,7 +137,8 @@ public class HitFeedbackTestObjectBehavior : MonoBehaviour
Vector3 colliderVelocity = collider.attachedRigidbody.velocity;
Vector3 tackleDirection = body.transform.position - collider.transform.position;
float colliderMass = collider.attachedRigidbody.mass;
body.AddForce(colliderVelocity.magnitude * tackleDirection * (colliderMass / body.mass), ForceMode.Acceleration);
body.AddForce(colliderVelocity.magnitude * tackleDirection * (colliderMass / body.mass),
ForceMode.Acceleration);
UpdateTackleResponse(true);
}

View File

@ -48,12 +48,18 @@ public class NimbleZoneDetection : MonoBehaviour
ResetShaderProperties();
}
private Func<Vector3, Vector3>[] gravityFunctions = { DownGravity, NoGravity, InwardsGravity, OutwardsGravity };
private Func<Vector3, Vector3>[] gravityFunctions =
{ DownGravity, NoGravity, InwardsGravity, OutwardsGravity };
private static Func<Vector3, Vector3> NoGravity =
new Func<Vector3, Vector3>(position => new Vector3());
private static Func<Vector3, Vector3> DownGravity =
new Func<Vector3, Vector3>(position => Vector3.down * gravityFactor);
private static Func<Vector3, Vector3> InwardsGravity =
new Func<Vector3, Vector3>
(position => new Vector3(position.x, position.y, 0).normalized * -gravityFactor);
private static Func<Vector3, Vector3> NoGravity = new Func<Vector3, Vector3>(position => new Vector3());
private static Func<Vector3, Vector3> DownGravity = new Func<Vector3, Vector3>(position => Vector3.down * gravityFactor);
private static Func<Vector3, Vector3> InwardsGravity = new Func<Vector3, Vector3>
(position => new Vector3(position.x, position.y, 0).normalized * -gravityFactor);
private static Func<Vector3, Vector3> OutwardsGravity = new Func<Vector3, Vector3>
(position => new Vector3(position.x, position.y, 0).normalized * gravityFactor);
@ -156,9 +162,4 @@ public class NimbleZoneDetection : MonoBehaviour
material.SetFloatArray("_RippleDurations", rippleDurations);
material.SetFloatArray("_RippleRadii", rippleRadii);
}
private void OnDestroy()
{
ResetShaderProperties();
}
}

View File

@ -55,7 +55,8 @@ public class PlayerController : MonoBehaviour
{
if (forceManager == null)
{
forceManager = GameObject.FindGameObjectWithTag("ForceManager").GetComponent<AffectingForcesManager>();
forceManager = GameObject.FindGameObjectWithTag("ForceManager").
GetComponent<AffectingForcesManager>();
}
body = GetComponent<Rigidbody>();
playerInput = GetComponent<PlayerInput>();
@ -116,7 +117,8 @@ public class PlayerController : MonoBehaviour
float stunFactor = isCriticalTackle ? stunLooseControlFactor : 1f;
currentThrustInput = IsBoosting() ? 1f : currentThrustInput;
Vector3 acceleration = thrustAcceleration * currentThrustInput * Time.deltaTime * Vector3.up * stunFactor;
Vector3 acceleration = thrustAcceleration * currentThrustInput * Time.deltaTime
* Vector3.up * stunFactor;
Vector3 currentVelocity = body.velocity;
@ -161,8 +163,11 @@ public class PlayerController : MonoBehaviour
// Cancel out inertia/drifting
Vector3 rotation = transform.rotation.eulerAngles;
Vector3 driftVelocity = currentVelocity - Vector3.Project(currentVelocity, rotation);
antiDriftVelocity = Vector3.Reflect(-driftVelocity, transform.up) - driftVelocity;
antiDriftFactor = Mathf.InverseLerp(absolutMaxVelocity, normalMaxVelocity, currentVelocity.magnitude);
antiDriftFactor = Mathf.InverseLerp(absolutMaxVelocity, normalMaxVelocity,
currentVelocity.magnitude);
antiDriftFactor = Mathf.Max(antiDriftFactor, minAntiDriftFactor);
Debug.DrawRay(transform.position, driftVelocity.normalized * 5, Color.red);
Debug.DrawRay(transform.position, antiDriftVelocity.normalized * 5, Color.green);
@ -173,7 +178,9 @@ public class PlayerController : MonoBehaviour
{
Vector3 drag = new Vector3();
bool isBoosting = currentBoostInput > 0 && canBoost == true;
float minDragFactor = Mathf.InverseLerp(absolutMaxVelocity, normalMaxVelocity, currentVelocity.magnitude);
float minDragFactor = Mathf.InverseLerp(absolutMaxVelocity, normalMaxVelocity,
currentVelocity.magnitude);
float normalDragFactor = Mathf.InverseLerp(normalMaxVelocity, 0, currentVelocity.magnitude);
if (!isBoosting && zone == Zone.NimbleZone)
{
@ -290,7 +297,8 @@ public class PlayerController : MonoBehaviour
}
Vector3 colliderVelocity = collider.attachedRigidbody.velocity;
Vector3 tackleDirection = body.transform.position - collider.transform.position;
body.AddForce(colliderVelocity.magnitude * tackleDirection * tacklePowerFactor, ForceMode.Acceleration);
body.AddForce(colliderVelocity.magnitude * tackleDirection * tacklePowerFactor,
ForceMode.Acceleration);
UpdateTackleResponse(true);
}