public static NetEntityID.Kind Of(GameObject entity, out NetEntityID entID, out UnityEngine.MonoBehaviour view) { if (!entity) { entID = NetEntityID.unassigned; view = null; return(NetEntityID.Kind.Missing); } uLink.NetworkView component = entity.GetComponent <uLink.NetworkView>(); if (component) { entID = new NetEntityID(component.viewID); view = component; return(NetEntityID.Kind.Net); } NGCView nGCView = entity.GetComponent <NGCView>(); if (nGCView) { entID = new NetEntityID(nGCView); view = nGCView; return(NetEntityID.Kind.NGC | NetEntityID.Kind.Net); } entID = NetEntityID.unassigned; view = null; return(NetEntityID.Kind.Missing); }
public static Kind Of(GameObject entity, out NetEntityID entID, out MonoBehaviour view) { if (entity == null) { entID = unassigned; view = null; return(Kind.Missing); } NetworkView component = entity.GetComponent <NetworkView>(); if (component != null) { entID = new NetEntityID(component.viewID); view = component; return(Kind.Net); } NGCView view3 = entity.GetComponent <NGCView>(); if (view3 != null) { entID = new NetEntityID(view3); view = view3; return(Kind.NGC); } entID = unassigned; view = null; return(Kind.Missing); }
private void cl_predestroy(NGCView view) { if (this._master != null) { this._master.CullComponent(this); } }
public NetEntityID(NGCView view) { this = new NetEntityID(); if (view != null) { this.v = view.id; } }
private void Awake() { this.testView = base.GetComponent <NGCView>(); if (this.tickSound != null) { base.InvokeRepeating("TickSound", 0f, 1f); } }
private void Awake() { this.testView = base.GetComponent<NGCView>(); if (this.tickSound != null) { base.InvokeRepeating("TickSound", 0f, 1f); } }
protected internal virtual void OnOwnedByMasterStructure(StructureMaster master) { this._master = master; NGCView component = base.GetComponent <NGCView>(); if (((component != null) && !this.addedDestroyCallback) && (component != null)) { this.addedDestroyCallback = true; component.OnPreDestroy += new NGC.EventCallback(this.cl_predestroy); } }
public static bool ContextOf(NGCView networkView, out Contextual contextual) { return(GetMB(networkView, out contextual)); }
private void NGC_OnInstantiate(NGCView view) { this.myID = NetEntityID.Get(this); this._resTarg = base.GetComponent <ResourceTarget>(); }
private void cl_predestroy(NGCView view) { if (this._master) { this._master.CullComponent(this); } }
private void NGC_OnInstantiate(NGCView view) { this.myID = NetEntityID.Get((UnityEngine.MonoBehaviour) this); this._resTarg = base.GetComponent <ResourceTarget>(); }
private void NGC_OnInstantiate(NGCView view) { this.myID = NetEntityID.Get(this); this._resTarg = base.GetComponent<ResourceTarget>(); }