/*Not being used. * public void CombatSpellCast(string spellName) * { * var evnt = CombatCastEvent.Create(Bolt.GlobalTargets.OnlyServer); * evnt.Spellname = spellName; * evnt.Send(); * } */ //For combat API //Input: The damage you want to apply to the boss public void DealDmgToBoss(float dmg) { var evnt = DealDmgToBossEvent.Create(Bolt.GlobalTargets.OnlyServer); evnt.Dmg = dmg; evnt.Send(); }
/*Only the server recieves this event.*/ public override void OnEvent(DealDmgToBossEvent evnt) { gameStateEntity.GetComponent <NetworkGameState>() .DealDmgToBoss(evnt.Dmg); gameStateEntity.GetComponent <NetworkGameState>() .IncrementAttackCount(); }