PLEASE HELP
using UnityEngine;
using System.Collections;
using System;
public class Gamemaneger : MonoBehaviour {
public Transform Platformgenerator;
private Vector3 platformStartpoint;
public player thePlayer;
private Vector3 playerStartPoint;
// Use this for initialization
void Start () {
platformStartpoint = Platformgenerator.position;
playerStartPoint = thePlayer.transform.position;
}
// Update is called once per frame
void Update ()
{ }
private void Start(Func<IEnumerator> RestartGame)
{
Gamemaneger.StartCoroutine(RestartGameCo);
}
public IEnumerator RestartGameCo()
{
thePlayer.gameObject.SetActive(false);
yield return new WaitForSeconds(0.5f);
thePlayer.transform.position = playerStartPoint;
Platformgenerator.position = platformStartpoint;
thePlayer.gameObject.SetActive(true);
}
}