Here’s my code …
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class GameManager : MonoBehaviour {
public Transform platformGenerator;
private Vector3 platformStartPoint;
public PlayerController thePlayer;
private Vector3 playerStartPoint;
private PlatformDestroyer[] platforms;
private ScoreManager theScoreManager;
public DeathMenu theDeathScreen;
public Platformlist platformList;
// Use this for initialization
void Start ()
{
playerStartPoint = thePlayer.transform.position;
platformStartPoint = platformGenerator.position;
}
// Update is called once per frame
void Update () {
}
public void RestartGame()
{
theScoreManager.scoreIncreasing = false;
thePlayer.gameObject.SetActive(false);
//StartCoroutine("RestartGameCo");
}
public void Reset()
{
platformList = FindObjectOfType<PlatformDestroyer> ();
for (int i = 0; i < platformList.Length; i++) {
platformList *.gameObject.SetActive (false);*
-
}*
-
thePlayer.transform.position = playerStartPoint;*
-
platformGenerator.position = platformStartPoint;*
-
thePlayer.gameObject.SetActive (true);*
-
theScoreManager.scoreCount = 0;*
-
theScoreManager.scoreIncreasing = true;*
-
}*
_ /*public IEnumerator RestartGameCo()_
- {*
-
scoreManager.scoreIncreasing = false;*
-
thePlayer.gameObject.SetActive(false);*
_ /*yield return new WaitForSeconds(0.5f);_
-
thePlayer.transform.position = playerStartPoint;*
-
platforms = FindObjectsOfType<PlatformDestroyer>();*
-
for(var i=0; i< platforms.Length; i++)*
-
{*
_ platforms*.gameObject.SetActive(false);_
_ }*_
* platformGenerator.position = platformStartPoint;*
* thePlayer.gameObject.SetActive(true);*
* scoreManager.scoreCount = 0;*
* scoreManager.scoreIncreasing = true;*
_ } /_
_}*_
no idea why its doing this error… help please