Skip to content

Commit 920508d

Browse files
committed
Change object references to private
1 parent 13dd4b4 commit 920508d

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Assets/Scenes/Flappy Bird.unity

-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ MonoBehaviour:
270270
m_Script: {fileID: 11500000, guid: ae79f9d99372a6b438f800230f434b9d, type: 3}
271271
m_Name:
272272
m_EditorClassIdentifier:
273-
player: {fileID: 527830928}
274273
scoreText: {fileID: 1474871343}
275274
playButton: {fileID: 892178073}
276275
gameOver: {fileID: 298509898}

Assets/Scripts/GameManager.cs

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
using UnityEngine;
1+
using UnityEngine;
22
using UnityEngine.UI;
33

44
public class GameManager : MonoBehaviour
55
{
6-
public Player player;
6+
private Player player;
7+
private Spawner spawner;
8+
79
public Text scoreText;
810
public GameObject playButton;
911
public GameObject gameOver;
@@ -13,6 +15,9 @@ private void Awake()
1315
{
1416
Application.targetFrameRate = 60;
1517

18+
player = FindObjectOfType<Player>();
19+
spawner = FindObjectOfType<Spawner>();
20+
1621
Pause();
1722
}
1823

0 commit comments

Comments
 (0)