public ChasePlayer(IMover mover, IFlip flip, IMyAnimations animation, System.Func <bool> isPlayerRightSide) { _mover = mover; _flip = flip; _animation = animation; _isPlayerRightSide = isPlayerRightSide; }
public void RemoveListener(IFlip flip) { if (flips.Contains(flip)) { flips.Remove(flip); } }
public void AddListener(IFlip flip) { if (!flips.Contains(flip)) { flips.Add(flip); } }
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; }
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>(); }
//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>(); }