コード例 #1
0
 public ChasePlayer(IMover mover, IFlip flip, IMyAnimations animation, System.Func <bool> isPlayerRightSide)
 {
     _mover             = mover;
     _flip              = flip;
     _animation         = animation;
     _isPlayerRightSide = isPlayerRightSide;
 }
コード例 #2
0
 public void RemoveListener(IFlip flip)
 {
     if (flips.Contains(flip))
     {
         flips.Remove(flip);
     }
 }
コード例 #3
0
 public void AddListener(IFlip flip)
 {
     if (!flips.Contains(flip))
     {
         flips.Add(flip);
     }
 }
コード例 #4
0
ファイル: Walk.cs プロジェクト: kafkasap/DungeonEscape
 public Walk(IEntityController entityController, IMover mover, IMyAnimations animation, IFlip flip, params Transform[] patrols)
 {
     _mover            = mover;
     _animation        = animation;
     _flip             = flip;
     _patrols          = patrols;
     _entityController = entityController;
 }
コード例 #5
0
ファイル: Attack.cs プロジェクト: kafkasap/DungeonEscape
 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;
 }
コード例 #6
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>();
 }
コード例 #7
0
        //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>();
        }