using UnityEngine; namespace Passer { #if hNW_PHOTON && hPHOTON2 public partial class NetworkObject : INetworkObject { #else public partial class NetworkObject : MonoBehaviour, INetworkObject { #endif public static bool connected = true; private void Awake() { connected = true; } public static INetworkObject GetINetworkObject(FunctionCall functionCall) { if (functionCall.targetGameObject == null) return null; INetworkObject networkObj = functionCall.targetGameObject.GetComponent(); return networkObj; } public static INetworkObject GetINetworkObject(GameObject targetGameObject) { if (targetGameObject == null) return null; INetworkObject networkObj = targetGameObject.GetComponent(); return networkObj; } #if !hNW_PHOTON public void RPC(FunctionCall function) { } public void RPC(FunctionCall functionCall, bool value) { } public void RPC(FunctionCall functionCall, float value) { } public void RPC(FunctionCall functionCall, T value) { } #endif } public interface INetworkObject { void RPC(FunctionCall functionCall); //void RPC(FunctionCall functionCall, bool value); //void RPC(FunctionCall functionCall, float value); void RPC(FunctionCall functionCall, T value); } }