public void notifyHostAboutCollectedSpell(int sID, string spellName) { var spellCollectedEvnt = CollectSpellEvent.Create(Bolt.GlobalTargets.OnlyServer); spellCollectedEvnt.SpellcasterID = sID; spellCollectedEvnt.SpellName = spellName; spellCollectedEvnt.Send(); }
/*Only the server recieves this event.*/ public override void OnEvent(CollectSpellEvent evnt) { BoltConsole.Write("SERVER: Recieved a new spell collected event"); gameStateEntity.GetComponent <NetworkGameState>() .onCollectedSpell(evnt.SpellcasterID, evnt.SpellName); }