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
Afficher le fichier Open project: arcoelho01/astrochimps

Méthodes publiques

Свойство Type Description
mySkin UnityEngine.GUISkin

Méthodes publiques

Méthode 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

Méthode 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 méthode

Actually draws the text on screen
public OnGUI ( ) : void
Résultat void

SetInfoText() public méthode

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
Résultat void

Start() public méthode

public Start ( ) : void
Résultat void

Update() public méthode

public Update ( ) : void
Résultat void

Property Details

mySkin public_oe property

public GUISkin,UnityEngine mySkin
Résultat UnityEngine.GUISkin