void GiveAbilityToAll() { foreach (GameObject g in GameObject.FindGameObjectsWithTag("Player")) { AbilityFactory.GetAbility(AbilityName).Process(g.GetComponent <PlayerScript>()); } /* * If you got some skills before you spawn a new player and you do not want to transfer previously gained skills, * basically use the code below and remove foreach statement above. * * AbilityFactory.GetAbility(AbilityName).Process(GameObject.FindWithTag("Player").GetComponent<PlayerScript>()); * */ Button selectedButton = EventSystem.current.currentSelectedGameObject.GetComponent <Button>(); selectedButton.enabled = false; selectedButton.gameObject.transform.GetChild(1).GetComponent <Image>().enabled = true; PS.abilityCount++; if (PS.abilityCount >= 3) { foreach (Button b in transform.parent.GetComponentsInChildren <Button>()) { b.enabled = false; b.gameObject.transform.GetChild(1).GetComponent <Image>().enabled = true; } } }
public Hero(int instanceId, HeroStatsConfig stats) { InstanceId = instanceId; Team = stats.Team; HealthPoints = new HealthPoints(stats.HealthPoints); MaxMovementForce = stats.MaxMovementForce; Attack = AttackFactory.GetAttack(stats.AttackConfig); Ability = AbilityFactory.GetAbility(stats.AbilityConfig); }
protected override void OnActivate() { GraveChill = AbilityFactory.GetAbility <visage_grave_chill>(); SoulAssumption = AbilityFactory.GetAbility <visage_soul_assumption>(); Context.Inventory.Attach(this); Config = new Config(this); }
protected override void OnActivate() { Hook = AbilityFactory.GetAbility <pudge_meat_hook>(); Rot = AbilityFactory.GetAbility <pudge_rot>(); Dismember = AbilityFactory.GetAbility <pudge_dismember>(); Context.Inventory.Attach(this); Config = new Config(this); }
protected override void OnActivate() { OverwhelmingOdds = AbilityFactory.GetAbility <legion_commander_overwhelming_odds>(); PressTheAttack = AbilityFactory.GetAbility <legion_commander_press_the_attack>(); Duel = AbilityFactory.GetAbility <legion_commander_duel>(); Context.Inventory.Attach(this); Config = new Config(this); }
private void Start() { var abilityNames = AbilityFactory.GetAbilityNames(); foreach (var abilityName in abilityNames) { var abilityButton = Instantiate(buttonPrefab, transform); abilityButton.GetComponent <AbilityButton>().ability = AbilityFactory.GetAbility(abilityName); } }
protected override void OnActivate() { Config = new Config(this); Enchant = AbilityFactory.GetAbility <enchantress_enchant>(); NaturesAttendants = AbilityFactory.GetAbility <enchantress_natures_attendants>(); Impetus = AbilityFactory.GetAbility <enchantress_impetus>(); Context.Inventory.Attach(this); }
protected override void OnActivate() { ArcaneBolt = AbilityFactory.GetAbility <skywrath_mage_arcane_bolt>(); ConcussiveShot = AbilityFactory.GetAbility <skywrath_mage_concussive_shot>(); AncientSeal = AbilityFactory.GetAbility <skywrath_mage_ancient_seal>(); MysticFlare = AbilityFactory.GetAbility <skywrath_mage_mystic_flare>(); Context.Inventory.Attach(this); Config = new Config(this); }
protected override void OnActivate() { base.OnActivate(); Context.Inventory.Attach(this); UpdateManager.Subscribe(OnUpdate, 25); MidnightPulse = AbilityFactory.GetAbility <enigma_midnight_pulse>(); BlackHole = AbilityFactory.GetAbility <enigma_black_hole>(); }
protected override void OnActivate() { Config = new Config(this); CurseOfSilent = AbilityFactory.GetAbility <silencer_curse_of_the_silent>(); GlaivesOfWisdom = AbilityFactory.GetAbility <silencer_glaives_of_wisdom>(); LastWord = AbilityFactory.GetAbility <silencer_last_word>(); GlobalSilence = AbilityFactory.GetAbility <silencer_global_silence>(); Context.Inventory.Attach(this); }
protected override void OnActivate() { ArcLightning = AbilityFactory.GetAbility <zuus_arc_lightning>(); LightningBolt = AbilityFactory.GetAbility <zuus_lightning_bolt>(); StaticField = AbilityFactory.GetAbility <zuus_static_field>(); Nimbus = AbilityFactory.GetAbility <zuus_cloud>(); ThundergodsWrath = AbilityFactory.GetAbility <zuus_thundergods_wrath>(); Context.Inventory.Attach(this); Config = new Config(this); }
public void install() { Skill1 = new Sdk.Abilities.npc_dota_hero_lion.lion_impale(_owner.Spellbook.Spell1); Skill2 = new Sdk.Abilities.npc_dota_hero_lion.lion_voodoo(_owner.Spellbook.Spell2); Skill3 = _factory.GetAbility <lion_mana_drain>(); Skill4 = new Sdk.Abilities.npc_dota_hero_lion.lion_finger_of_death(_owner.Spellbook.Spell4); UpdateManager.BeginInvoke(() => { _inventoryManager.Attach(this); }, 3000); }
protected override void OnActivate() { Impale = AbilityFactory.GetAbility <nyx_assassin_impale>(); ManaBurn = AbilityFactory.GetAbility <nyx_assassin_mana_burn>(); SpikedCarapace = AbilityFactory.GetAbility <nyx_assassin_spiked_carapace>(); Burrow = AbilityFactory.GetAbility <nyx_assassin_burrow>(); UnBurrow = AbilityFactory.GetAbility <nyx_assassin_unburrow>(); Vendetta = AbilityFactory.GetAbility <nyx_assassin_vendetta>(); Context.Inventory.Attach(this); Config = new Config(this); }
protected override void OnActivate() { Config = new Config(this); Shockwave = AbilityFactory.GetAbility <magnataur_shockwave>(); Empower = AbilityFactory.GetAbility <magnataur_empower>(); Skewer = AbilityFactory.GetAbility <magnataur_skewer>(); ReversePolarity = AbilityFactory.GetAbility <magnataur_reverse_polarity>(); Context.Inventory.Attach(this); Context.TargetSelector.Config.ShowTargetParticle.Item.SetValue(false); }
public Abilities(Config config) { AbilityFactory = config.Main.Context.AbilityFactory; Inventory = config.Main.Context.Inventory; ArcaneBolt = AbilityFactory.GetAbility <skywrath_mage_arcane_bolt>(); ConcussiveShot = AbilityFactory.GetAbility <skywrath_mage_concussive_shot>(); AncientSeal = AbilityFactory.GetAbility <skywrath_mage_ancient_seal>(); MysticFlare = AbilityFactory.GetAbility <skywrath_mage_mystic_flare>(); UpdateManager.BeginInvoke(() => { Inventory.Attach(this); }, 3000); }
protected override void OnActivate() { base.OnActivate(); GraveChill = AbilityFactory.GetAbility <visage_grave_chill>(); SoulAssumption = AbilityFactory.GetAbility <visage_soul_assumption>(); Context.Inventory.Attach(this); Config = new Config(this); LaneHelper = new LaneHelper(this); Updater = new Updater(this); foreach (var feature in features) { feature.Activate(Config); Log.Debug($"{feature.ToString()} activated."); } RendererManager.Draw += OnDraw; }
public void OnClick() { Ability ability = AbilityFactory.GetAbility(this.name_); ability.Process(); }
public void SetAbilityName(string name) { this.GetComponentInChildren <Text>().text = name; ability = AbilityFactory.GetAbility(name); }