Esempio n. 1
0
    void Awake()
    {
        networkCulling = GetComponent <NetworkCulling>();
        mTrans         = GetComponent <Transform>();

        gameObject.name = gameObject.name + photonView.viewID;
    }
Esempio n. 2
0
    void Awake()
    {
        networkCulling = GetComponent<NetworkCulling>();
        mTrans = GetComponent<Transform>();

        gameObject.name = gameObject.name + photonView.viewID;
    }
Esempio n. 3
0
    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;
            }
        }
    }
Esempio n. 4
0
	public void Awake(){
		networkCulling = GetComponent<NetworkCulling>();  
	}
Esempio n. 5
0
	public static void SetCullingOption (CullingOption newCulling)
	{
		cullingOption = newCulling;
		lastNetCullScript = null; //Force recalc
		
	}
Esempio n. 6
0
	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;
			}	   
			
		}
		
	}
Esempio n. 7
0
 public static void SetCullingOption(CullingOption newCulling)
 {
     cullingOption     = newCulling;
     lastNetCullScript = null;         //Force recalc
 }
Esempio n. 8
0
 private void Awake()
 {
     zoneManager    = FindObjectOfType <WorldDivision>();
     networkCulling = transform.parent.GetComponentInChildren <NetworkCulling>();
 }
Esempio n. 9
0
 public void Awake()
 {
     networkCulling = GetComponent <NetworkCulling>();
 }