共用方式為


iPhoneOSGameView.Run 方法

定義

多載

Run()

盡可能快速啟動 Run-loop 處理。

Run(Double)

以每秒畫面格的 updatesPerSecond 速率啟動執行迴圈處理。

Run(Int32)
已淘汰.

Run()

盡可能快速啟動 Run-loop 處理。

public void Run ();
abstract member Run : unit -> unit
override this.Run : unit -> unit

實作

例外狀況

實例已在 Dispose(Boolean) 該實例上叫用。

備註

叫用 CreateFrameBuffer() ,引發 Load 事件,然後開始執行迴圈處理。 執行迴圈處理包含下列步驟 (每個畫面) 發生:

  1. 便會引發 UpdateFrame 事件。
  2. OpenGL 框架緩衝區會重新系結至 Framebuffer
  3. 便會引發 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) 該實例上叫用。

備註

如果 updatesPerSecond0.0 ,則會 Run() 叫用 ,而且方法會結束。

叫用 CreateFrameBuffer() ,引發 Load 事件,然後開始執行迴圈處理。 執行迴圈處理包含下列步驟 (每個畫面) 發生:

  1. 便會引發 UpdateFrame 事件。
  2. OpenGL 框架緩衝區會重新系結至 Framebuffer
  3. 便會引發 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
屬性

適用於