Esempio n. 1
0
            /*
             *
             * public static void CreateUITextPopup(string textString, Vector3 position)
             * {
             *  CreateUITextPopup(textString, position, position + new Vector3(0, 20), Color.white);
             * }
             *
             * public static void CreateUITextPopup(string textString, Vector3 position, Vector3 finalPopupPosition, Color color, int fontSize = 40, float popupTime = 1f)
             * {
             *  Text text = DrawTextUI(textString, position, fontSize, GetDefaultFont());
             *  Transform transform = text.transform;
             *  Vector3 moveAmount = (finalPopupPosition - position) / popupTime;
             *
             *  FunctionUpdater.Create(delegate () {
             *      transform.position += moveAmount * Time.deltaTime;
             *      popupTime -= Time.deltaTime;
             *      if (popupTime <= 0f)
             *
             *      {
             *          UnityEngine.Object.Destroy(transform.gameObject);
             *          return true;
             *      }
             *      else
             *      {
             *          return false;
             *      }
             *  }, "UITextPopup"); ;
             * }
             *
             */

            public static Text DrawTextUIAnchoredPos(string textString, Vector2 anchoredPosition, int fontSize, Font font)
            {
                return(DrawTextUIWithAnchoredPos(textString, LC_Utils.GetCanvasTransform(), anchoredPosition, fontSize, font));
            }