
🕹️ 실습 (2D 횡스크롤 스테이트머신)Background Parallaxpublic class ParallaxBackground : MonoBehaviour{ private Camera cam; [SerializeField] private float parallaxEffect; private float xPosition; private float length; void Start() { cam = Camera.main; length = GetComponent().bounds.size.x; xPosition = transform.position.x; } void Update() { float distanc..

🕹️ 실습 (2D 횡스크롤 스테이트머신)벽 슬라이드, 벽 점프 구현public class PlayerWallSlideState : PlayerState{ public PlayerWallSlideState(Player _player, PlayerStateMachine _stateMachine, string _animBoolName) : base(_player, _stateMachine, _animBoolName) { } public override void Enter() { base.Enter(); } public override void Update() { base.Update(); if (Input.GetKe..