SFS2X Objective-C API
1.7.13
iOS / macOS / tvOS
|
#import <MMOItemVariable.h>
Inherits BaseVariable, and <IMMOItemVariable>.
Class Methods | |
(id< IMMOItemVariable >) | + fromSFSArray: |
(id) | + variableWithName:value:type: |
(id) | + variableWithName:value: |
Additional Inherited Members | |
![]() | |
(id) | - initWithName:value:type: |
(id) | - getValue |
(BOOL) | - getBoolValue |
(NSInteger) | - getIntValue |
(NSNumber *) | - getDoubleValue |
(NSString *) | - getStringValue |
(id< ISFSObject >) | - getSFSObjectValue |
(id< ISFSArray >) | - getSFSArrayValue |
(BOOL) | - isNull |
(id< ISFSArray >) | - toSFSArray |
![]() | |
NSString * | _name |
NSString * | _type |
id | _value |
![]() | |
NSString * | name |
NSString * | type |
The MMOItemVariable object represents a SmartFoxServer MMOItem Variable entity on the client.
It is a custom value attached to an MMOItem object that gets automatically synchronized between client and server on every change, provided that the MMOItem is inside the Area of Interest (AoI) of the current user in the MMORoom.
Changes in the MMOItemVariables are dispatched via the [ISFSEvents onMMOItemVariablesUpdate] event
NOTE: MMOItem Variables behave exactly like User Variables and support the same data types, but they can be created, updated and deleted on the server side only.
+ (id< IMMOItemVariable >) variableWithName: | (NSString *) | name | |
value: | (id) | value | |
name | the name of the variable |
value | the variable value ( can be BOOL, Integer, Double, String, SFSObject, SFSArray ) |
Reimplemented from BaseVariable.
+ (id< IMMOItemVariable >) variableWithName: | (NSString *) | name | |
value: | (id) | value | |
type: | (NSInteger) | type | |
name | the name of the variable |
value | the variable value ( can be BOOL, Integer, Double, String, SFSObject, SFSArray ) |
type | (optional -1) it's usually not necessary to pass this parameter as the variable value is auto-detected |
Reimplemented from BaseVariable.