Example #1
0
	void SpawnAtNewSpawnPoint()
	{
        SpawnPoint[] validSpawns = MoreExtensions.GetSpawnPoints(SpawnPoint.SpawnType.PLAYER);

        if(validSpawns.Length == 0)
            return;

		int spawnIndex = Random.Range (0, validSpawns.Length);
		transform.position = validSpawns [spawnIndex].transform.position;
		transform.rotation = validSpawns [spawnIndex].transform.rotation;

		ragdoll.EnableRagdoll (false);
	}
Example #2
0
    SpawnPoint[] FindSpawnPoints()
    {
        List <SpawnPoint> validSpawnPoints = new List <SpawnPoint>();

        SpawnPoint[] points = MoreExtensions.GetSpawnPoints(SpawnPoint.SpawnType.NPC);

        for (int i = 0; i < points.Length; i++)
        {
            validSpawnPoints.Add(points[i]);
        }

        return(validSpawnPoints.ToArray());
    }