Added NetworkSandbox.IsPlayer. It returns true if this sandbox is a player, which is the case when running as a Client, Host, or in Single-Player mode.

This commit is contained in:
Karrar
2024-09-13 23:52:47 +03:00
parent 363bdc191c
commit eae8457ca6
7 changed files with 36 additions and 4 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -29,6 +29,11 @@
Returns true if this <see cref="T:Netick.Unity.NetworkSandbox"/> is a host. Returns true if this <see cref="T:Netick.Unity.NetworkSandbox"/> is a host.
</summary> </summary>
</member> </member>
<member name="P:Netick.Unity.NetworkSandbox.IsPlayer">
<summary>
Returns true if this <see cref="T:Netick.Unity.NetworkSandbox"/> is a player, which is the case when running as a Client, Host, or in Single-Player mode.
</summary>
</member>
<member name="P:Netick.Unity.NetworkSandbox.Config"> <member name="P:Netick.Unity.NetworkSandbox.Config">
<summary> <summary>
Configuration data for Netick. Configuration data for Netick.
@@ -178,6 +183,22 @@
<para>Note: it's called with every resimulation on the client.</para> <para>Note: it's called with every resimulation on the client.</para>
</summary> </summary>
</member> </member>
<member name="M:Netick.Unity.NetworkSandbox.GetInput``1(System.Int32)">
<summary>
Gets a specific input for the next tick.
</summary>
<typeparam name="T"></typeparam>
<param name="index"></param>
<returns></returns>
</member>
<member name="M:Netick.Unity.NetworkSandbox.SetInput``1(``0,System.Int32)">
<summary>
Sets a specific input for the next tick.
</summary>
<typeparam name="T"></typeparam>
<param name="input"></param>
<param name="index"></param>
</member>
<member name="M:Netick.Unity.NetworkSandbox.GetObject(System.Int32)"> <member name="M:Netick.Unity.NetworkSandbox.GetObject(System.Int32)">
<summary> <summary>
Gets the <see cref="T:Netick.Unity.NetworkObject"/> with the specified id. Returns null in case no object with that id exists. Gets the <see cref="T:Netick.Unity.NetworkObject"/> with the specified id. Returns null in case no object with that id exists.
@@ -201,25 +222,31 @@
</member> </member>
<member name="M:Netick.Unity.NetworkSandbox.TickToTime(Netick.Tick)"> <member name="M:Netick.Unity.NetworkSandbox.TickToTime(Netick.Tick)">
<summary> <summary>
Converts <paramref name="tick"/> to time in seconds. Converts ticks to time in seconds.
</summary> </summary>
<param name="tick"></param> <param name="tick"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Netick.Unity.NetworkSandbox.TickToTime(System.Single)"> <member name="M:Netick.Unity.NetworkSandbox.TickToTime(System.Single)">
<summary> <summary>
Converts <paramref name="tick"/> to time in seconds. Converts ticks to time in seconds.
</summary> </summary>
<param name="tick"></param> <param name="tick"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Netick.Unity.NetworkSandbox.TimeToTick(System.Single)">
<summary>
Converts time (in seconds) to ticks.
</summary>
<returns></returns>
</member>
<member name="M:Netick.Unity.NetworkSandbox.AttachBehaviour(Netick.Unity.NetickBehaviour)"> <member name="M:Netick.Unity.NetworkSandbox.AttachBehaviour(Netick.Unity.NetickBehaviour)">
<summary> <summary>
Attachs a <see cref="T:Netick.Unity.NetickBehaviour"/> to the simulation. Attachs a <see cref="T:Netick.Unity.NetickBehaviour"/> to the simulation.
</summary> </summary>
<param name="behaviour"></param> <param name="behaviour"></param>
</member> </member>
<member name="M:Netick.Unity.NetworkSandbox.DeattachBehaviour(Netick.Unity.NetickBehaviour)"> <member name="M:Netick.Unity.NetworkSandbox.DetachBehaviour(Netick.Unity.NetickBehaviour)">
<summary> <summary>
Deattachs a <see cref="T:Netick.Unity.NetickBehaviour"/> from the simulation. Deattachs a <see cref="T:Netick.Unity.NetickBehaviour"/> from the simulation.
</summary> </summary>
@@ -411,6 +438,11 @@
</summary> </summary>
<param name="obj">The object which will become the parent of this object.</param> <param name="obj">The object which will become the parent of this object.</param>
</member> </member>
<member name="T:Netick.Unity.NetworkTransform">
<summary>
This component is used to replicate the position and rotation of an object.
</summary>
</member>
<member name="M:Netick.Unity.NetworkTransform.Teleport(UnityEngine.Vector3)"> <member name="M:Netick.Unity.NetworkTransform.Teleport(UnityEngine.Vector3)">
<summary> <summary>
Instantly moves the object. By calling this method, the object won't be interpolated for one tick. Instantly moves the object. By calling this method, the object won't be interpolated for one tick.

View File

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