public ChasePlayer(IMover mover, IFlip flip, IMyAnimations animation, System.Func <bool> isPlayerRightSide) { _mover = mover; _flip = flip; _animation = animation; _isPlayerRightSide = isPlayerRightSide; }
public Walk(IEntityController entityController, IMover mover, IMyAnimations animation, IFlip flip, params Transform[] patrols) { _mover = mover; _animation = animation; _flip = flip; _patrols = patrols; _entityController = entityController; }
public Attack(IHealth playerHealth, IFlip flip, IMyAnimations animation, IAttacker attacker, float maxAttackTime, System.Func <bool> isPlayerRightSide) { _flip = flip; _animation = animation; _attacker = attacker; _playerHealth = playerHealth; _maxAttackTime = maxAttackTime; _isPlayerRightSide = isPlayerRightSide; }
//bool _isAttack = false; private void Awake() { _input = new PcInput(); //!!!SpawnerMove değiştirmeyi unutma!!! _mover = new Mover(this, movespeed); _animation = new CharacterAnimation(GetComponent <Animator>()); _flip = new FlipWithTranform(this); _jump = new Jump(GetComponent <Rigidbody2D>()); _onGround = GetComponent <IOnground>(); _health = GetComponent <IHealth>(); _audioSource = GetComponent <AudioSource>(); }
public Dead(IEntityController controller, IMyAnimations animation, System.Action deadCallBack) { _animation = animation; _controller = controller; _deadCallBack = deadCallBack; }
public Idle(IMover mover, IMyAnimations animation) { _mover = mover; _animation = animation; _maxStandTime = Random.Range(4f, 10f); }
public TakeHit(IHealth health, IMyAnimations animation) { _animation = animation; health.OnHealthChanged += (currentHealth, maxHealth) => OnEnter(); }