Code cleanup

This commit is contained in:
Chris Langsenkamp 2020-02-05 00:53:14 -05:00
parent e3b299fec4
commit 4108b79340
3 changed files with 2 additions and 16 deletions

View File

@ -1,8 +1,4 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Mirror;
using System;
namespace Mirror.Examples.Chat
{
@ -13,7 +9,7 @@ public class ChatNetworkManager : NetworkManager
public void SetHostname(string hostname)
{
this.networkAddress = hostname;
networkAddress = hostname;
}
public ChatWindow chatWindow;
@ -34,10 +30,7 @@ public override void OnClientConnect(NetworkConnection conn)
base.OnClientConnect(conn);
// tell the server to create a player with this name
conn.Send(new CreatePlayerMessage
{
name = playerName
});
conn.Send(new CreatePlayerMessage { name = playerName });
}
private void OnCreatePlayer(NetworkConnection connection, CreatePlayerMessage createPlayerMessage)

View File

@ -1,6 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
@ -14,9 +12,7 @@ public class ChatWindow : MonoBehaviour
public void Awake()
{
Player.OnMessage += OnPlayerMessage;
}
private void OnPlayerMessage(Player player, string message)

View File

@ -1,7 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Mirror.Examples.Chat
{