Preparing search index...
The search index is not available
GamePush SDK Typed Documentation
GamePush SDK Typed Documentation
Player
Class Player
Hierarchy (
view full
)
EventEmitter
<
MyPlayerEvents
>
Player
MyPlayer
Index
Constructors
constructor
Properties
#fields
Map
#limits
Fields
_events
_was
Reset
core
Sdk
credentials
fields
is
Public
Fields
Dirty
modified
At
state
update
Time
Accessors
avatar
id
is
Stub
name
score
Methods
#set
Fields
_convert
_increment
Field
_initialize
Increment
Fields
_sync
Increment
Variable
add
fromJSON
get
get
Field
get
Field
Name
get
Field
Variant
Name
get
Max
Value
get
Min
Value
has
off
on
once
remove
reset
set
toJSON
toggle
Constructors
constructor
new
Player
(
playerState
?
,
fields
,
coreSdk
)
:
Player
Parameters
playerState
:
Partial
<
PlayerState
>
= {}
fields
:
ModelField
[]
coreSdk
:
CoreSDK
Returns
Player
Properties
Private
#fields
Map
#fields
Map
:
Record
<
string
,
ModelField
>
= {}
Private
#limits
Fields
#limits
Fields
:
ModelField
[]
= []
Private
_events
_events
:
EventLite
= ...
_was
Reset
_was
Reset
:
boolean
= false
Private
core
Sdk
core
Sdk
:
CoreSDK
credentials
credentials
:
string
= ''
fields
fields
:
ModelField
[]
is
Public
Fields
Dirty
is
Public
Fields
Dirty
:
boolean
= false
modified
At
modified
At
:
string
= ''
Private
state
state
:
PlayerState
update
Time
update
Time
:
number
Accessors
avatar
get
avatar
(
)
:
string
Returns
string
set
avatar
(
value
)
:
void
Parameters
value
:
string
Returns
void
id
get
id
(
)
:
number
Returns
number
is
Stub
get
isStub
(
)
:
boolean
Returns
boolean
name
get
name
(
)
:
string
Returns
string
set
name
(
value
)
:
void
Parameters
value
:
string
Returns
void
score
get
score
(
)
:
number
Returns
number
set
score
(
value
)
:
void
Parameters
value
:
number
Returns
void
Methods
Private
#set
Fields
#set
Fields
(
fields
)
:
void
Parameters
fields
:
ModelField
[]
Returns
void
Private
_convert
_convert
(
key
,
value
)
:
string
|
number
|
boolean
Private
Parameters
key
:
string
value
:
string
|
number
|
boolean
Returns
string
|
number
|
boolean
Private
_increment
Field
_increment
Field
(
field
)
:
void
Parameters
field
:
ModelField
Returns
void
Private
_initialize
Increment
Fields
_initialize
Increment
Fields
(
)
:
void
Returns
void
_sync
Increment
Variable
_sync
Increment
Variable
(
)
:
void
Returns
void
add
add
(
key
,
value
)
:
void
Parameters
key
:
string
value
:
string
|
number
|
boolean
Returns
void
fromJSON
fromJSON
(
state
)
:
void
Parameters
state
:
Partial
<
PlayerState
>
Returns
void
get
get
(
key
)
:
string
|
number
|
boolean
Parameters
key
:
string
Returns
string
|
number
|
boolean
get
Field
get
Field
(
key
)
:
ModelField
Parameters
key
:
string
Returns
ModelField
get
Field
Name
get
Field
Name
(
key
)
:
string
Parameters
key
:
string
Returns
string
get
Field
Variant
Name
get
Field
Variant
Name
(
key
,
value
)
:
string
Parameters
key
:
string
value
:
string
|
number
Returns
string
get
Max
Value
get
Max
Value
(
key
)
:
string
|
number
|
boolean
Parameters
key
:
string
Returns
string
|
number
|
boolean
get
Min
Value
get
Min
Value
(
key
)
:
string
|
number
|
boolean
Parameters
key
:
string
Returns
string
|
number
|
boolean
has
has
(
key
)
:
boolean
Parameters
key
:
string
Returns
boolean
off
off
<
ET
>
(
type
,
handler
)
:
void
Type Parameters
ET
extends
keyof
MyPlayerEvents
Parameters
type
:
ET
handler
:
(
(
event
,
...
args
)
=>
void
)
(
event
,
...
args
)
:
void
Parameters
event
:
MyPlayerEvents
[
ET
]
Rest
...
args
:
any
Returns
void
Returns
void
on
on
<
ET
>
(
type
,
handler
)
:
void
Type Parameters
ET
extends
keyof
MyPlayerEvents
Parameters
type
:
ET
handler
:
(
(
event
,
...
args
)
=>
void
)
(
event
,
...
args
)
:
void
Parameters
event
:
MyPlayerEvents
[
ET
]
Rest
...
args
:
any
Returns
void
Returns
void
once
once
<
ET
>
(
type
,
handler
)
:
void
Type Parameters
ET
extends
keyof
MyPlayerEvents
Parameters
type
:
ET
handler
:
(
(
event
,
...
args
)
=>
void
)
(
event
,
...
args
)
:
void
Parameters
event
:
MyPlayerEvents
[
ET
]
Rest
...
args
:
any
Returns
void
Returns
void
remove
remove
(
)
:
void
Returns
void
reset
reset
(
)
:
void
Returns
void
set
set
(
key
,
value
)
:
void
Parameters
key
:
string
value
:
string
|
number
|
boolean
Returns
void
toJSON
toJSON
(
)
:
PlayerState
Returns
PlayerState
toggle
toggle
(
key
)
:
void
Parameters
key
:
string
Returns
void
Settings
Member Visibility
Protected
Private
Inherited
External
Alpha
Beta
Theme
OS
Light
Dark
On This Page
constructor
#fields
Map
#limits
Fields
_events
_was
Reset
core
Sdk
credentials
fields
is
Public
Fields
Dirty
modified
At
state
update
Time
avatar
id
is
Stub
name
score
#set
Fields
_convert
_increment
Field
_initialize
Increment
Fields
_sync
Increment
Variable
add
fromJSON
get
get
Field
get
Field
Name
get
Field
Variant
Name
get
Max
Value
get
Min
Value
has
off
on
once
remove
reset
set
toJSON
toggle
GamePush SDK Typed Documentation
Loading...