iPhoneOSGameView.Run 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| Run() |
盡可能快速啟動 Run-loop 處理。 |
| Run(Double) |
以每秒畫面格的 |
| Run(Int32) |
已淘汰.
|
Run()
盡可能快速啟動 Run-loop 處理。
public void Run ();
abstract member Run : unit -> unit
override this.Run : unit -> unit
實作
例外狀況
實例已在 Dispose(Boolean) 該實例上叫用。
備註
叫用 CreateFrameBuffer() ,引發 Load 事件,然後開始執行迴圈處理。 執行迴圈處理包含下列步驟 (每個畫面) 發生:
- 便會引發 UpdateFrame 事件。
- OpenGL 框架緩衝區會重新系結至 Framebuffer 。
- 便會引發 RenderFrame 事件。
如果使用持續性層 (即 LayerRetainsBackingfalse) ,則不應該使用執行迴圈處理;整個檢視應該必須在每一個畫面上重新轉譯。
在此 Run 多載中,引發 RenderFrame 事件和 UpdateFrame 下列畫面格的 之間沒有任何延遲;一切都會儘快執行。 這不一定是想要的。
適用於
Run(Double)
以每秒畫面格的 updatesPerSecond 速率啟動執行迴圈處理。
public void Run (double updatesPerSecond);
abstract member Run : double -> unit
override this.Run : double -> unit
參數
- updatesPerSecond
- Double
T:System.Double,其中包含應該更新和轉譯每秒的畫面數。
實作
例外狀況
updatesPerSecond 小於 0。
實例已在 Dispose(Boolean) 該實例上叫用。
備註
如果 updatesPerSecond 為 0.0 ,則會 Run() 叫用 ,而且方法會結束。
叫用 CreateFrameBuffer() ,引發 Load 事件,然後開始執行迴圈處理。 執行迴圈處理包含下列步驟 (每個畫面) 發生:
- 便會引發 UpdateFrame 事件。
- OpenGL 框架緩衝區會重新系結至 Framebuffer 。
- 便會引發 RenderFrame 事件。
如果使用持續性層 (即 LayerRetainsBackingfalse) ,則不應該使用執行迴圈處理;整個檢視應該必須在每一個畫面上重新轉譯。
適用於
Run(Int32)
警告
Use either Run (float updatesPerSecond) or RunWithFrameInterval (int frameInterval)
[System.Obsolete("Use either Run (float updatesPerSecond) or RunWithFrameInterval (int frameInterval)")]
public void Run (int frameInterval);
member this.Run : int -> unit
參數
- frameInterval
- Int32
- 屬性