Example #1
0
        public Proxy(Technique technique, GameObject target) : base(technique, target)
        {
            this.eyesee = (Technique)technique;

            Utility.AddCircleMesh(this.proxy);
            base.proxy.transform.localRotation = Quaternion.Euler(0, 180, 0);

            this.label = new GameObject("Label");
            this.label.transform.parent        = base.proxy.transform;
            this.label.transform.localPosition = this.eyesee.proxyLabelPosition;
            this.label.transform.localRotation = Quaternion.Euler(
                0 + this.eyesee.proxyLabelRotation.x,
                180 + this.eyesee.proxyLabelRotation.y,
                0 + this.eyesee.proxyLabelRotation.z
                );
            this.eyesee.ToLayer(this.label);

            TextMesh textMesh = this.label.AddComponent <TextMesh>();

            textMesh.richText      = false;
            textMesh.fontSize      = 100;
            textMesh.characterSize = this.eyesee.proxyLabelSize;
            if (this.eyesee.proxyLabel)
            {
                textMesh.text = target.name;
            }

            base.proxy.GetComponent <MeshRenderer>().receiveShadows = false;
            this.eyesee.ToLayer(this.proxy);
        }