Ejemplo n.º 1
0
        //Spellcaster calls this when they die to notify everyone.
        public void SpellcasterDied(int spellcasterID, string spellcasterClass)
        {
            var evnt = SpellcasterDiedEvent.Create(Bolt.GlobalTargets.Everyone);

            evnt.SpellcasterID    = spellcasterID;
            evnt.SpellcasterClass = spellcasterClass;
            evnt.Send();
        }
Ejemplo n.º 2
0
        public override void OnEvent(SpellcasterDiedEvent evnt)
        {
            playerSpellcaster = playerEntity.GetComponent <Player>().spellcaster;
            if (playerSpellcaster.spellcasterID == evnt.SpellcasterID)
            {
                //Display you died
                PanelHolder.instance.displayNotify("You Died", "Wait until your team finishes", "OK");
            }
            else
            {
                string fallenSpellcaster = evnt.SpellcasterClass;
                //Display a fallen spellcaster died
                PanelHolder.instance.displayNotify(evnt.SpellcasterClass + " Died", "", "OK");
            }

            if (BoltNetwork.IsServer)
            {
                gameStateEntity.GetComponent <NetworkGameState>().IncrementDeathCount();
            }
        }