Example #1
0
 // Use this for initialization
 void Start()
 {
     //m_horseObject = (GameObject)AssetDatabase.LoadAssetAtPath("Assets/Prefabs/Horse.prefab", typeof(GameObject));
     m_sizeText   = partySizeText.GetComponent <TextMesh>();
     m_partyUI    = GameObject.FindGameObjectWithTag("PartyUI").GetComponent <PartyUI>();
     m_partyRect  = m_partyUI.GetComponent <RectTransform>();
     m_mainCamera = Camera.main;
 }
Example #2
0
        // Use this for initialization
        void OnEnable()
        {
            m_partyUI = GetComponentInParent <PartyUI>();
            m_text    = GetComponent <Text>();

            string stringToWrite = m_partyUI.WhatToWrite();
            int    stringLength  = stringToWrite.Length;

            m_text.fontSize = 12;

            if (stringLength > 30)
            {
                m_text.fontSize = 10;
            }

            m_text.text  = stringToWrite;
            m_text.color = m_partyUI.GetCurrentColor();
        }