C# Class ShowInfoPanel, astrochimps

This class will create an object and put it as a child from another. It's show a text in the screen, right above the parent object, and then move it towards the top of the screen (like a score info from an old-school game). Useful, for instance, to show a player what resource an extractor is extracting and it's amount
Inheritance: MonoBehaviour
Mostrar archivo Open project: arcoelho01/astrochimps

Public Properties

Property Type Description
mySkin UnityEngine.GUISkin

Public Methods

Method Description
OnGUI ( ) : void

Actually draws the text on screen

SetInfoText ( string newText, Vector3 position ) : void

Set the text to be shown and it's initial position

Start ( ) : void
Update ( ) : void

Private Methods

Method Description
BeingRenderedOnCamera ( ) : bool

Check if the object is being rendered in the screen. If not, there's no need to display the info text, right?

Method Details

OnGUI() public method

Actually draws the text on screen
public OnGUI ( ) : void
return void

SetInfoText() public method

Set the text to be shown and it's initial position
public SetInfoText ( string newText, Vector3 position ) : void
newText string String with the text to be shown
position Vector3
return void

Start() public method

public Start ( ) : void
return void

Update() public method

public Update ( ) : void
return void

Property Details

mySkin public_oe property

public GUISkin,UnityEngine mySkin
return UnityEngine.GUISkin