From d98e741a6e98b3eac4e9ead7953490ca4aa2e29c Mon Sep 17 00:00:00 2001 From: Syntriax Date: Tue, 21 Mar 2023 16:05:55 +0300 Subject: [PATCH] refactor: Added Backing Fields to BaseSpeed & MovementMultiplier to Expose to Editor --- Runtime/Bases/MovementBase.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Runtime/Bases/MovementBase.cs b/Runtime/Bases/MovementBase.cs index 3419f9a..d44bc76 100644 --- a/Runtime/Bases/MovementBase.cs +++ b/Runtime/Bases/MovementBase.cs @@ -9,8 +9,10 @@ namespace Syntriax.Modules.Movement protected IStateEnable stateEnable = null; protected IMovementController movementController = null; - public float BaseSpeed { get; set; } = 1f; - public float MovementMultiplier { get; set; } = 1f; + [SerializeField] private float _baseSpeed = 1f; + public float BaseSpeed { get => _baseSpeed; set => _baseSpeed = value; } + [SerializeField] private float _movementMultiplier = 1f; + public float MovementMultiplier { get => _movementMultiplier; set => _movementMultiplier = value; } public Action OnTakeOverStateChanged { get; set; } = null; private bool _canTakeOver = false;