private void Awake() { _input = new MobileInput(); _mover = new MoverWithVelocity(this, moveSpeed); _animation = new CharacterAnimation(GetComponent <Animator>()); _flip = new FlipWithTransform(this); _onGround = GetComponent <IOnGround>(); _jump = new JumpMulti(GetComponent <Rigidbody2D>(), _onGround); _health = GetComponent <IHealth>(); }
public JumpMulti(Rigidbody2D rigidbody, IOnGround onGround) { _rigidbody = rigidbody; _onGround = onGround; }