示例#1
0
 private void Start()
 {
     _rb2d                        = GetComponent <Rigidbody2D>();
     _playerDirection             = GetComponent <PlayerDirection>();
     _playerMovementReadOnlyState = GetComponent <PlayerMovementReadOnlyState>();
     _playerHealth                = GetComponent <PlayerHealth>();
 }
示例#2
0
 // Start is called before the first frame update
 private void Start()
 {
     _rb2d          = GetComponent <Rigidbody2D>();
     _movementState = GetComponent <PlayerMovementReadOnlyState>();
     _state         = new State
     {
         MovingState = PlayerMovingState.Falling
     };
     _origin = transform.position;
 }