{"action":"opened","issue":{"url":"https://api.github.com/repos/SkaterDanny/EndlessRunner/issues/6","labels_url":"https://api.github.com/repos/SkaterDanny/EndlessRunner/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/SkaterDanny/EndlessRunner/issues/6/comments","events_url":"https://api.github.com/repos/SkaterDanny/EndlessRunner/issues/6/events","html_url":"https://github.com/SkaterDanny/EndlessRunner/issues/6","id":109761136,"number":6,"title":"DRY","user":{"login":"RichardRam87","id":5513037,"avatar_url":"https://avatars.githubusercontent.com/u/5513037?v=3","gravatar_id":"","url":"https://api.github.com/users/RichardRam87","html_url":"https://github.com/RichardRam87","followers_url":"https://api.github.com/users/RichardRam87/followers","following_url":"https://api.github.com/users/RichardRam87/following{/other_user}","gists_url":"https://api.github.com/users/RichardRam87/gists{/gist_id}","starred_url":"https://api.github.com/users/RichardRam87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RichardRam87/subscriptions","organizations_url":"https://api.github.com/users/RichardRam87/orgs","repos_url":"https://api.github.com/users/RichardRam87/repos","events_url":"https://api.github.com/users/RichardRam87/events{/privacy}","received_events_url":"https://api.github.com/users/RichardRam87/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-05T09:36:13Z","updated_at":"2015-10-05T09:36:13Z","closed_at":null,"body":"```c\nvoid redWallSpawner(){\n\t\t//Spawn Red Wall\n\t\tGameObject wallSpawn = (GameObject)Instantiate(myPrefabs[0], new Vector3(15,0,0), transform.rotation);\n\t}\n\tvoid greenWallSpawner(){\n\t\t//Spawn Green Wall\n\t\tGameObject wallSpawn = (GameObject)Instantiate(myPrefabs[1], new Vector3(15,0,0), transform.rotation);\n\t}\n\tvoid blueWallSpawner(){\n\t\t//Spawn Blue Wall\n\t\tGameObject wallSpawn = (GameObject)Instantiate(myPrefabs[2], new Vector3(15,0,0), transform.rotation);\n\t} \n```\n\nBestand: https://github.com/SkaterDanny/EndlessRunner/blob/master/Assets/Scripts/WallSpawner.cs\n\nDeze functies zijn niet DRY (Don't Repeat Yourself).\nJe herhaalt een zelfde type proces afhankelijk van een bepaalde variabele. Dit kan efficiënter."}}