leeanneb / FruitySpace

A space invaders game created by Unity. I created a spaceship which will be controlled by a user and it will have to hit all the aliens in the game to win. The spaceship can only move left and right and fire the bullets to the aliens. The aliens also will shoot the bullets to the space ship and the more the level goes up the more aliens will increase. When the aliens hit the spaceship, its health will decrease with -5, and when the health is 0, it will automaticly goes to the "Game Over". But when the user wins the game, it will goes in the "You Win".
0 stars 0 forks source link

The player details are blue and I want them to be white. #5

Open leeanneb opened 11 years ago

leeanneb commented 11 years ago

Error:

function OnGUI() {

var missed = fired - hit;
GUI.color = Color.cyan;

GUI.Label(Rect(55,0,100,25),"Player: "+playerName);
GUI.Label(Rect(150,0,100,25),"Score: "+score);
GUI.Label(Rect(230,0,100,25),"Health: "+health);
GUI.Label(Rect(330,0,100,25),"Aliens Hit: "+hit);
GUI.Label(Rect(440,0,100,25),"Fired: "+fired);
GUI.Label(Rect(530,0,120,25),"Missed: "+missed);
leeanneb commented 11 years ago

Fixed Error:

function OnGUI() {

var missed = fired - hit;
GUI.color = Color.white;

GUI.Label(Rect(55,0,100,25),"Player: "+playerName);
GUI.Label(Rect(150,0,100,25),"Score: "+score);
GUI.Label(Rect(230,0,100,25),"Health: "+health);
GUI.Label(Rect(330,0,100,25),"Aliens Hit: "+hit);
GUI.Label(Rect(440,0,100,25),"Fired: "+fired);
GUI.Label(Rect(530,0,120,25),"Missed: "+missed);

I arranged the color to White.