Application翻译:^牛^魔王
- absoluteURL
- backgroundLoadingPriority
- CancelQuit
- CanStreamedLevelBeLoaded
- CaptureScreenshot
- dataPath
- ExternalCall
- ExternalEval
- GetStreamProgressForLevel
- internetReachability
- isEditor
- isLoadingLevel
- isPlaying
- isWebPlayer
- levelCount
- loadedLevelName
- loadedLevel
- LoadLevelAdditiveAsync
- LoadLevelAdditive
- LoadLevelAsync
- LoadLevel
- LogCallback
- OpenURL
- persistentDataPath
- platform
- Quit
- RegisterLogCallbackThreaded
- RegisterLogCallback
- runInBackground
- srcValue
- streamedBytes
- systemLanguage
- targetFrameRate
- temporaryCachePath
- unityVersion
- webSecurityEnabled
Application.levelCount 关卡数
static var levelCount : int
Description描述
The total number of levels available (Read Only).
可用的关卡总数。(只读)
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
Application.LoadLevel(Random.Range(0, Application.levelCount - 1));
}
}
// Loads a random level
//随机加载一个关卡
Application.LoadLevel (Random.Range(0, Application.levelCount-1));
最后修改:2010年12月14日 Tuesday 22:04