Add StickGame Assets
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
using FishNet.Object.Helping;
|
||||
|
||||
namespace FishNet.Object
|
||||
{
|
||||
|
||||
#region Types.
|
||||
/// <summary>
|
||||
/// Lookup data for a RPC Link.
|
||||
/// </summary>
|
||||
internal struct RpcLink
|
||||
{
|
||||
/// <summary>
|
||||
/// ObjectId for link.
|
||||
/// </summary>
|
||||
public int ObjectId;
|
||||
/// <summary>
|
||||
/// NetworkBehaviour component index on ObjectId.
|
||||
/// </summary>
|
||||
public byte ComponentIndex;
|
||||
/// <summary>
|
||||
/// RpcHash for link.
|
||||
/// </summary>
|
||||
public uint RpcHash;
|
||||
/// <summary>
|
||||
/// Type of Rpc link is for.
|
||||
/// </summary>
|
||||
public RpcType RpcType;
|
||||
|
||||
public RpcLink(int objectId, byte componentIndex, uint rpcHash, RpcType rpcType)
|
||||
{
|
||||
ObjectId = objectId;
|
||||
ComponentIndex = componentIndex;
|
||||
RpcHash = rpcHash;
|
||||
RpcType = rpcType;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 05a91745dd829d043aadf391ac7b233e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace FishNet.Object.Helping
|
||||
{
|
||||
public enum RpcType : int
|
||||
{
|
||||
None = 0,
|
||||
Server = 1,
|
||||
Observers = 2,
|
||||
Target = 4,
|
||||
Replicate = 8,
|
||||
Reconcile = 16
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 09f9e7236f988c64fad54645f4cc7f8b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,49 @@
|
||||
|
||||
namespace FishNet.Object.Helping
|
||||
{
|
||||
|
||||
public static class CodegenHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns if a NetworkObject is deinitializing.
|
||||
/// </summary>
|
||||
/// <param name="nb"></param>
|
||||
/// <returns></returns>
|
||||
public static bool NetworkObject_Deinitializing(NetworkBehaviour nb)
|
||||
{
|
||||
if (nb == null)
|
||||
return true;
|
||||
|
||||
return nb.IsDeinitializing;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns if running as server.
|
||||
/// </summary>
|
||||
/// <param name="nb"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsServer(NetworkBehaviour nb)
|
||||
{
|
||||
if (nb == null)
|
||||
return false;
|
||||
|
||||
return nb.IsServer;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns if running as client.
|
||||
/// </summary>
|
||||
/// <param name="nb"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsClient(NetworkBehaviour nb)
|
||||
{
|
||||
if (nb == null)
|
||||
return false;
|
||||
|
||||
return nb.IsClient;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 149cde0042627604d810c2c7fc0f9176
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user