Esempio n. 1
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);
    }