Esempio n. 1
0
 public ChasePlayer(IMover mover, IFlip flip, IMyAnimation animation, IStopEdge stopEdge, System.Func <bool> isPlayerRightSide)
 {
     _mover             = mover;
     _flip              = flip;
     _animation         = animation;
     _stopEdge          = stopEdge;
     _isPlayerRightSide = isPlayerRightSide;
 }
Esempio n. 2
0
 public Walk(IEntityController entityController, IMover mover, IMyAnimation animation, IFlip flip, params Transform[] patrols)
 {
     _mover            = mover;
     _animation        = animation;
     _entityController = entityController;
     _flip             = flip;
     _patrols          = patrols;
 }
Esempio n. 3
0
 public Attack(IHealth playerHealth, IFlip flip, IMyAnimation animation, IAttacker attacker, float maxAttackTime, System.Func <bool> isPlayerRightSide)
 {
     _flip              = flip;
     _animation         = animation;
     _attacker          = attacker;
     _playerHealth      = playerHealth;
     _maxAttackTime     = maxAttackTime;
     _isPlayerRightSide = isPlayerRightSide;
 }
Esempio n. 4
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. 5
0
 public Dead(IEntityController controller, IMyAnimation animation, System.Action deadCallback)
 {
     _controller   = controller;
     _animation    = animation;
     _deadCallback = deadCallback;
 }
Esempio n. 6
0
 public TakeHit(IHealth health, IMyAnimation animation)
 {
     _animation              = animation;
     health.OnHealthChanged += (currentHealth, maxHealth) => OnEnter();
 }
Esempio n. 7
0
 public Idle(IMover mover, IMyAnimation animation)
 {
     _mover     = mover;
     _animation = animation;
 }