void AddCaptureSlainEvent(CharacterClass.charName charKiller, string killerName, CharacterClass.charName charSlain, string slainName) { SlainEvent capture = new SlainEvent(); capture.killerName = killerName; capture.slainName = slainName; for (int i = 0; i < charPortraits.Count; i++) { if (charPortraits[i].charName == charKiller) { capture.killerSprite = charPortraits[i].charPortrait; } if (charPortraits[i].charName == charSlain) { capture.slainSprite = charPortraits[i].charPortrait; } killerText.text = killerName; slainText.text = slainName; } slainEventList.Add(capture); }
public void RpcEnqueueSlainEvent(string killerEntity, string deadEntity) { MobaEntity killer = GameManager.instance.GetMobaEntity(killerEntity); MobaEntity dead = GameManager.instance.GetMobaEntity(deadEntity); SlainEvent capture = new SlainEvent(killer, dead); slainEventList.Enqueue(capture); }
public SlainEvent Constructor() { SlainEvent capture = new SlainEvent(); capture.killerName = killerName; capture.slainName = slainName; capture.killerSprite = killerSprite; capture.slainSprite = slainSprite; return(capture); }
private IEnumerator ShowPlayerSlain(SlainEvent slainEvent) { //GetComponent<AudioSource>().PlayOneShot(slainSound); showSlainUi = true; killerImage.sprite = slainEvent.m_killerEntity.Icon; slainImage.sprite = slainEvent.m_deadEntity.Icon; killerText.text = slainEvent.m_killerEntity.DisplayName; slainText.text = slainEvent.m_deadEntity.DisplayName; yield return(new WaitForSeconds(8f)); showSlainUi = false; }