Inheritance: System.EventArgs
Example #1
0
        public void throwKilled(PlayerClass killed, PlayerClass killer, string method)
        {
            if (onPlayerKilled == null)
            {
                return;
            }
            Death_Sound.Play();
            if (killer == killed)
            {
                killer.score -= 1;
            }
            else if (killer != null)
            {
                killer.score += 1;
            }
            else
            {
                killed.score -= 1;
            }
            DeathEventArgs args = new DeathEventArgs(killed, killer, method);

            onPlayerKilled(this, args);
        }
Example #2
0
        private void playerKilled(Object sender, DeathEventArgs args)
        {
            //Do things like announce death/method of death

            detectWinner();
        }