Esempio n. 1
0
 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>();
 }
Esempio n. 2
0
 public JumpMulti(Rigidbody2D rigidbody, IOnGround onGround)
 {
     _rigidbody = rigidbody;
     _onGround  = onGround;
 }