Esempio n. 1
0
 void SetUpEverything()
 {
     Services.hitPause     = FindObjectOfType <HitPause>();
     Services.enemyManager = FindObjectOfType <EnemyManager>();
     Services.enemyManager.Initialize();
     scoreDisplay       = FindObjectOfType <ScoreDisplay>();
     scoreDisplay.score = 0;
     scoreDisplay.SetScoreText(0);
 }
Esempio n. 2
0
    public void AddOnScreenScoreMessage(Vector2 screenPosition, int scoreAmount)
    {
        Vector3 pixelPosition = Camera.main.WorldToScreenPoint(screenPosition);

        Debug.Log(pixelPosition);
        GameObject   newScore     = Instantiate(scoreGO, pixelPosition, Quaternion.identity, canvasGO.transform);
        ScoreDisplay scoreDisplay = newScore.GetComponent <ScoreDisplay>();

        scoreDisplay.SetScoreText(scoreAmount);
    }