oosidat / NASAHack2014-asteroids

Rocks! Lasers! Profit!
http://rockslasersprofit.com
Other
1 stars 1 forks source link

help screen #27

Closed ssshake closed 10 years ago

ssshake commented 10 years ago

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.

ssshake commented 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);     
}

}

ssshake commented 10 years ago

tutorial is implemented feel free to reword, add, and change the arrow graphic.