void OnEnable()
 {
     _ticker = (WorldMap2D_Ticker)target;
     if (tickers == null || tickers.Length == 0)
     {
         _ticker.Init();
     }
     tickerNames = new string[tickers.Length];
     for (int k = 0; k < tickerNames.Length; k++)
     {
         tickerNames [k] = k.ToString();
     }
     tickerLine = Mathf.Clamp(tickerLine, 0, tickerNames.Length - 1);
     // instance a sample ticker text for the inspector
     sampleTicker = new TickerText();
 }
Exemple #2
0
        void OnEnable()
        {
            Color backColor = EditorGUIUtility.isProSkin ? new Color(0.18f, 0.18f, 0.18f): new Color(0.7f, 0.7f, 0.7f);

            _blackTexture           = MakeTex(4, 4, backColor);
            _blackTexture.hideFlags = HideFlags.DontSave;
            blackStyle = new GUIStyle();
            blackStyle.normal.background = _blackTexture;
            _ticker = (WorldMap2D_Ticker)target;
            if (tickers == null || tickers.Length == 0)
            {
                _ticker.Init();
            }
            tickerNames = new string[tickers.Length];
            for (int k = 0; k < tickerNames.Length; k++)
            {
                tickerNames[k] = k.ToString();
            }
            tickerLine = Mathf.Clamp(tickerLine, 0, tickerNames.Length - 1);
            // instance a sample ticker text for the inspector
            sampleTicker = new TickerText();
        }