private Vector3 GetSpawnPointPos(string spawnName) { MonoStageEnv stageEnv = Singleton <StageManager> .Instance.GetStageEnv(); int namedSpawnPointIx = stageEnv.GetNamedSpawnPointIx(spawnName); return(stageEnv.spawnPoints[namedSpawnPointIx].transform.position); }
private Vector3 GetSpawnPointPos(string spawnName) { int namedSpawnPointIx; MonoStageEnv stageEnv = Singleton <StageManager> .Instance.GetStageEnv(); if (spawnName != null) { namedSpawnPointIx = stageEnv.GetNamedSpawnPointIx(spawnName); } else { namedSpawnPointIx = UnityEngine.Random.Range(0, Singleton <StageManager> .Instance.GetStageEnv().spawnPoints.Length); } return(stageEnv.spawnPoints[namedSpawnPointIx].transform.position); }