Exemplo n.º 1
0
 public static void Spawn(string text, RectTransform start, Color color, Orientation orientation)
 {
     if (string.IsNullOrEmpty(text))
     {
         return;
     }
     FloatingTextHolder.Start(orientation, text, 2f, start.position, start.position + new Vector3(0, 150, 0), UIRoot.Player.Get().transform, color);
 }
Exemplo n.º 2
0
 public static void Spawn(string text, float duration, RectTransform start, Vector3 end, Color startColor)
 {
     if (string.IsNullOrEmpty(text) || _msgChecker.ContainsDuplicate(text, start))
     {
         return;
     }
     _msgChecker.Add(text, start);
     FloatingTextHolder.Start(Orientation.Center, text, duration, start.position, end, UIRoot.Player.Get().transform, startColor);
 }
Exemplo n.º 3
0
        public static void WorldSpawn(string text, Vector3 start, Color color)
        {
            if (string.IsNullOrEmpty(text))
            {
                return;
            }
            _msgChecker.Add(text, UIRoot.Misc.Get().transform);
            start = RectTransformUtility.WorldToScreenPoint(Player.Cam, start);
            var end = RectTransformUtility.WorldToScreenPoint(Player.Cam, start + new Vector3(0, 1, 0));

            FloatingTextHolder.Start(Orientation.Center, text, 2f, start, end, UIRoot.Misc.Get().transform, color);
        }
Exemplo n.º 4
0
        public static void SpawnIcon(Sprite icon, string text, RectTransform start, Color color)
        {
            var startPosition = start.position;

            if (_iconTimer.IsActive)
            {
                startPosition = start.position + new Vector3(_negative ? -Offset : Offset, 0, 0);
                _negative     = !_negative;
            }
            _iconTimer.StartTimer();
            FloatingTextHolder.Start(Orientation.Icon, text, 2f, startPosition, startPosition + new Vector3(0, 150, 0), UIRoot.Misc.Get()
                                     .transform, color, icon);
        }
Exemplo n.º 5
0
 public static void Damage(float amount, Vector3 start)
 {
     FloatingTextHolder.Start(LazyDb.Main.FloatingTextDamage, amount.ToString("F0"), 4f, start, start + _defaultEnd, null);
 }
Exemplo n.º 6
0
 public static void Spawn(string text, float duration, Vector3 start, Vector3 end)
 {
     FloatingTextHolder.Start(LazyDb.Main.FloatingTextStandard, text, duration, start, end, null);
 }
Exemplo n.º 7
0
 public static void Message(string text, Vector3 start)
 {
     FloatingTextHolder.Start(LazyDb.Main.FloatingTextStandard, text, 1.5f, start, start + _defaultEnd, null);
 }