Skip to content
Permalink
3a30942fd4
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
28 lines (20 sloc) 616 Bytes
using UnityEngine;
using System.Collections;
public class GameManager : MonoBehaviour {
public GameObject player;
public GameObject portal;
private GameCamera cam;
// Use this for initialization
void Start () {
cam = GetComponent<GameCamera>();
SpawnStart ();
}
private void SpawnStart () {
Instantiate (portal, portal.transform.position, portal.transform.rotation);
Invoke ("SpawnPlayer", 1.5f);
}
private void SpawnPlayer () {
GameObject merp = (Instantiate (player, player.transform.position,player.transform.rotation) as GameObject);
cam.setTarget (merp.transform);
}
}