コード例 #1
0
 public ChasePlayer(IMover mover, IFlip flip, IMyAnimations animation, System.Func <bool> isPlayerRightSide)
 {
     _mover             = mover;
     _flip              = flip;
     _animation         = animation;
     _isPlayerRightSide = isPlayerRightSide;
 }
コード例 #2
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;
 }
コード例 #3
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;
 }
コード例 #4
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>();
        }
コード例 #5
0
 public Dead(IEntityController controller, IMyAnimations animation, System.Action deadCallBack)
 {
     _animation    = animation;
     _controller   = controller;
     _deadCallBack = deadCallBack;
 }
コード例 #6
0
 public Idle(IMover mover, IMyAnimations animation)
 {
     _mover        = mover;
     _animation    = animation;
     _maxStandTime = Random.Range(4f, 10f);
 }
コード例 #7
0
 public TakeHit(IHealth health, IMyAnimations animation)
 {
     _animation              = animation;
     health.OnHealthChanged += (currentHealth, maxHealth) => OnEnter();
 }