Share via


IGKRandom Interface

Definition

Interface for GameplayKit pseudo-random number generators.

[Foundation.Protocol(Name="GKRandom", WrapperType=typeof(GameplayKit.GKRandomWrapper))]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="GetNextInt", ReturnType=typeof(System.IntPtr), Selector="nextInt")]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="GetNextInt", ParameterByRef=new System.Boolean[] { false }, ParameterType=new System.Type[] { typeof(System.UIntPtr) }, ReturnType=typeof(System.UIntPtr), Selector="nextIntWithUpperBound:")]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="GetNextUniform", ReturnType=typeof(System.Single), Selector="nextUniform")]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="GetNextBool", ReturnType=typeof(System.Boolean), Selector="nextBool")]
public interface IGKRandom : IDisposable, ObjCRuntime.INativeObject
[<Foundation.Protocol(Name="GKRandom", WrapperType=typeof(GameplayKit.GKRandomWrapper))>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="GetNextInt", ReturnType=typeof(System.IntPtr), Selector="nextInt")>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="GetNextInt", ParameterByRef=new System.Boolean[] { false }, ParameterType=new System.Type[] { typeof(System.UIntPtr) }, ReturnType=typeof(System.UIntPtr), Selector="nextIntWithUpperBound:")>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="GetNextUniform", ReturnType=typeof(System.Single), Selector="nextUniform")>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="GetNextBool", ReturnType=typeof(System.Boolean), Selector="nextBool")>]
type IGKRandom = interface
    interface INativeObject
    interface IDisposable
Derived
Attributes
Implements

Properties

Name Description
Handle

Handle (pointer) to the unmanaged object representation.

(Inherited from INativeObject)

Methods

Name Description
GetNextBool()

Retrieves a true or false value.

GetNextInt()

Returns an integer within the bounds of the generator.

GetNextInt(UIntPtr)

Returns a random integer that is less than upperBound.

GetNextUniform()

Returns a random floating-point value.

Extension Methods

Name Description
GetHandle(INativeObject)
GetNonNullHandle(INativeObject, String)

Applies to