Esempio n. 1
0
    /// <summary>
    /// Create3s the D name impl.
    /// </summary>
    /// <returns>
    /// The D name impl.
    /// </returns>
    /// <param name='worldPos'>
    /// World position.
    /// </param>
    /// <param name='showText'>
    /// Show text.
    /// </param>
    public static EZ3DSimipleText Create3DNameImpl(object gameObject, string name)
    {
        string          showText = GUIFontColor.White + name;
        EZ3DSimipleText text     = (EZ3DSimipleText)Globals.Instance.M3DItemManager.Create3DSimpleText(gameObject, showText, NAME_HEIGHT_OFFSET);

        text.gameObject.name = name;

        return(text);
    }
Esempio n. 2
0
    public EZ3DSimipleText GetBuildingName(string name)
    {
        Transform ez3dItemParent = Globals.Instance.M3DItemManager.EZ3DItemParent;
        Transform tf             = ez3dItemParent.Find(name);

        if (null == tf)
        {
            return(null);
        }

        EZ3DSimipleText text = tf.GetComponent <EZ3DSimipleText>() as EZ3DSimipleText;

        return(text);
    }
Esempio n. 3
0
    //-----------------------------------------------------------
    public EZ3DSimipleText Create3DSimpleText(object gameObjectOrPos, string text, float heightOffset, UIEventListener.VoidDelegate del = null)
    {
        GameObject go;

        if (gameObjectOrPos is GameObject)
        {
            go = CreateEZ3DItem(SimpleTextTP, ((GameObject)gameObjectOrPos).transform.position);
        }
        else
        {
            go = CreateEZ3DItem(SimpleTextTP, (Vector3)gameObjectOrPos);
        }

        EZ3DSimipleText item = go.GetComponent <EZ3DSimipleText>();

        item.SetValue(gameObjectOrPos, text, heightOffset);
        item.SetValueChangeDelegate(del);

        return(item);
    }