private void registerAbilities() { meleeBehavior = meleeConfig.AttachAbilityBehaviorTo(this.gameObject) as BasicAttackBehavior; abilityBehaviors = new AbilityBehavior[abilityConfigs.Length]; for (int i = 0; i < abilityConfigs.Length; i++) { AbilityConfig config = abilityConfigs[i]; abilityBehaviors[i] = config.AttachAbilityBehaviorTo(this.gameObject); } }
public void SetConfig(AbilityConfig toConfigureTo) { //TODO Account for other attributes such as sound and particles abilityConfig = toConfigureTo; character = GetComponent <Character>(); animator = GetComponent <Animator>(); weaponInUse = GetComponent <WeaponSystem>().GetCurrentWeapon(); targetsInRange = new HashSet <Character>(); OBSTACLE_LAYER_MASK = 1 << OBSTACLE_LAYER; }