/// <summary> /// Called once when remote player attacks. /// </summary> void ClientNetworkManager_OnPlayerAttack(object sender, NetworkManager.PlayerAttackEventArgs e) { // Get remote player. var remotePlayer = Player.GetPlayerFromId(e.uniqueID); // Update position and rotation. remotePlayer.Position = new Vector2(e.posX, e.posY); remotePlayer.FacingDirection = e.facingDirection; #if DEBUG && !PSM //Log player disconnect. Console.WriteLine("Remote Player Attacked: Name: {0} ID: {1}", remotePlayer.Name, remotePlayer.UniqueID); #endif }
/// <summary> /// Called once when remote player attacks. /// </summary> void ServerNetworkManager_OnPlayerAttack(object sender, NetworkManager.PlayerAttackEventArgs e) { Console.WriteLine("Player Attacks: Id:{0}", e.uniqueID); }