共用方式為


IGKRandom 介面

定義

GameKit 虛擬亂數產生器的介面。

[Foundation.Protocol(Name="GKRandom", WrapperType=typeof(GameplayKit.GKRandomWrapper))]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 9, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 11, ObjCRuntime.PlatformArchitecture.Arch64, null)]
public interface IGKRandom : IDisposable, ObjCRuntime.INativeObject
type IGKRandom = interface
    interface INativeObject
    interface IDisposable
衍生
屬性
實作

屬性

Handle

處理非受控物件標記法) (指標。

(繼承來源 INativeObject)

方法

GetNextBool()

擷取 truefalse 值。

GetNextInt()

傳回產生器界限內的整數。

GetNextInt(nuint)

傳回小於產生器上限且小於 upperBound 的整數。

GetNextUniform()

傳回隨機浮點值。

適用於