private void LateUpdate()
 {
     if (targetPlayer)
     {
         if (GameManager.Instance.ReturnMatchHasStarted())
         {
             buttonText.text = targetPlayer.ReturnPlayerName() + " " + targetPlayer.ReturnKills();
         }
     }
 }
Beispiel #2
0
    public void AttackHitEvent()
    {
        if (nextPlayer == null)
        {
            return;
        }
        Health target = nextPlayer.GetComponent <Health>();

        if (target == null)
        {
            return;
        }

        if (target.TakeDamage(damage))
        {
            //KillFeed.Instance.AddKillFeedItemIdentity(identity.ReturnPlayerName(), target.GetComponent<PlayerIdentity>().ReturnPlayerName());
            KillFeed.Instance.AddKillFeedItem(identity.ReturnPlayerName(), target.GetComponent <PlayerStatsTXT>().ReturnPlayerName());
            identity.AddKills();
        }
    }