public ChasePlayer(IMover mover, IFlip flip, IMyAnimation animation, IStopEdge stopEdge, System.Func <bool> isPlayerRightSide) { _mover = mover; _flip = flip; _animation = animation; _stopEdge = stopEdge; _isPlayerRightSide = isPlayerRightSide; }
public Walk(IEntityController entityController, IMover mover, IMyAnimation animation, IFlip flip, params Transform[] patrols) { _mover = mover; _animation = animation; _entityController = entityController; _flip = flip; _patrols = patrols; }
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; }
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 Dead(IEntityController controller, IMyAnimation animation, System.Action deadCallback) { _controller = controller; _animation = animation; _deadCallback = deadCallback; }
public TakeHit(IHealth health, IMyAnimation animation) { _animation = animation; health.OnHealthChanged += (currentHealth, maxHealth) => OnEnter(); }
public Idle(IMover mover, IMyAnimation animation) { _mover = mover; _animation = animation; }