예제 #1
0
		public static void KillCharacter(MyCharacter character, MyDamageInformation damageInfo)
		{
			Debug.Assert(Sync.IsServer, "KillCharacter called from client");
			KillCharacterMsg msg = new KillCharacterMsg()
			{
				entityId = character.EntityId,
                DamageInfo = damageInfo
			};

			character.Kill(false, damageInfo);
			Sync.Layer.SendMessageToAll<KillCharacterMsg>(ref msg);
		}