mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
Code cleanup
This commit is contained in:
parent
e3b299fec4
commit
4108b79340
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Mirror.Examples.Chat
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user