SpawnNew() public method

public SpawnNew ( string text ) : GameObject
text string
return GameObject
Exemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (!(movesLeftText == null))
     {
         spawner.ClearText(movesLeftText);
     }
     moves         = gameScript.moves;
     movesLeftText = spawner.SpawnNew("Moves Left: " + moves.ToString(), new Vector2(-1, -5), 35, null, FontStyle.Bold, Color.black);
 }
Exemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        if (started)
        {
            if (!(timeRemainingText == null))
            {
                spawner.ClearText(timeRemainingText);
            }
            timeRemaining = startTime - Time.time + givenTime;

            timeRemainingText = spawner.SpawnNew("Time remaining: " + timeRemaining.ToString("F2"), new Vector2(-2, -5), 30, null, FontStyle.Bold, Color.black);
        }
    }
Exemplo n.º 3
0
 // Update is called once per frame
 void Update()
 {
     currentScore     = generatorScript.score;
     currentScoreText = spawner.SpawnNew("Score: " + currentScore.ToString(), new Vector2(-2, 5), 30, null, FontStyle.Bold, Color.black);
 }