Commit 6c06f451 by Eko Simanjuntak

delete .vs

parents 96bf9b33 7b64da72
*/.vs /.vs
/Library /Library
/Temp /Temp
\ No newline at end of file .vs
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -8,7 +8,6 @@ public class BackgroundChanger : MonoBehaviour { ...@@ -8,7 +8,6 @@ public class BackgroundChanger : MonoBehaviour {
private List<GameObject> obstacleGroup = new List<GameObject>(); private List<GameObject> obstacleGroup = new List<GameObject>();
private GameObject[] gameObjectGroup; private GameObject[] gameObjectGroup;
private GameObject background; private GameObject background;
private GameObject obstacle;
private string[] colors = {"Blue", "Green" }; private string[] colors = {"Blue", "Green" };
public void Start() public void Start()
...@@ -31,8 +30,11 @@ public class BackgroundChanger : MonoBehaviour { ...@@ -31,8 +30,11 @@ public class BackgroundChanger : MonoBehaviour {
{ {
foreach(string color in colors) foreach(string color in colors)
{ {
obstacle = GameObject.FindWithTag(color + "Obstacle"); gameObjectGroup = GameObject.FindGameObjectsWithTag(color + "Obstacle");
obstacleGroup.Add(obstacle); foreach(GameObject obstacle in gameObjectGroup)
{
obstacleGroup.Add(obstacle);
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment