기존 Player 스크립트 제거
This commit is contained in:
parent
c1ac0130c5
commit
9a7e8f867a
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 67cd165408b4f85469fbe1b9ecf3b9e5
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: bc99ee6ab7cf7d34fb103aa950497c91
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,191 +0,0 @@
|
|||||||
// using System.Collections;
|
|
||||||
// using UnityEngine;
|
|
||||||
// using UnityEngine.AddressableAssets;
|
|
||||||
// using UnityEngine.InputSystem;
|
|
||||||
// using UnityEngine.Serialization;
|
|
||||||
//
|
|
||||||
// namespace DDD
|
|
||||||
// {
|
|
||||||
// public class RestaurantPlayer : MonoBehaviour
|
|
||||||
// {
|
|
||||||
// #region Variables
|
|
||||||
//
|
|
||||||
// private RestaurantPlayerDataSo _playerData;
|
|
||||||
// private RestaurantPlayerView _playerView;
|
|
||||||
//
|
|
||||||
// private InputAction _moveAction;
|
|
||||||
// private InputAction _dashAction;
|
|
||||||
// private Coroutine _dashInstance;
|
|
||||||
//
|
|
||||||
// private Vector3 _inputDirection;
|
|
||||||
// private Vector3 _currentDirection = Vector3.back;
|
|
||||||
//
|
|
||||||
// public bool IsMoving;
|
|
||||||
// public bool IsDashing;
|
|
||||||
// public bool IsDashCoolDownActive;
|
|
||||||
//
|
|
||||||
// private float _finalSpeed;
|
|
||||||
//
|
|
||||||
// private PlayerStateMachine _stateMachine;
|
|
||||||
//
|
|
||||||
// #endregion
|
|
||||||
//
|
|
||||||
// // Unity events
|
|
||||||
//
|
|
||||||
// #region Unity events
|
|
||||||
//
|
|
||||||
// private void Awake()
|
|
||||||
// {
|
|
||||||
// _playerData = Addressables.LoadAssetAsync<RestaurantPlayerDataSo>("RestaurantPlayerDataSo").WaitForCompletion();
|
|
||||||
// _playerView = GetComponent<RestaurantPlayerView>();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// private void Start()
|
|
||||||
// {
|
|
||||||
// _moveAction = InputManager.Instance.GetAction(InputActionMaps.Restaurant, nameof(RestaurantActions.Move));
|
|
||||||
// _dashAction = InputManager.Instance.GetAction(InputActionMaps.Restaurant, nameof(RestaurantActions.Dash));
|
|
||||||
//
|
|
||||||
// _moveAction.performed += OnMove;
|
|
||||||
// _moveAction.canceled += OnMove;
|
|
||||||
// _dashAction.performed += OnDash;
|
|
||||||
//
|
|
||||||
// _stateMachine = new PlayerStateMachine();
|
|
||||||
// ChangeState(new IdleState(this, _playerView));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// //public CellManager cellManager;
|
|
||||||
// private void Update()
|
|
||||||
// {
|
|
||||||
// _stateMachine.Update();
|
|
||||||
//
|
|
||||||
// FlipVisualLook();
|
|
||||||
//
|
|
||||||
// //UpdateCell
|
|
||||||
// //cellManager.SetupCell(transform.position);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// private void FixedUpdate()
|
|
||||||
// {
|
|
||||||
// if (!CanMove()) return;
|
|
||||||
//
|
|
||||||
// Move();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// private void OnDestroy()
|
|
||||||
// {
|
|
||||||
// _moveAction.performed -= OnMove;
|
|
||||||
// _moveAction.canceled -= OnMove;
|
|
||||||
// _dashAction.performed -= OnDash;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// #endregion
|
|
||||||
//
|
|
||||||
// // Methods
|
|
||||||
// #region Methods
|
|
||||||
//
|
|
||||||
// public void SetCurrentDirection(Vector3 normalDirection)
|
|
||||||
// {
|
|
||||||
// if (normalDirection == Vector3.zero) return;
|
|
||||||
//
|
|
||||||
// _currentDirection = normalDirection;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// private void FlipVisualLook()
|
|
||||||
// {
|
|
||||||
// Vector3 localScale = _playerView.GetLocalScale();
|
|
||||||
// localScale.x = _currentDirection.x switch
|
|
||||||
// {
|
|
||||||
// > 0.01f => -Mathf.Abs(localScale.x),
|
|
||||||
// < -0.01f => Mathf.Abs(localScale.x),
|
|
||||||
// _ => localScale.x
|
|
||||||
// };
|
|
||||||
// _playerView.SetLocalScale(localScale);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void OnMove(InputAction.CallbackContext context)
|
|
||||||
// {
|
|
||||||
// var movementInput = _moveAction.ReadValue<Vector2>();
|
|
||||||
// _inputDirection = new Vector3(movementInput.x, 0, movementInput.y).normalized;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool CanMove()
|
|
||||||
// {
|
|
||||||
// return _playerData.IsMoveEnabled && !IsDashing;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void Move()
|
|
||||||
// {
|
|
||||||
// SetCurrentDirection(_inputDirection);
|
|
||||||
// IsMoving = _inputDirection != Vector3.zero;
|
|
||||||
//
|
|
||||||
// var finalVelocity = _inputDirection * _playerData.MoveSpeed;
|
|
||||||
// _playerView.SetVelocity(finalVelocity);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void OnDash(InputAction.CallbackContext context)
|
|
||||||
// {
|
|
||||||
// if (!CanDash()) return;
|
|
||||||
//
|
|
||||||
// Dash();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool CanDash()
|
|
||||||
// {
|
|
||||||
// return _playerData.IsDashEnabled && !IsDashing && !IsDashCoolDownActive;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void Dash()
|
|
||||||
// {
|
|
||||||
// Utils.StartUniqueCoroutine(this, ref _dashInstance, DashCoroutine());
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// private IEnumerator DashCoroutine()
|
|
||||||
// {
|
|
||||||
// IsDashing = true;
|
|
||||||
// IsDashCoolDownActive = true;
|
|
||||||
// _playerView.PlayDashParticle();
|
|
||||||
//
|
|
||||||
// AudioManager.Instance.PlaySfx(_playerData.DashSfxName);
|
|
||||||
//
|
|
||||||
// var dashDirection = _inputDirection;
|
|
||||||
// if (dashDirection == Vector3.zero)
|
|
||||||
// {
|
|
||||||
// dashDirection = _currentDirection;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// var elapsedTime = 0f;
|
|
||||||
// while (elapsedTime <= _playerData.DashTime)
|
|
||||||
// {
|
|
||||||
// var finalVelocity = dashDirection * _playerData.DashSpeed;
|
|
||||||
// _playerView.SetVelocity(finalVelocity);
|
|
||||||
//
|
|
||||||
// elapsedTime += Time.fixedDeltaTime;
|
|
||||||
// yield return new WaitForFixedUpdate();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// EndDash(_playerData.DashCooldown);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void EndDash(float dashCooldown = float.PositiveInfinity)
|
|
||||||
// {
|
|
||||||
// Utils.EndUniqueCoroutine(this, ref _dashInstance);
|
|
||||||
// _playerView.SetVelocity(Vector3.zero);
|
|
||||||
// IsDashing = false;
|
|
||||||
//
|
|
||||||
// if (float.IsPositiveInfinity(dashCooldown))
|
|
||||||
// {
|
|
||||||
// dashCooldown = _playerData.DashCooldown;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // TODO : ui 연동
|
|
||||||
// StartCoroutine(Utils.CoolDownCoroutine(dashCooldown, () => IsDashCoolDownActive = false));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void ChangeState(IStateMachine stateMachine)
|
|
||||||
// {
|
|
||||||
// _stateMachine.ChangeState(stateMachine);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// #endregion
|
|
||||||
// }
|
|
||||||
// }
|
|
@ -1,2 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 620909d88f805ee4898b9af964a7f0e8
|
|
@ -1,24 +0,0 @@
|
|||||||
using UnityEngine;
|
|
||||||
using UnityEngine.InputSystem;
|
|
||||||
using UnityEngine.Serialization;
|
|
||||||
|
|
||||||
namespace DDD
|
|
||||||
{
|
|
||||||
[CreateAssetMenu(fileName = "RestaurantPlayerDataSo", menuName = "ScriptableObjects/RestaurantPlayerDataSo")]
|
|
||||||
public class RestaurantPlayerDataSo : ScriptableObject
|
|
||||||
{
|
|
||||||
public bool IsMoveEnabled = true;
|
|
||||||
public float MoveSpeed = 7f;
|
|
||||||
|
|
||||||
public bool IsDashEnabled = true;
|
|
||||||
public float DashSpeed = 20f;
|
|
||||||
public float DashTime = 0.2f;
|
|
||||||
public float DashCooldown = 2f;
|
|
||||||
|
|
||||||
public string WalkingSfxName;
|
|
||||||
public string DashSfxName;
|
|
||||||
|
|
||||||
public InputActionReference MoveActionReference;
|
|
||||||
public InputActionReference DashActionReference;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,2 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 5583898a24cc9c7419aec8b01ee0fde4
|
|
@ -1,57 +0,0 @@
|
|||||||
// using Spine;
|
|
||||||
// using UnityEngine;
|
|
||||||
//
|
|
||||||
// namespace DDD
|
|
||||||
// {
|
|
||||||
// public static class RestaurantSpineAnimation
|
|
||||||
// {
|
|
||||||
// public const string Idle = "Idle";
|
|
||||||
// public const string Walking = "RunFast";
|
|
||||||
// public const string ServingIdle = "Serving/ServingIdle";
|
|
||||||
// public const string Serving = "Serving/ServingFast";
|
|
||||||
// public const string Dash = "Dash";
|
|
||||||
// public const string CleaningFloor = "Cleaning/CleaningFloor";
|
|
||||||
// public const string CleaningTable = "Cleaning/CleaningTable";
|
|
||||||
// public const string MakingCocktail = "BeerMaker";
|
|
||||||
// public const string Pumping = "Attack/AttackWhip";
|
|
||||||
// public const string AttackSlime = "Attack/AttackSlime";
|
|
||||||
// public const string AttackLimeTree = "Attack/AttackBat";
|
|
||||||
// public const string CookingFried = "Cooking/CookingFried";
|
|
||||||
// public const string CookingStew = "Cooking/CookingStew";
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public class RestaurantPlayerView : MonoBehaviour
|
|
||||||
// {
|
|
||||||
// private Rigidbody _rigidbody;
|
|
||||||
// private Transform _visualLook;
|
|
||||||
// private SpineController _spineController;
|
|
||||||
//
|
|
||||||
// private ParticleSystem _dashParticle;
|
|
||||||
//
|
|
||||||
// private void Awake()
|
|
||||||
// {
|
|
||||||
// _rigidbody = GetComponent<Rigidbody>();
|
|
||||||
// _visualLook = transform.Find("VisualLook");
|
|
||||||
// _spineController = GetComponent<SpineController>();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void SetVelocity(Vector3 velocity) => _rigidbody.linearVelocity = velocity;
|
|
||||||
// public Vector3 GetLocalScale() => _visualLook.localScale;
|
|
||||||
// public void SetLocalScale(Vector3 localScale) => _visualLook.localScale = localScale;
|
|
||||||
//
|
|
||||||
// public void PlayDashParticle()
|
|
||||||
// {
|
|
||||||
// if (_dashParticle)
|
|
||||||
// {
|
|
||||||
// _dashParticle.Play();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public TrackEntry PlayAnimation(string animationName, bool isLoopActive, float speed = 1f, bool isReverse = false, int trackIndex = 0)
|
|
||||||
// => _spineController.PlayAnimation(animationName, isLoopActive, speed, isReverse, trackIndex);
|
|
||||||
// public TrackEntry PlayAnimationDuration(string animationName, bool isLoopActive, float duration, bool isReverse = false, int trackIndex = 0) =>
|
|
||||||
// _spineController.PlayAnimationDuration(animationName, isLoopActive, duration, isReverse, trackIndex);
|
|
||||||
// public TrackEntry AddAnimation(string animationName, bool isLoopActive, int trackIndex = 0)
|
|
||||||
// => _spineController.AddAnimation(animationName, isLoopActive, trackIndex);
|
|
||||||
// }
|
|
||||||
// }
|
|
@ -1,2 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: c665f9c268555a74a8a805d67d09c80e
|
|
Loading…
Reference in New Issue
Block a user