Author Topic: HUDText : Is that able to classify int by color?  (Read 3790 times)

alexlange

  • Newbie
  • *
  • Thank You
  • -Given: 5
  • -Receive: 0
  • Posts: 34
    • View Profile
HUDText : Is that able to classify int by color?
« on: January 23, 2013, 05:07:13 AM »
Hi

I'm using HUDText.Add() and want it shows physical damage as red text and skill damage as yellow text
So I code like this
  1. //int damage
  2. if(physical)
  3.     HUDText.Add(damage, color.red,0f);
  4. else //skill
  5.     HUDText.ADD(damage,color.yellow,0f)
  6.  
And I find if there's a red text still on screen, next skill damage will just add on it, but not create a yellow text.
Do I have to convert damage from int to string to avoid this?
Thank you!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: HUDText : Is that able to classify int by color?
« Reply #1 on: January 23, 2013, 08:35:10 AM »
Sure, you can change it to be like that. As I recall I made a distinction with positive and negative damage types (damage and healing), but nothing is stopping you from creating other distinctions.

alexlange

  • Newbie
  • *
  • Thank You
  • -Given: 5
  • -Receive: 0
  • Posts: 34
    • View Profile
Re: HUDText : Is that able to classify int by color?
« Reply #2 on: January 25, 2013, 09:12:21 PM »
Thank You  :)