diff --git a/.buildkite/premerge.steps.yaml b/.buildkite/premerge.steps.yaml index 12066c7d..700d09f4 100644 --- a/.buildkite/premerge.steps.yaml +++ b/.buildkite/premerge.steps.yaml @@ -7,7 +7,7 @@ # You may find the example pipeline steps listed here helpful: https://buildkite.com/docs/pipelines/defining-steps#example-pipeline but please # note that the setup is already done, so you should not manually adjust anything through the BuildKite interface. # -common: &common +windows: &windows agents: - "capable_of_building=gdk-for-unity" - "environment=production" @@ -66,10 +66,14 @@ macos: &macos dag: true steps: + - label: ":debian: ~ lint :lint-roller:" + command: bash -c ci/lint.sh + <<: *linux + - label: ":windows: ~ test" id: "test" command: bash -c ci/test.sh - <<: *common + <<: *windows artifact_paths: - logs/**/* @@ -89,7 +93,7 @@ steps: - label: ":windows: ~ build :android:" command: bash -c .shared-ci/scripts/build-worker.sh - <<: *common + <<: *windows artifact_paths: - logs/**/* env: @@ -112,7 +116,7 @@ steps: - label: ":windows: ~ build UnityClient mono" command: bash -c .shared-ci/scripts/build-worker.sh - <<: *common + <<: *windows artifact_paths: - logs/**/* env: @@ -122,7 +126,7 @@ steps: - label: ":windows: ~ build UnityClient il2cpp" command: bash -c .shared-ci/scripts/build-worker.sh - <<: *common + <<: *windows artifact_paths: - logs/**/* env: @@ -132,7 +136,7 @@ steps: - label: ":windows: ~ build UnityGameLogic mono" command: bash -c .shared-ci/scripts/build-worker.sh - <<: *common + <<: *windows artifact_paths: - logs/**/* env: @@ -142,7 +146,7 @@ steps: - label: ":windows: ~ build SimulatedPlayerCoordinator mono" command: bash -c .shared-ci/scripts/build-worker.sh - <<: *common + <<: *windows artifact_paths: - logs/**/* env: diff --git a/.editorconfig b/.editorconfig index 22d48e68..464a0e31 100644 --- a/.editorconfig +++ b/.editorconfig @@ -15,6 +15,37 @@ max_line_length = 120 [*.cs] indent_size = 4 +# New line preferences +csharp_new_line_before_open_brace = all +csharp_new_line_before_else = true +csharp_new_line_before_catch = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_members_in_anonymous_types = true +csharp_new_line_between_query_expression_clauses = true + +# Indentation preferences +csharp_indent_case_contents = true +csharp_indent_switch_labels = true +csharp_indent_labels = flush_left + +# Space preferences +csharp_space_after_cast = true +csharp_space_after_keywords_in_control_flow_statements = true +csharp_space_between_method_call_parameter_list_parentheses = false +csharp_space_between_method_declaration_parameter_list_parentheses = false +csharp_space_between_parentheses = false +csharp_space_before_colon_in_inheritance_clause = true +csharp_space_after_colon_in_inheritance_clause = true +csharp_space_around_binary_operators = before_and_after +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_call_empty_parameter_list_parentheses = false + +# Wrapping preferences +csharp_preserve_single_line_statements = true +csharp_preserve_single_line_blocks = true + [*.json] indent_size = 2 diff --git a/ci/bootstrap.sh b/ci/bootstrap.sh index 1dfaaa3e..18b2a18e 100755 --- a/ci/bootstrap.sh +++ b/ci/bootstrap.sh @@ -21,26 +21,7 @@ cd "$(dirname "$0")/../" echo "--- Bootstrapping :boot:" -SHARED_CI_DIR="$(pwd)/.shared-ci" -CLONE_URL="git@github.com:spatialos/gdk-for-unity-shared-ci.git" -PINNED_SHARED_CI_BRANCH=$(cat ./ci/shared-ci.pinned | cut -d' ' -f 1) -PINNED_SHARED_CI_VERSION=$(cat ./ci/shared-ci.pinned | cut -d' ' -f 2) - -# Clone the HEAD of the shared CI repo into ".shared-ci" - -if [[ -d "${SHARED_CI_DIR}" ]]; then - rm -rf "${SHARED_CI_DIR}" -fi - -mkdir "${SHARED_CI_DIR}" - -# Workaround for being unable to clone a specific commit with depth of 1. -pushd "${SHARED_CI_DIR}" - git init - git remote add origin "${CLONE_URL}" - git fetch --depth 20 origin "${PINNED_SHARED_CI_BRANCH}" - git checkout "${PINNED_SHARED_CI_VERSION}" -popd +./ci/get-shared-ci.sh # Clone the GDK for Unity repository diff --git a/ci/get-shared-ci.sh b/ci/get-shared-ci.sh new file mode 100755 index 00000000..d877677e --- /dev/null +++ b/ci/get-shared-ci.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +set -e -u -o pipefail + +if [[ -n "${DEBUG-}" ]]; then + set -x +fi + +SHARED_CI_DIR="$(pwd)/.shared-ci" +CLONE_URL="git@github.com:spatialos/gdk-for-unity-shared-ci.git" +PINNED_SHARED_CI_BRANCH=$(cat ./ci/shared-ci.pinned | cut -d' ' -f 1) +PINNED_SHARED_CI_VERSION=$(cat ./ci/shared-ci.pinned | cut -d' ' -f 2) + +if [[ -d "${SHARED_CI_DIR}" ]]; then + rm -rf "${SHARED_CI_DIR}" +fi + +mkdir "${SHARED_CI_DIR}" + +# Clone the HEAD of the shared CI repo into ".shared-ci" +# Workaround for being unable to clone a specific commit with depth of 1. +pushd "${SHARED_CI_DIR}" + git init + git remote add origin "${CLONE_URL}" + git fetch --depth 20 origin "${PINNED_SHARED_CI_BRANCH}" + git checkout "${PINNED_SHARED_CI_VERSION}" +popd diff --git a/ci/lint.sh b/ci/lint.sh new file mode 100755 index 00000000..37975eba --- /dev/null +++ b/ci/lint.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -e -u -o pipefail + +if [[ -n "${DEBUG-}" ]]; then + set -x +fi + +cd "$(dirname "$0")/.." + +./ci/get-shared-ci.sh +./.shared-ci/scripts/lint.sh ./workers/unity --check diff --git a/ci/shared-ci.pinned b/ci/shared-ci.pinned index 22eceeda..65ec3ee5 100644 --- a/ci/shared-ci.pinned +++ b/ci/shared-ci.pinned @@ -1 +1 @@ -master a6c1fcd9562bf40160214acddc7e1a732a66faf4 \ No newline at end of file +master 7980ef5db74d8db47c0f683378a38d64accd2c0a \ No newline at end of file diff --git a/workers/unity/Assets/Fps/Scripts/Animation/FpsAnimator.cs b/workers/unity/Assets/Fps/Scripts/Animation/FpsAnimator.cs index fd1d11c3..0f3aab26 100644 --- a/workers/unity/Assets/Fps/Scripts/Animation/FpsAnimator.cs +++ b/workers/unity/Assets/Fps/Scripts/Animation/FpsAnimator.cs @@ -1,4 +1,4 @@ -using Fps.Movement; +using Fps.Movement; using UnityEngine; namespace Fps.Animation @@ -43,7 +43,8 @@ private class AnimationBoolParameter public bool LastValue; } - [SerializeField] private AnimationSettings animationSettings = new AnimationSettings + [SerializeField] + private AnimationSettings animationSettings = new AnimationSettings { InterpolatePitchDuration = 0.1f, InterpolateMovementDuration = 0.1f, diff --git a/workers/unity/Assets/Fps/Scripts/Animation/ProxyAnimation.cs b/workers/unity/Assets/Fps/Scripts/Animation/ProxyAnimation.cs index dae6693c..0d66e8db 100644 --- a/workers/unity/Assets/Fps/Scripts/Animation/ProxyAnimation.cs +++ b/workers/unity/Assets/Fps/Scripts/Animation/ProxyAnimation.cs @@ -1,4 +1,4 @@ -using Fps.Movement; +using Fps.Movement; using Fps.SchemaExtensions; using Improbable.Gdk.Subscriptions; using UnityEngine; diff --git a/workers/unity/Assets/Fps/Scripts/AssemblyInfo.cs b/workers/unity/Assets/Fps/Scripts/AssemblyInfo.cs index 9e404ad3..e058acf1 100644 --- a/workers/unity/Assets/Fps/Scripts/AssemblyInfo.cs +++ b/workers/unity/Assets/Fps/Scripts/AssemblyInfo.cs @@ -1,3 +1,3 @@ -using System.Runtime.CompilerServices; +using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("Improbable.Fps.Editor")] diff --git a/workers/unity/Assets/Fps/Scripts/Config/AdvancedEntityPipeline.cs b/workers/unity/Assets/Fps/Scripts/Config/AdvancedEntityPipeline.cs index 560d9e16..8cb729e7 100644 --- a/workers/unity/Assets/Fps/Scripts/Config/AdvancedEntityPipeline.cs +++ b/workers/unity/Assets/Fps/Scripts/Config/AdvancedEntityPipeline.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using Fps.Movement; using Fps.SchemaExtensions; diff --git a/workers/unity/Assets/Fps/Scripts/Config/SettingsPublisher.cs b/workers/unity/Assets/Fps/Scripts/Config/SettingsPublisher.cs index f68c2b35..9c4df1d7 100644 --- a/workers/unity/Assets/Fps/Scripts/Config/SettingsPublisher.cs +++ b/workers/unity/Assets/Fps/Scripts/Config/SettingsPublisher.cs @@ -1,4 +1,4 @@ -using UnityEngine; +using UnityEngine; namespace Fps.Config { diff --git a/workers/unity/Assets/Fps/Scripts/Config/SettingsPublishers/GunDictionaryPublisher.cs b/workers/unity/Assets/Fps/Scripts/Config/SettingsPublishers/GunDictionaryPublisher.cs index 4cec9486..a14779dd 100644 --- a/workers/unity/Assets/Fps/Scripts/Config/SettingsPublishers/GunDictionaryPublisher.cs +++ b/workers/unity/Assets/Fps/Scripts/Config/SettingsPublishers/GunDictionaryPublisher.cs @@ -1,4 +1,4 @@ -using Fps.Guns; +using Fps.Guns; using UnityEngine; namespace Fps.Config diff --git a/workers/unity/Assets/Fps/Scripts/Config/SettingsPublishers/ISettingsPublisher.cs b/workers/unity/Assets/Fps/Scripts/Config/SettingsPublishers/ISettingsPublisher.cs index f784c16a..d192b387 100644 --- a/workers/unity/Assets/Fps/Scripts/Config/SettingsPublishers/ISettingsPublisher.cs +++ b/workers/unity/Assets/Fps/Scripts/Config/SettingsPublishers/ISettingsPublisher.cs @@ -1,4 +1,4 @@ -namespace Fps.Config +namespace Fps.Config { public interface ISettingsPublisher { diff --git a/workers/unity/Assets/Fps/Scripts/Config/SettingsPublishers/MapQualitySettingsPublisher.cs b/workers/unity/Assets/Fps/Scripts/Config/SettingsPublishers/MapQualitySettingsPublisher.cs index 48de3d13..c54a310d 100644 --- a/workers/unity/Assets/Fps/Scripts/Config/SettingsPublishers/MapQualitySettingsPublisher.cs +++ b/workers/unity/Assets/Fps/Scripts/Config/SettingsPublishers/MapQualitySettingsPublisher.cs @@ -1,4 +1,4 @@ -using Fps.WorldTiles; +using Fps.WorldTiles; using UnityEngine; namespace Fps.Config diff --git a/workers/unity/Assets/Fps/Scripts/Editor/Hud/Mobile/TouchscreenButtonAnimatorInspector.cs b/workers/unity/Assets/Fps/Scripts/Editor/Hud/Mobile/TouchscreenButtonAnimatorInspector.cs index bf6dc06e..743fe5f1 100644 --- a/workers/unity/Assets/Fps/Scripts/Editor/Hud/Mobile/TouchscreenButtonAnimatorInspector.cs +++ b/workers/unity/Assets/Fps/Scripts/Editor/Hud/Mobile/TouchscreenButtonAnimatorInspector.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using Fps.UI; using UnityEditor; using UnityEngine; diff --git a/workers/unity/Assets/Fps/Scripts/Editor/WorldTiles/MapQualitySettingsInspector.cs b/workers/unity/Assets/Fps/Scripts/Editor/WorldTiles/MapQualitySettingsInspector.cs index 74d5fad6..1502ee84 100644 --- a/workers/unity/Assets/Fps/Scripts/Editor/WorldTiles/MapQualitySettingsInspector.cs +++ b/workers/unity/Assets/Fps/Scripts/Editor/WorldTiles/MapQualitySettingsInspector.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using Fps.WorldTiles; using UnityEditor; using UnityEngine; diff --git a/workers/unity/Assets/Fps/Scripts/Editor/WorldTiles/MapTemplateInspector.cs b/workers/unity/Assets/Fps/Scripts/Editor/WorldTiles/MapTemplateInspector.cs index 09f6820c..12c14b27 100644 --- a/workers/unity/Assets/Fps/Scripts/Editor/WorldTiles/MapTemplateInspector.cs +++ b/workers/unity/Assets/Fps/Scripts/Editor/WorldTiles/MapTemplateInspector.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using Fps.WorldTiles; using UnityEditor; diff --git a/workers/unity/Assets/Fps/Scripts/Guns/Behaviours/GunSocket.cs b/workers/unity/Assets/Fps/Scripts/Guns/Behaviours/GunSocket.cs index ad63d67f..75d9deff 100644 --- a/workers/unity/Assets/Fps/Scripts/Guns/Behaviours/GunSocket.cs +++ b/workers/unity/Assets/Fps/Scripts/Guns/Behaviours/GunSocket.cs @@ -1,4 +1,4 @@ -using UnityEngine; +using UnityEngine; using UnityEngine.Rendering; namespace Fps.Guns diff --git a/workers/unity/Assets/Fps/Scripts/Guns/Behaviours/IRecoil.cs b/workers/unity/Assets/Fps/Scripts/Guns/Behaviours/IRecoil.cs index 85a175e2..8911ef36 100644 --- a/workers/unity/Assets/Fps/Scripts/Guns/Behaviours/IRecoil.cs +++ b/workers/unity/Assets/Fps/Scripts/Guns/Behaviours/IRecoil.cs @@ -1,4 +1,4 @@ -namespace Fps.Guns +namespace Fps.Guns { public interface IRecoil { diff --git a/workers/unity/Assets/Fps/Scripts/Guns/Behaviours/ShotRenderer.cs b/workers/unity/Assets/Fps/Scripts/Guns/Behaviours/ShotRenderer.cs index 4d5993e8..b813d2f5 100644 --- a/workers/unity/Assets/Fps/Scripts/Guns/Behaviours/ShotRenderer.cs +++ b/workers/unity/Assets/Fps/Scripts/Guns/Behaviours/ShotRenderer.cs @@ -31,7 +31,8 @@ private struct BulletDetails [SerializeField] private float fullLengthShotThreshold = 50f; - [Tooltip("If false, the BarrelLerpThreshold will not be used.")] [SerializeField] + [Tooltip("If false, the BarrelLerpThreshold will not be used.")] + [SerializeField] private bool barrelSnap = true; private bool muzzleFlashNeedsRefresh; diff --git a/workers/unity/Assets/Fps/Scripts/Guns/Settings/GunSettings.cs b/workers/unity/Assets/Fps/Scripts/Guns/Settings/GunSettings.cs index 28350bff..768d2474 100644 --- a/workers/unity/Assets/Fps/Scripts/Guns/Settings/GunSettings.cs +++ b/workers/unity/Assets/Fps/Scripts/Guns/Settings/GunSettings.cs @@ -18,7 +18,8 @@ public class GunSettings : ScriptableObject [SerializeField] private bool isAutomatic; - [Tooltip("In 'Shots per second'. If <= 0, there will be no cooldown between shots.")] [SerializeField] + [Tooltip("In 'Shots per second'. If <= 0, there will be no cooldown between shots.")] + [SerializeField] private float rateOfFire; [SerializeField] [HideInInspector] private float shotCooldown; @@ -29,16 +30,20 @@ public class GunSettings : ScriptableObject [SerializeField] private float aimFov = 60; [SerializeField] private float fovChangeTime = 0.1f; - [Tooltip("Bullets fired when not aiming will have this spread in meters at 50m range.")] [SerializeField] + [Tooltip("Bullets fired when not aiming will have this spread in meters at 50m range.")] + [SerializeField] private float inaccuracyFromHip; - [Tooltip("Bullets fired when aiming will have this spread in meters at 50m range.")] [SerializeField] + [Tooltip("Bullets fired when aiming will have this spread in meters at 50m range.")] + [SerializeField] private float inaccuracyWhileAiming; - [Tooltip("Whilst aiming, override the camera's Pitch Speed with this value.")] [SerializeField] + [Tooltip("Whilst aiming, override the camera's Pitch Speed with this value.")] + [SerializeField] private float aimPitchSpeed = 1; - [Tooltip("Whilst aiming, override the camera's Yaw Speed with this value.")] [SerializeField] + [Tooltip("Whilst aiming, override the camera's Yaw Speed with this value.")] + [SerializeField] private float aimYawSpeed = 1; diff --git a/workers/unity/Assets/Fps/Scripts/Health/Settings/PlayerHealthSettings.cs b/workers/unity/Assets/Fps/Scripts/Health/Settings/PlayerHealthSettings.cs index 692e5c6a..edba0127 100644 --- a/workers/unity/Assets/Fps/Scripts/Health/Settings/PlayerHealthSettings.cs +++ b/workers/unity/Assets/Fps/Scripts/Health/Settings/PlayerHealthSettings.cs @@ -1,4 +1,4 @@ -namespace Fps.Health +namespace Fps.Health { public static class PlayerHealthSettings { diff --git a/workers/unity/Assets/Fps/Scripts/HealthPickup/HealthPickupMovement.cs b/workers/unity/Assets/Fps/Scripts/HealthPickup/HealthPickupMovement.cs index 270a779a..13718f27 100644 --- a/workers/unity/Assets/Fps/Scripts/HealthPickup/HealthPickupMovement.cs +++ b/workers/unity/Assets/Fps/Scripts/HealthPickup/HealthPickupMovement.cs @@ -1,4 +1,4 @@ -using System; +using System; using Fps.Config; using Improbable.Gdk.Subscriptions; using UnityEngine; diff --git a/workers/unity/Assets/Fps/Scripts/Movement/Behaviours/ClientMovementDriver.cs b/workers/unity/Assets/Fps/Scripts/Movement/Behaviours/ClientMovementDriver.cs index 488d7500..d8b14236 100644 --- a/workers/unity/Assets/Fps/Scripts/Movement/Behaviours/ClientMovementDriver.cs +++ b/workers/unity/Assets/Fps/Scripts/Movement/Behaviours/ClientMovementDriver.cs @@ -18,7 +18,8 @@ public class ClientMovementDriver : GroundCheckingDriver [SerializeField] [HideInInspector] private float transformUpdateDelta; [SerializeField] [HideInInspector] private float rotationUpdateDelta; - [SerializeField] private MovementSettings movementSettings = new MovementSettings + [SerializeField] + private MovementSettings movementSettings = new MovementSettings { MovementSpeed = new MovementSpeedSettings { @@ -35,7 +36,8 @@ public class ClientMovementDriver : GroundCheckingDriver InAirDamping = 1.0f }; - [SerializeField] private RotationConstraints rotationConstraints = new RotationConstraints + [SerializeField] + private RotationConstraints rotationConstraints = new RotationConstraints { XAxisRotation = true, YAxisRotation = true, diff --git a/workers/unity/Assets/Fps/Scripts/Movement/Behaviours/FpsDriver.cs b/workers/unity/Assets/Fps/Scripts/Movement/Behaviours/FpsDriver.cs index ea795247..a1bdbc2e 100644 --- a/workers/unity/Assets/Fps/Scripts/Movement/Behaviours/FpsDriver.cs +++ b/workers/unity/Assets/Fps/Scripts/Movement/Behaviours/FpsDriver.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using Fps.Animation; using Fps.Guns; @@ -38,7 +38,8 @@ private struct CameraSettings [SerializeField] private Transform pitchTransform; [SerializeField] private new Camera camera; - [SerializeField] private CameraSettings cameraSettings = new CameraSettings + [SerializeField] + private CameraSettings cameraSettings = new CameraSettings { PitchSpeed = 1.0f, YawSpeed = 1.0f, diff --git a/workers/unity/Assets/Fps/Scripts/Movement/Behaviours/GroundCheckingDriver.cs b/workers/unity/Assets/Fps/Scripts/Movement/Behaviours/GroundCheckingDriver.cs index 637d2e8e..9a6880af 100644 --- a/workers/unity/Assets/Fps/Scripts/Movement/Behaviours/GroundCheckingDriver.cs +++ b/workers/unity/Assets/Fps/Scripts/Movement/Behaviours/GroundCheckingDriver.cs @@ -1,4 +1,4 @@ -using UnityEngine; +using UnityEngine; namespace Fps.Movement { diff --git a/workers/unity/Assets/Fps/Scripts/Movement/Behaviours/Motor Extensions/MotorSlopeExtension.cs b/workers/unity/Assets/Fps/Scripts/Movement/Behaviours/Motor Extensions/MotorSlopeExtension.cs index 933cc6cf..a98fa851 100644 --- a/workers/unity/Assets/Fps/Scripts/Movement/Behaviours/Motor Extensions/MotorSlopeExtension.cs +++ b/workers/unity/Assets/Fps/Scripts/Movement/Behaviours/Motor Extensions/MotorSlopeExtension.cs @@ -1,4 +1,4 @@ -using UnityEngine; +using UnityEngine; namespace Fps.Movement { diff --git a/workers/unity/Assets/Fps/Scripts/Movement/Behaviours/ProxyMovementDriver.cs b/workers/unity/Assets/Fps/Scripts/Movement/Behaviours/ProxyMovementDriver.cs index 661271c7..f8a024f0 100644 --- a/workers/unity/Assets/Fps/Scripts/Movement/Behaviours/ProxyMovementDriver.cs +++ b/workers/unity/Assets/Fps/Scripts/Movement/Behaviours/ProxyMovementDriver.cs @@ -12,7 +12,8 @@ public class ProxyMovementDriver : GroundCheckingDriver [Require] private ClientRotationReader client; #pragma warning restore 649 - [SerializeField] private RotationConstraints rotationConstraints = new RotationConstraints + [SerializeField] + private RotationConstraints rotationConstraints = new RotationConstraints { XAxisRotation = true, YAxisRotation = true, diff --git a/workers/unity/Assets/Fps/Scripts/Movement/Settings/MovementSettings.cs b/workers/unity/Assets/Fps/Scripts/Movement/Settings/MovementSettings.cs index 3a61f2a4..d67ffc02 100644 --- a/workers/unity/Assets/Fps/Scripts/Movement/Settings/MovementSettings.cs +++ b/workers/unity/Assets/Fps/Scripts/Movement/Settings/MovementSettings.cs @@ -46,13 +46,16 @@ public struct MovementSettings [System.Serializable] public struct RotationConstraints { - [Tooltip("Implement rotation on the X-axis.")] [SerializeField] + [Tooltip("Implement rotation on the X-axis.")] + [SerializeField] public bool XAxisRotation; - [Tooltip("Implement rotation on the Y-axis.")] [SerializeField] + [Tooltip("Implement rotation on the Y-axis.")] + [SerializeField] public bool YAxisRotation; - [Tooltip("Implement rotation on the Z-axis.")] [SerializeField] + [Tooltip("Implement rotation on the Z-axis.")] + [SerializeField] public bool ZAxisRotation; } } diff --git a/workers/unity/Assets/Fps/Scripts/PlayerControls/IControlProvider.cs b/workers/unity/Assets/Fps/Scripts/PlayerControls/IControlProvider.cs index 0bbe99ab..c7f7d37f 100644 --- a/workers/unity/Assets/Fps/Scripts/PlayerControls/IControlProvider.cs +++ b/workers/unity/Assets/Fps/Scripts/PlayerControls/IControlProvider.cs @@ -1,4 +1,4 @@ -using UnityEngine; +using UnityEngine; namespace Fps.PlayerControls { diff --git a/workers/unity/Assets/Fps/Scripts/PlayerControls/KeyboardControls.cs b/workers/unity/Assets/Fps/Scripts/PlayerControls/KeyboardControls.cs index 20ce81ea..36aabe72 100644 --- a/workers/unity/Assets/Fps/Scripts/PlayerControls/KeyboardControls.cs +++ b/workers/unity/Assets/Fps/Scripts/PlayerControls/KeyboardControls.cs @@ -1,4 +1,4 @@ -using UnityEngine; +using UnityEngine; namespace Fps.PlayerControls { diff --git a/workers/unity/Assets/Fps/Scripts/PlayerControls/MobileControls.cs b/workers/unity/Assets/Fps/Scripts/PlayerControls/MobileControls.cs index d2e15864..9cc9e19c 100644 --- a/workers/unity/Assets/Fps/Scripts/PlayerControls/MobileControls.cs +++ b/workers/unity/Assets/Fps/Scripts/PlayerControls/MobileControls.cs @@ -1,4 +1,4 @@ -using System.Collections; +using System.Collections; using Fps.UI; using UnityEngine; diff --git a/workers/unity/Assets/Fps/Scripts/Ragdoll/InformRagdollOfGun.cs b/workers/unity/Assets/Fps/Scripts/Ragdoll/InformRagdollOfGun.cs index 0b02e469..d1f56f4b 100644 --- a/workers/unity/Assets/Fps/Scripts/Ragdoll/InformRagdollOfGun.cs +++ b/workers/unity/Assets/Fps/Scripts/Ragdoll/InformRagdollOfGun.cs @@ -1,4 +1,4 @@ -using Fps.Guns; +using Fps.Guns; using UnityEngine; namespace Fps.Ragdoll diff --git a/workers/unity/Assets/Fps/Scripts/Ragdoll/LookAtRagdoll.cs b/workers/unity/Assets/Fps/Scripts/Ragdoll/LookAtRagdoll.cs index e907d899..ba3328f5 100644 --- a/workers/unity/Assets/Fps/Scripts/Ragdoll/LookAtRagdoll.cs +++ b/workers/unity/Assets/Fps/Scripts/Ragdoll/LookAtRagdoll.cs @@ -1,4 +1,4 @@ -using Improbable.Gdk.Core; +using Improbable.Gdk.Core; using Improbable.Gdk.Subscriptions; using UnityEngine; diff --git a/workers/unity/Assets/Fps/Scripts/Ragdoll/PoolableRagdoll.cs b/workers/unity/Assets/Fps/Scripts/Ragdoll/PoolableRagdoll.cs index 33679e99..73c80854 100644 --- a/workers/unity/Assets/Fps/Scripts/Ragdoll/PoolableRagdoll.cs +++ b/workers/unity/Assets/Fps/Scripts/Ragdoll/PoolableRagdoll.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.Collections.Generic; using Fps.ObjectPooling; diff --git a/workers/unity/Assets/Fps/Scripts/Ragdoll/RagdollDropGun.cs b/workers/unity/Assets/Fps/Scripts/Ragdoll/RagdollDropGun.cs index 1e3c1230..fe45ffa4 100644 --- a/workers/unity/Assets/Fps/Scripts/Ragdoll/RagdollDropGun.cs +++ b/workers/unity/Assets/Fps/Scripts/Ragdoll/RagdollDropGun.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading.Tasks; using Fps.Guns; using UnityEngine; diff --git a/workers/unity/Assets/Fps/Scripts/Ragdoll/RagdollSpawner.cs b/workers/unity/Assets/Fps/Scripts/Ragdoll/RagdollSpawner.cs index 4ef45c18..14384e3d 100644 --- a/workers/unity/Assets/Fps/Scripts/Ragdoll/RagdollSpawner.cs +++ b/workers/unity/Assets/Fps/Scripts/Ragdoll/RagdollSpawner.cs @@ -1,4 +1,4 @@ -using Fps.ObjectPooling; +using Fps.ObjectPooling; using Improbable.Gdk.Subscriptions; using UnityEngine; diff --git a/workers/unity/Assets/Fps/Scripts/Respawning/RespawnHandler.cs b/workers/unity/Assets/Fps/Scripts/Respawning/RespawnHandler.cs index c87767ee..0ac23f9c 100644 --- a/workers/unity/Assets/Fps/Scripts/Respawning/RespawnHandler.cs +++ b/workers/unity/Assets/Fps/Scripts/Respawning/RespawnHandler.cs @@ -1,4 +1,4 @@ -using System.Collections; +using System.Collections; using Fps.SchemaExtensions; using Improbable; using Improbable.Gdk.Core; diff --git a/workers/unity/Assets/Fps/Scripts/Respawning/SpawnPoints/SpawnPointIndicator.cs b/workers/unity/Assets/Fps/Scripts/Respawning/SpawnPoints/SpawnPointIndicator.cs index 7321d35c..2dbbe7bc 100644 --- a/workers/unity/Assets/Fps/Scripts/Respawning/SpawnPoints/SpawnPointIndicator.cs +++ b/workers/unity/Assets/Fps/Scripts/Respawning/SpawnPoints/SpawnPointIndicator.cs @@ -1,4 +1,4 @@ -using UnityEngine; +using UnityEngine; namespace Fps.Respawning { diff --git a/workers/unity/Assets/Fps/Scripts/SchemaExtensions/Vector3Extensions.cs b/workers/unity/Assets/Fps/Scripts/SchemaExtensions/Vector3Extensions.cs index 24026133..1911eca2 100644 --- a/workers/unity/Assets/Fps/Scripts/SchemaExtensions/Vector3Extensions.cs +++ b/workers/unity/Assets/Fps/Scripts/SchemaExtensions/Vector3Extensions.cs @@ -1,4 +1,4 @@ -using UnityEngine; +using UnityEngine; namespace Fps.SchemaExtensions { diff --git a/workers/unity/Assets/Fps/Scripts/SimulatedPlayer/SimulatedPlayerDriver.cs b/workers/unity/Assets/Fps/Scripts/SimulatedPlayer/SimulatedPlayerDriver.cs index 9b5f3d80..699ba47f 100644 --- a/workers/unity/Assets/Fps/Scripts/SimulatedPlayer/SimulatedPlayerDriver.cs +++ b/workers/unity/Assets/Fps/Scripts/SimulatedPlayer/SimulatedPlayerDriver.cs @@ -1,4 +1,4 @@ -using System.Collections; +using System.Collections; using Fps.Guns; using Fps.Movement; using Fps.WorkerConnectors; diff --git a/workers/unity/Assets/Fps/Scripts/SimulatedPlayer/SimulatedPlayerManager.cs b/workers/unity/Assets/Fps/Scripts/SimulatedPlayer/SimulatedPlayerManager.cs index 54f93da1..2b634efe 100644 --- a/workers/unity/Assets/Fps/Scripts/SimulatedPlayer/SimulatedPlayerManager.cs +++ b/workers/unity/Assets/Fps/Scripts/SimulatedPlayer/SimulatedPlayerManager.cs @@ -1,4 +1,4 @@ -using Fps.WorkerConnectors; +using Fps.WorkerConnectors; using Improbable.Gdk.Core; using Improbable.Gdk.Subscriptions; using UnityEngine; diff --git a/workers/unity/Assets/Fps/Scripts/SimulatedPlayer/SimulatedPlayerProxyManager.cs b/workers/unity/Assets/Fps/Scripts/SimulatedPlayer/SimulatedPlayerProxyManager.cs index f3a92293..36956bc9 100644 --- a/workers/unity/Assets/Fps/Scripts/SimulatedPlayer/SimulatedPlayerProxyManager.cs +++ b/workers/unity/Assets/Fps/Scripts/SimulatedPlayer/SimulatedPlayerProxyManager.cs @@ -1,4 +1,4 @@ -using Fps.WorkerConnectors; +using Fps.WorkerConnectors; using Improbable.Gdk.Core; using Improbable.Gdk.Subscriptions; using UnityEngine; diff --git a/workers/unity/Assets/Fps/Scripts/UI/Hud/LowHealthVignette.cs b/workers/unity/Assets/Fps/Scripts/UI/Hud/LowHealthVignette.cs index 3c58ab10..23b6545c 100644 --- a/workers/unity/Assets/Fps/Scripts/UI/Hud/LowHealthVignette.cs +++ b/workers/unity/Assets/Fps/Scripts/UI/Hud/LowHealthVignette.cs @@ -1,4 +1,4 @@ -using System; +using System; using UnityEngine; using UnityEngine.Rendering.PostProcessing; @@ -8,16 +8,20 @@ namespace Fps.UI [PostProcess(typeof(LowHealthVignetteProcessor), PostProcessEvent.AfterStack, "FPS/Low Health Vignette")] public sealed class LowHealthVignette : PostProcessEffectSettings { - [Range(0f, 1f)] [Tooltip("Health as a decimal.")] + [Range(0f, 1f)] + [Tooltip("Health as a decimal.")] public FloatParameter health = new FloatParameter { value = 0.5f }; - [Range(0f, 360f)] [Tooltip("Yaw of incoming damage, normalised.")] + [Range(0f, 360f)] + [Tooltip("Yaw of incoming damage, normalised.")] public FloatParameter damageYaw = new FloatParameter { value = 0f }; - [Range(0f, 32f)] [Tooltip("Arc angle of the damage effect.")] + [Range(0f, 32f)] + [Tooltip("Arc angle of the damage effect.")] public FloatParameter damageFocus = new FloatParameter { value = 0f }; - [Range(0f, 1f)] [Tooltip("Strength of the damage effect.")] + [Range(0f, 1f)] + [Tooltip("Strength of the damage effect.")] public FloatParameter damageIntensity = new FloatParameter { value = 0f }; [Tooltip("Vignette Mask.")] public TextureParameter VignetteMask = new TextureParameter(); diff --git a/workers/unity/Assets/Fps/Scripts/UI/Hud/Mobile/IMobileUI.cs b/workers/unity/Assets/Fps/Scripts/UI/Hud/Mobile/IMobileUI.cs index 5ac8cbce..713d75c6 100644 --- a/workers/unity/Assets/Fps/Scripts/UI/Hud/Mobile/IMobileUI.cs +++ b/workers/unity/Assets/Fps/Scripts/UI/Hud/Mobile/IMobileUI.cs @@ -1,4 +1,4 @@ -using UnityEngine; +using UnityEngine; namespace Fps.UI { diff --git a/workers/unity/Assets/Fps/Scripts/UI/Hud/Mobile/MobileAnalogueControls.cs b/workers/unity/Assets/Fps/Scripts/UI/Hud/Mobile/MobileAnalogueControls.cs index 4a32e825..462b7095 100644 --- a/workers/unity/Assets/Fps/Scripts/UI/Hud/Mobile/MobileAnalogueControls.cs +++ b/workers/unity/Assets/Fps/Scripts/UI/Hud/Mobile/MobileAnalogueControls.cs @@ -1,4 +1,4 @@ -using System; +using System; using UnityEngine; namespace Fps.UI diff --git a/workers/unity/Assets/Fps/Scripts/UI/Hud/Mobile/MobileUI.cs b/workers/unity/Assets/Fps/Scripts/UI/Hud/Mobile/MobileUI.cs index 1753f805..21b9636c 100644 --- a/workers/unity/Assets/Fps/Scripts/UI/Hud/Mobile/MobileUI.cs +++ b/workers/unity/Assets/Fps/Scripts/UI/Hud/Mobile/MobileUI.cs @@ -1,4 +1,4 @@ -using UnityEngine; +using UnityEngine; namespace Fps.UI { diff --git a/workers/unity/Assets/Fps/Scripts/UI/Hud/Mobile/MobileUIStandIn.cs b/workers/unity/Assets/Fps/Scripts/UI/Hud/Mobile/MobileUIStandIn.cs index 22fec4c9..1776bcc0 100644 --- a/workers/unity/Assets/Fps/Scripts/UI/Hud/Mobile/MobileUIStandIn.cs +++ b/workers/unity/Assets/Fps/Scripts/UI/Hud/Mobile/MobileUIStandIn.cs @@ -1,4 +1,4 @@ -using UnityEngine; +using UnityEngine; // This class is used by MobileControls in place of a real MobileInterface until a valid ref is found namespace Fps.UI diff --git a/workers/unity/Assets/Fps/Scripts/UI/Hud/Mobile/TouchscreenButton.cs b/workers/unity/Assets/Fps/Scripts/UI/Hud/Mobile/TouchscreenButton.cs index 04ca77fb..5d01e9e2 100644 --- a/workers/unity/Assets/Fps/Scripts/UI/Hud/Mobile/TouchscreenButton.cs +++ b/workers/unity/Assets/Fps/Scripts/UI/Hud/Mobile/TouchscreenButton.cs @@ -1,4 +1,4 @@ -using UnityEngine; +using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; diff --git a/workers/unity/Assets/Fps/Scripts/UI/Hud/Mobile/TouchscreenButtonAnimator.cs b/workers/unity/Assets/Fps/Scripts/UI/Hud/Mobile/TouchscreenButtonAnimator.cs index 76b19c27..9869d700 100644 --- a/workers/unity/Assets/Fps/Scripts/UI/Hud/Mobile/TouchscreenButtonAnimator.cs +++ b/workers/unity/Assets/Fps/Scripts/UI/Hud/Mobile/TouchscreenButtonAnimator.cs @@ -1,4 +1,4 @@ -using System; +using System; using UnityEngine; namespace Fps.UI diff --git a/workers/unity/Assets/Fps/Scripts/UI/Managers/InGameScreenManager.cs b/workers/unity/Assets/Fps/Scripts/UI/Managers/InGameScreenManager.cs index a2f75596..71cefb73 100644 --- a/workers/unity/Assets/Fps/Scripts/UI/Managers/InGameScreenManager.cs +++ b/workers/unity/Assets/Fps/Scripts/UI/Managers/InGameScreenManager.cs @@ -1,4 +1,4 @@ -using UnityEngine; +using UnityEngine; using UnityEngine.UI; namespace Fps.UI diff --git a/workers/unity/Assets/Fps/Scripts/UI/Managers/ScreenManager.cs b/workers/unity/Assets/Fps/Scripts/UI/Managers/ScreenManager.cs index c2a00f18..0150d423 100644 --- a/workers/unity/Assets/Fps/Scripts/UI/Managers/ScreenManager.cs +++ b/workers/unity/Assets/Fps/Scripts/UI/Managers/ScreenManager.cs @@ -1,4 +1,4 @@ -using UnityEngine; +using UnityEngine; using UnityEngine.UI; namespace Fps.UI diff --git a/workers/unity/Assets/Fps/Scripts/Visibility/CameraClipQuality.cs b/workers/unity/Assets/Fps/Scripts/Visibility/CameraClipQuality.cs index 776e691e..b3e65abc 100644 --- a/workers/unity/Assets/Fps/Scripts/Visibility/CameraClipQuality.cs +++ b/workers/unity/Assets/Fps/Scripts/Visibility/CameraClipQuality.cs @@ -1,4 +1,4 @@ -using Fps.WorldTiles; +using Fps.WorldTiles; using UnityEngine; namespace Fps.Visibility diff --git a/workers/unity/Assets/Fps/Scripts/Visibility/FovManager.cs b/workers/unity/Assets/Fps/Scripts/Visibility/FovManager.cs index 38a82c93..46653f89 100644 --- a/workers/unity/Assets/Fps/Scripts/Visibility/FovManager.cs +++ b/workers/unity/Assets/Fps/Scripts/Visibility/FovManager.cs @@ -1,4 +1,4 @@ -using Fps.Guns; +using Fps.Guns; using Improbable.Gdk.Core; using Improbable.Gdk.Subscriptions; using UnityEngine; diff --git a/workers/unity/Assets/Fps/Scripts/Visibility/SkyboxCamera.cs b/workers/unity/Assets/Fps/Scripts/Visibility/SkyboxCamera.cs index 186497c2..f7286277 100644 --- a/workers/unity/Assets/Fps/Scripts/Visibility/SkyboxCamera.cs +++ b/workers/unity/Assets/Fps/Scripts/Visibility/SkyboxCamera.cs @@ -1,4 +1,4 @@ -using UnityEngine; +using UnityEngine; namespace Fps.Visibility { diff --git a/workers/unity/Assets/Fps/Scripts/WorldTiles/Map/MapQualitySettings.cs b/workers/unity/Assets/Fps/Scripts/WorldTiles/Map/MapQualitySettings.cs index f5bee30d..007a0368 100644 --- a/workers/unity/Assets/Fps/Scripts/WorldTiles/Map/MapQualitySettings.cs +++ b/workers/unity/Assets/Fps/Scripts/WorldTiles/Map/MapQualitySettings.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using UnityEngine; diff --git a/workers/unity/Assets/Fps/Scripts/WorldTiles/Map/MapTemplate.cs b/workers/unity/Assets/Fps/Scripts/WorldTiles/Map/MapTemplate.cs index 56a4cbc6..4cee71d0 100644 --- a/workers/unity/Assets/Fps/Scripts/WorldTiles/Map/MapTemplate.cs +++ b/workers/unity/Assets/Fps/Scripts/WorldTiles/Map/MapTemplate.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using Fps.WorldTiles; using UnityEngine; diff --git a/workers/unity/Assets/Fps/Scripts/WorldTiles/Tiles/TileCollapser.cs b/workers/unity/Assets/Fps/Scripts/WorldTiles/Tiles/TileCollapser.cs index 2f48a5d3..e6c7c510 100644 --- a/workers/unity/Assets/Fps/Scripts/WorldTiles/Tiles/TileCollapser.cs +++ b/workers/unity/Assets/Fps/Scripts/WorldTiles/Tiles/TileCollapser.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using UnityEngine; using Object = UnityEngine.Object; diff --git a/workers/unity/Assets/Fps/Scripts/WorldTiles/Tiles/TileCombinedMeshProvider.cs b/workers/unity/Assets/Fps/Scripts/WorldTiles/Tiles/TileCombinedMeshProvider.cs index 303609d0..9f90500a 100644 --- a/workers/unity/Assets/Fps/Scripts/WorldTiles/Tiles/TileCombinedMeshProvider.cs +++ b/workers/unity/Assets/Fps/Scripts/WorldTiles/Tiles/TileCombinedMeshProvider.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using UnityEngine; using Object = UnityEngine.Object; diff --git a/workers/unity/Assets/Fps/Scripts/WorldTiles/Tiles/TileFootprintHelper.cs b/workers/unity/Assets/Fps/Scripts/WorldTiles/Tiles/TileFootprintHelper.cs index 66938143..eaf32796 100644 --- a/workers/unity/Assets/Fps/Scripts/WorldTiles/Tiles/TileFootprintHelper.cs +++ b/workers/unity/Assets/Fps/Scripts/WorldTiles/Tiles/TileFootprintHelper.cs @@ -1,4 +1,4 @@ -using UnityEngine; +using UnityEngine; #if UNITY_EDITOR using UnityEditor; using UnityEditor.Experimental.SceneManagement; diff --git a/workers/unity/Assets/Fps/Scripts/WorldTiles/Tiles/TileTypeCollection.cs b/workers/unity/Assets/Fps/Scripts/WorldTiles/Tiles/TileTypeCollection.cs index a2df63fb..24bed46e 100644 --- a/workers/unity/Assets/Fps/Scripts/WorldTiles/Tiles/TileTypeCollection.cs +++ b/workers/unity/Assets/Fps/Scripts/WorldTiles/Tiles/TileTypeCollection.cs @@ -1,4 +1,4 @@ -using UnityEngine; +using UnityEngine; using UnityEngine.Profiling; using Random = System.Random; diff --git a/workers/unity/Assets/Fps/Scripts/WorldTiles/Tiles/TileTypeVolume.cs b/workers/unity/Assets/Fps/Scripts/WorldTiles/Tiles/TileTypeVolume.cs index f7d5a764..452bcbd8 100644 --- a/workers/unity/Assets/Fps/Scripts/WorldTiles/Tiles/TileTypeVolume.cs +++ b/workers/unity/Assets/Fps/Scripts/WorldTiles/Tiles/TileTypeVolume.cs @@ -1,4 +1,4 @@ -using UnityEngine; +using UnityEngine; namespace Fps.WorldTiles {