public virtual void InitializeAbility(AbilityConfig abilityConfig)
        {
            player = GetComponent <PlayerController>();

            if (abilityActivationMode == AbilityActivationMode.AutoActivation)
            {
                ActivateAbility();
            }
        }
        public override void InitializeAbility(AbilityConfig abilityConfig)
        {
            this.abilityConfig = abilityConfig;

            abilityType           = PlayerAbilityType.DoubleJump;
            abilityActivationMode = abilityConfig.DoubleJumpActivationType;

            abilityDuration = abilityConfig.JumpAbilityDuration;
            base.InitializeAbility(abilityConfig);
        }
Exemple #3
0
        public override void InitializeAbility(AbilityConfig abilityConfig)
        {
            this.abilityConfig = abilityConfig;

            abilityType           = PlayerAbilityType.SpeedMultiplier;
            abilityActivationMode = abilityConfig.SpeedMultiplierActivationType;

            abilityDuration = abilityConfig.SpeedMultiplierDuration;

            base.InitializeAbility(abilityConfig);
        }
Exemple #4
0
        protected void Awake()
        {
            _RB       = GetComponent <Rigidbody2D>();
            _Anim     = GetComponent <Animator>();
            _collider = GetComponent <Collider2D>();

            groundedCheckLength          = _collider.bounds.size.y / 2 + 0.1f;
            secondaryGroundedCheckOffset = _collider.bounds.size.x / 2 + 3f;
            almostGroundedCheckLength    = _collider.bounds.size.y / 2 + 7f;

            abilityConfig = Resources.Load <AbilityConfig>(GameConsts.AbilityConfigPath);

            AddListeners();
        }