예제 #1
0
        private void OnEnable()
        {
            Grounder      = new Grounder(this);
            _mover        = new NewMover(this);
            _jumper       = new NewJumper(this);
            _playerLocker = new PlayerLocker(this);
            _glider       = new Glider(this);
            _attacker     = new BasicAttacker(this);

            Rigidbody.drag = PlayerParameters.BaseDrag;
            _canDash       = true;

            Grounder.Tick();
        }
예제 #2
0
        private void Awake()
        {
            AttackerTimer.SetTimer(_playerParameters.TimeBetweenAttacks);
            _waitForSecondsDash = new WaitForSeconds(_playerParameters.TimeBetweenDashes);

            Grounder      = new Grounder(this);
            LifeSystem    = new LifeSystem(this);
            _mover        = new NewMover(this);
            _jumper       = new Jumper(this);
            _playerLocker = new PlayerLocker(this);
            _glider       = new Glider(this);
            _attacker     = new BasicAttacker(this);
            _wallJumper   = new WallJumper(this);

            Rigidbody = this.GetComponent <Rigidbody2D>();

            // _attackerList = new List<IAttacker>();
            // _attackerList.Add(new BasicAttacker(this));
            // _attackerList.Add(new StrongAttacker(this));
        }