void Awake() { networkCulling = GetComponent <NetworkCulling>(); mTrans = GetComponent <Transform>(); gameObject.name = gameObject.name + photonView.viewID; }
void Awake() { networkCulling = GetComponent<NetworkCulling>(); mTrans = GetComponent<Transform>(); gameObject.name = gameObject.name + photonView.viewID; }
void Update() { if (photonView.isMine) { Vector2 xyPos = GetPosition(); int dist = (int)Vector2.Distance(lastPos, xyPos); if (lastNetCullScript != this || Mathf.Abs(dist) > recalculateDistance) { lastNetCullScript = this; RecalculateGroups(); lastPos = xyPos; } } }
public void Awake(){ networkCulling = GetComponent<NetworkCulling>(); }
public static void SetCullingOption (CullingOption newCulling) { cullingOption = newCulling; lastNetCullScript = null; //Force recalc }
void Update () { if (photonView.isMine) { Vector2 xyPos = GetPosition (); int dist = (int)Vector2.Distance (lastPos, xyPos); if (lastNetCullScript != this || Mathf.Abs (dist) > recalculateDistance) { lastNetCullScript = this; RecalculateGroups (); lastPos = xyPos; } } }
public static void SetCullingOption(CullingOption newCulling) { cullingOption = newCulling; lastNetCullScript = null; //Force recalc }
private void Awake() { zoneManager = FindObjectOfType <WorldDivision>(); networkCulling = transform.parent.GetComponentInChildren <NetworkCulling>(); }
public void Awake() { networkCulling = GetComponent <NetworkCulling>(); }