Example #1
0
//	void OnTriggerEnter(Collider other)
//	{
//		//Debug.Log("OnTriggerEnter...name "+other.name);
//		if (Network.peerType == NetworkPeerType.Client) {
//			return;
//		}
//
//		XkNpcZaiTiCtrl script = other.GetComponent<XkNpcZaiTiCtrl>();
//		if (script == null) {
//			return;
//		}
//		script.SetNpcIsDoFire(this);
//	}

    public void DrawPath()
    {
        Transform   parTran    = transform.parent;
        NpcPathCtrl pathScript = parTran.GetComponent <NpcPathCtrl>();

        if (pathScript != null)
        {
            pathScript.DrawPath();
        }
    }
    void OnDrawGizmosSelected()
    {
        if (!XkGameCtrl.IsDrawGizmosObj)
        {
            return;
        }

        if (!enabled)
        {
            return;
        }

        if (TestPlayerPath != null)
        {
            TestPlayerPath.DrawPath();
        }

        if (TestNpcPath != null)
        {
            TestNpcPath.DrawPath();
        }
    }