Closed ssshake closed 10 years ago
Help screen design
A plane A text area an arrow pointing down, seated below the text
This help object "hovers" above an area of of interest On click it moves to the next area and displays related text.
Use a public transform array to populate the x,y,z of each game element (fuels, filters, graphs, radar) User a public array of strings to populate the text to display for each help item
on click (anywhere on screen), iterate through both indexes in parallel, moving from one item, to the next.
The design is likely
Dark Plane (parent) //prevents clicking on game elements, top level. Just like game over screen --> Text Area //This displays the help text and moves around, the script is attached to this object --> Arrow //Arrow points downwards, the arrow and help text float above the UI elements
I'm at work so here's some probably wrong code.
public Transform[] helpPosition; public String[] helpText; public bool[] displayArrow; public float padding; int i = 0;
void update(){
if (Input.GetMouseButtonDown(0){
transform.position = new Vector3(helpPosition[i].position.x, helpPosition[i].position.y + padding, helpPosition[i].position.z)
GetComponent<TextMesh>().text = helpText[i];
if (displayArrow == true){
GameObject.Find("DisplayArrow").renderer = true;
}
else {
GameObject.Find("DisplayArrow").renderer = flase;
}
i++;
}
if ( i >= helpPosition.Length ){
Destroy(gameObject.parent);
}
}
tutorial is implemented feel free to reword, add, and change the arrow graphic.
I'll use the game transparent overlay as the game over screen. Have arrows pointing to game elements, with description and "click to continue". Cycles through a few screen and then game starts.