Ejemplo n.º 1
0
    internal void RecordFrag(TankController victim, TankController killer)
    {
        EventManager.destroyedEvent.Invoke(victim);

        victim.Deaths++;

        //don't reward points for same-team kills.
        if (ConfigValueStore.GetBoolValue("team_mode"))
        {
            if (OnSameTeam(victim.Name, killer.Name))
            {
                return;
            }
        }


        if (snitch != null)
        {
            if (snitch.GetComponent <SnitchBehaviour>().collector == victim)
            {
                killer.RewardSnitchPoints();
            }
        }

        killer.AddKillPoints();
        EventManager.killEvent.Invoke(killer);
    }