static void NetworkView_owner(JSVCall vc) { UnityEngine.NetworkView _this = (UnityEngine.NetworkView)vc.csObj; var result = _this.owner; JSMgr.datax.setObject((int)JSApi.SetType.Rval, result); }
private KeyValuePair <GameObject, Prefab> ReplacePrefabInstance(UnityEngine.NetworkView oldView) { var prefabView = PrefabUtility.GetPrefabParent(oldView) as UnityEngine.NetworkView; Prefab prefab = null; if (prefabView != null) { string prefabFile = AssetDatabase.GetAssetPath(prefabView); prefab = prefabs.Find(prefabFile); if (prefab == null) { prefab = new Prefab { filename = prefabFile }; if (!String.IsNullOrEmpty(prefabFile)) { prefabs.Add(prefabFile, prefab); } } } var prefabInstance = PrefabUtility.FindPrefabRoot(oldView.gameObject); Replace(oldView); return(new KeyValuePair <GameObject, Prefab>(prefabInstance, prefab)); }
static void NetworkView_isMine(JSVCall vc) { UnityEngine.NetworkView _this = (UnityEngine.NetworkView)vc.csObj; var result = _this.isMine; JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(result)); }
private void Awake() { _transform = GetComponent<Transform>(); _renderer = GetComponent<Renderer>(); _networkView = GetComponent<NetworkView>(); _destination = transform.position; _renderer.material.color = kColors[Random.Range(0, kColors.Length)]; _transformInterpolation = new NetworkTransformInterpolation(); _transformInterpolation.InterpolationBackTime = NetworkInterpolationBackTime; }
private void _getNetworkView() { GameObject go = Fsm.GetOwnerDefaultTarget(gameObject); if (go == null) { return; } _networkView = go.GetComponent<NetworkView>(); }
void Awake() { // Create a layer mask for the floor layer. floorMask = LayerMask.GetMask ("Floor"); // Set up references. anim = GetComponent <Animator> (); playerRigidbody = GetComponent <Rigidbody> (); netView = GetComponent<NetworkView>(); }
void Awake() { // Create a layer mask for the Shootable layer. shootableMask = LayerMask.GetMask ("Shootable"); // Set up the references. gunParticles = GetComponent<ParticleSystem> (); gunLine = GetComponent <LineRenderer> (); audioSource = GetComponents<AudioSource>(); gunLight = GetComponent<Light> (); // Get the network view netView = GetComponentInParent<NetworkView>(); }
// fields // properties static void NetworkView_observed(JSVCall vc) { if (vc.bGet) { UnityEngine.NetworkView _this = (UnityEngine.NetworkView)vc.csObj; var result = _this.observed; JSMgr.datax.setObject((int)JSApi.SetType.Rval, result); } else { UnityEngine.Component arg0 = (UnityEngine.Component)JSMgr.datax.getObject((int)JSApi.GetType.Arg); UnityEngine.NetworkView _this = (UnityEngine.NetworkView)vc.csObj; _this.observed = arg0; } }
static void NetworkView_stateSynchronization(JSVCall vc) { if (vc.bGet) { UnityEngine.NetworkView _this = (UnityEngine.NetworkView)vc.csObj; var result = _this.stateSynchronization; JSApi.setEnum((int)JSApi.SetType.Rval, (int)result); } else { UnityEngine.NetworkStateSynchronization arg0 = (UnityEngine.NetworkStateSynchronization)JSApi.getEnum((int)JSApi.GetType.Arg); UnityEngine.NetworkView _this = (UnityEngine.NetworkView)vc.csObj; _this.stateSynchronization = arg0; } }
static void NetworkView_viewID(JSVCall vc) { if (vc.bGet) { UnityEngine.NetworkView _this = (UnityEngine.NetworkView)vc.csObj; var result = _this.viewID; JSMgr.datax.setObject((int)JSApi.SetType.Rval, result); } else { UnityEngine.NetworkViewID arg0 = (UnityEngine.NetworkViewID)JSMgr.datax.getObject((int)JSApi.GetType.Arg); UnityEngine.NetworkView _this = (UnityEngine.NetworkView)vc.csObj; _this.viewID = arg0; } }
static void NetworkView_group(JSVCall vc) { if (vc.bGet) { UnityEngine.NetworkView _this = (UnityEngine.NetworkView)vc.csObj; var result = _this.group; JSApi.setInt32((int)JSApi.SetType.Rval, (System.Int32)(result)); } else { System.Int32 arg0 = (System.Int32)JSApi.getInt32((int)JSApi.GetType.Arg); UnityEngine.NetworkView _this = (UnityEngine.NetworkView)vc.csObj; _this.group = arg0; } }
private void Replace(UnityEngine.NetworkView oldView) { if (detailedLogging) { Debug.Log("Replacing a Scene's NetworkView (" + oldView.viewID + ") at GameObject '" + Utility.GetHierarchyName(oldView.transform) + "' in Scene: " + filename, oldView); } var newView = oldView.gameObject.AddComponent <uLink.NetworkView>(); newView.observed = oldView.observed; newView.stateSynchronization = Utility.ReplaceStateSync(oldView.stateSynchronization); newView._manualViewID = ++lastManualViewID; EditorUtility.SetDirty(newView); Object.DestroyImmediate(oldView, true); }
static int get_networkView(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.GameObject obj = (UnityEngine.GameObject)o; UnityEngine.NetworkView ret = obj.networkView; ToLua.PushSealed(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index networkView on a nil value")); } }
static int get_networkView(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UnityEngine.Component obj = (UnityEngine.Component)o; UnityEngine.NetworkView ret = obj.networkView; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index networkView on a nil value" : e.Message)); } }
void Awake() { // Setting up references. groundCheck = transform.Find("groundCheck"); anim = GetComponent<Animator>(); netView = this.GetComponent<UnityEngine.NetworkView>(); rigidBody = GetComponent<Rigidbody2D>(); guns = new List<Gun>(GetComponentsInChildren<Gun>()); if(guns.Count > 0) equippedGun = guns[0]; }
private static extern void Internal_RPC(NetworkView view, string name, RPCMode mode, object[] args);
private static extern void INTERNAL_CALL_Internal_SetViewID(NetworkView self, ref NetworkViewID viewID);
private static extern void Internal_RPC_Target(NetworkView view, string name, NetworkPlayer target, object[] args);
/// <summary> /// <para>Find a network view based on a NetworkViewID.</para> /// </summary> /// <param name="viewID"></param> public static NetworkView Find(NetworkViewID viewID) { return(NetworkView.INTERNAL_CALL_Find(ref viewID)); }
private void Internal_SetViewID(NetworkViewID viewID) { NetworkView.INTERNAL_CALL_Internal_SetViewID(this, ref viewID); }
public void RPC(string name, RPCMode mode, params object[] args) { NetworkView.Internal_RPC(this, name, mode, args); }
public bool SetScope(NetworkPlayer player, bool relevancy) { return(NetworkView.INTERNAL_CALL_SetScope(this, ref player, relevancy)); }
private static void Internal_RPC(NetworkView view, string name, RPCMode mode, object[] args) { throw new NotImplementedException("なにこれ"); }
private static void Internal_RPC_Target(NetworkView view, string name, NetworkPlayer target, object[] args) { throw new NotImplementedException("なにこれ"); }
private static void INTERNAL_CALL_Internal_SetViewID(NetworkView self, ref NetworkViewID viewID) { throw new NotImplementedException("なにこれ"); }
/// <summary> /// Caches all of the current standard components attached to the object. /// </summary> public void ResetCache() { animation = GetComponent<Animation>(); audio = GetComponent<AudioSource>(); camera = GetComponent<Camera>(); collider = GetComponent<Collider>(); collider2D = GetComponent<Collider2D>(); constantForce = GetComponent<ConstantForce>(); guiText = GetComponent<GUIText>(); guiTexture = GetComponent<GUITexture>(); hingeJoint = GetComponent<HingeJoint>(); light = GetComponent<Light>(); networkView = GetComponent<NetworkView>(); particleEmitter = GetComponent<ParticleEmitter>(); particleSystem = GetComponent<ParticleSystem>(); renderer = GetComponent<Renderer>(); rigidbody = GetComponent<Rigidbody>(); rigidbody2D = GetComponent<Rigidbody2D>(); transform = GetComponent<Transform>(); }
/// <summary> /// Calls GetComponent for all cached components if the currently cached instance is no longer valid. /// </summary> public void ResetCacheDestroyed() { if (!animation) { animation = GetComponent<Animation>(); } if (!audio) { audio = GetComponent<AudioSource>(); } if (!camera) { camera = GetComponent<Camera>(); } if (!collider) { collider = GetComponent<Collider>(); } if (!collider2D) { collider2D = GetComponent<Collider2D>(); } if (!constantForce) { constantForce = GetComponent<ConstantForce>(); } if (!guiText) { guiText = GetComponent<GUIText>(); } if (!guiTexture) { guiTexture = GetComponent<GUITexture>(); } if (!hingeJoint) { hingeJoint = GetComponent<HingeJoint>(); } if (!light) { light = GetComponent<Light>(); } if (!networkView) { networkView = GetComponent<NetworkView>(); } if (!particleEmitter) { particleEmitter = GetComponent<ParticleEmitter>(); } if (!particleSystem) { particleSystem = GetComponent<ParticleSystem>(); } if (!renderer) { renderer = GetComponent<Renderer>(); } if (!rigidbody) { rigidbody = GetComponent<Rigidbody>(); } if (!rigidbody2D) { rigidbody2D = GetComponent<Rigidbody2D>(); } if (!transform) { transform = GetComponent<Transform>(); } }
/// <summary> /// Caches the current NetworkView attached to the object. /// </summary> public void ResetNetworkViewCache() { networkView = GetComponent<NetworkView>(); }
public void PostConstruct() { networkView = contextView.AddComponent<NetworkView> (); }
public void RPC(string name, NetworkPlayer target, params object[] args) { NetworkView.Internal_RPC_Target(this, name, target, args); }
private void OnEnable() { _networkView = GetComponent<NetworkView>(); }
void Start() { serverIP = Network.player.ipAddress; networkView = GetComponent<NetworkView> (); }
private void Awake() { DontDestroyOnLoad(this.gameObject); glNetworkView = this.GetComponent<NetworkView>(); }
private static extern void INTERNAL_CALL_Internal_RPC_Target(NetworkView view, string name, ref NetworkPlayer target, object[] args);
private static extern bool INTERNAL_CALL_SetScope(NetworkView self, ref NetworkPlayer player, bool relevancy);
private static void Internal_RPC_Target(NetworkView view, string name, NetworkPlayer target, object[] args) { INTERNAL_CALL_Internal_RPC_Target(view, name, ref target, args); }
public void SetNativeNetworkView(NetworkView nativeNetworkView) { _nativeNetworkView = nativeNetworkView; }
/// <summary> /// Initialize the player /// </summary> public void Start() { PowerUps = new List<PowerUp> (); ForceMultiplier = AmApplication.DEFAULT_FORCE_MULTIPLIER; CanFly = false; LastTouched = null; _touchCounter = 0; _comboScoreTemp = 0; _comboScoreMultiplier = 0; _killComboCounter = KILL_COMBO_DURATION; _networkView = GameObject.Find(AmApplication.GAMEOBJECT_MAP_GENERATOR_NAME).GetComponent<NetworkView>(); _clientUpdateCounter = AmApplication.CLIENT_UPDATE_TIME; Debug.Log("Network view imported: " + _networkView); // resets score Score = 0; }