Beispiel #1
0
 //! 构造
 public UIManager()
 {
     m_UIMesh       = null;
     m_SpriteCamera = null;
     m_UIHandler    = null;
     m_Controls     = new ArrayList();
 }
Beispiel #2
0
        protected void Start()
        {
            if (mesh == null)
            {
                return;
            }

            mesh.transform.parent        = transform;
            mesh.layer                   = gameObject.layer;
            mesh.transform.localRotation = new Quaternion(0, 180, 0, 0);

            uiMesh                  = mesh.AddComponent <UIMesh>();
            uiMesh.canvas           = masterCanvas;
            uiMesh.unscaledDistance = meshDistance;

            float scale;

            switch (DollPart.Type)
            {
            case DollPartType.Torso:
                scale = torsoScale;
                break;

            case DollPartType.BackAttachment:
                scale = backAttachmentScale;
                break;

            default:
                scale = defaultScale;
                break;
            }

            mesh.transform.localScale = new Vector3(scale, scale, scale);
        }
Beispiel #3
0
    private void InitializeSpriteMesh()
    {
        GameObject obj = new GameObject("UIMesh");

        obj.transform.parent = gameObject.transform;

        m_UIMesh = (UIMesh)obj.AddComponent(typeof(UIMesh));
        m_UIMesh.Initialize(LAYER);
    }