Moved PlayerSpawner to Netick.Samples namespace.

This commit is contained in:
Karrar
2025-02-28 21:25:08 +03:00
parent 33f4c44d51
commit f56df7fc48
9 changed files with 40 additions and 30 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -5,6 +5,9 @@ using Network = Netick.Unity.Network;
namespace Netick.Samples namespace Netick.Samples
{ {
/// <summary>
/// This is a helper script for quick prototyping, used to start Netick.
/// </summary>
[AddComponentMenu("Netick/Game Starter")] [AddComponentMenu("Netick/Game Starter")]
public class GameStarter : NetworkEventsListener public class GameStarter : NetworkEventsListener
{ {

View File

@@ -5,6 +5,9 @@ using Network = Netick.Unity.Network;
namespace Netick.Samples namespace Netick.Samples
{ {
/// <summary>
/// This is a helper script for quick prototyping, used to show useful network information of Netick.
/// </summary>
[AddComponentMenu("Netick/Network Info")] [AddComponentMenu("Netick/Network Info")]
public class NetworkInfo : NetworkEventsListener public class NetworkInfo : NetworkEventsListener
{ {

View File

@@ -1,13 +1,16 @@
using UnityEngine;
using Netick; using Netick;
using Netick.Unity; using Netick.Unity;
using UnityEngine; using Network = Netick.Unity.Network;
/// <summary> namespace Netick.Samples
/// This is a helper script for quick prototyping, used to spawn/despawn a player prefab when a player (client or host) has connected/disconnected.
/// </summary>
[AddComponentMenu("Netick/Player Spawner")]
public class PlayerSpawner : NetworkEventsListener
{ {
/// <summary>
/// This is a helper script for quick prototyping, used to spawn/despawn a player prefab when a player (client or host) has connected/disconnected.
/// </summary>
[AddComponentMenu("Netick/Player Spawner")]
public class PlayerSpawner : NetworkEventsListener
{
public GameObject PlayerPrefab; public GameObject PlayerPrefab;
public Transform SpawnPosition; public Transform SpawnPosition;
public float HorizontalOffset = 5f; public float HorizontalOffset = 5f;
@@ -34,4 +37,5 @@ public class PlayerSpawner : NetworkEventsListener
if (netObj != null) if (netObj != null)
Sandbox.Destroy(netObj); Sandbox.Destroy(netObj);
} }
}
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "com.karrar.netick", "name": "com.karrar.netick",
"version": "0.13.18", "version": "0.13.19",
"displayName": "Netick", "displayName": "Netick",
"description": "A networking solution for Unity", "description": "A networking solution for Unity",
"unity": "2021.3", "unity": "2021.3",