예제 #1
0
        public static object Rpc(this FduObserverBase ob, string methodName, RpcTarget target, params object[] paras)
        {
            FduClusterView _viewInstance = ob.GetClusterView();

            if (_viewInstance == null)
            {
                Debug.LogError("[FduRPC]This observer is not registed to a cluster view yet. Game object name:" + ob.gameObject.name);
                return(null);
            }
            else
            {
                return(_viewInstance.Rpc(methodName, target, paras));
            }
        }
예제 #2
0
        public static object Rpc(this UnityEngine.MonoBehaviour mono, string methodName, RpcTarget target, params object[] paras)
        {
            FduClusterView _viewInstance = mono.GetClusterView();

            if (_viewInstance == null)
            {
                Debug.LogError("[FduRPC]There is no cluster view component attach to this game object. Game obejct name:" + mono.gameObject.name);
                return(null);
            }
            else
            {
                return(_viewInstance.Rpc(methodName, target, paras));
            }
        }