void OnTriggerEnter(Collider collider) { if (collider.gameObject.tag == "Player") { _spell_manager.AddSpell(Matrix4x4.TRS(_translation, Quaternion.Euler(_rotation), _scaling)); StartCoroutine(DestroyAndPlaySound()); } }
public override void Initialize() { Stats = new HeroStats(Record, Data.SkinId); Model = Data.ChampionName; Death = new HeroDeath(this); SkinId = Data.SkinId; Score = new Score(); this.StatsUpdateTimer = new UpdateTimer(STATS_REFRESH_DELAY); base.Initialize(); SpellManager.AddSpell(4, SpellProvider.Instance.GetSpell(this, 4, Data.Summoner1Spell)); SpellManager.AddSpell(5, SpellProvider.Instance.GetSpell(this, 5, Data.Summoner2Spell)); }
public override void Create() { Game.Send(new HeroSpawnMessage(NetId, PlayerNo, Data.TeamId, SkinId, Data.Name, Model)); UpdateInfos(); UpdateStats(false); UpdateHeath(); if (Game.Map.Script.RecallAllowed) { Inventory.AddExtraItem(BLUE_PILL_ITEMID, 7); SpellManager.AddSpell(13, SpellProvider.Instance.GetSpell(this, 13, "Recall", true)); } }
public void OnDrop(PointerEventData eventData) { Transform dropedTransform = eventData.pointerDrag.gameObject.GetComponent <Transform>(); ItemDragHandler dropedDragHandler = dropedTransform.GetComponent <ItemDragHandler>(); Item dropedItem = dropedDragHandler.DragedItem; if (dropedItem != null) { if (!IsLocked && dropedItem.Data.Type == _itemType) { _image.enabled = true; _image.sprite = dropedItem.Data.ItemImage; _spellManager.AddSpell((ISpellsProvider)dropedItem.Data, Id); } } }