Fort Game

arashjfz edited this page Jul 4, 2017 · 1 revision

Fort-Game-Plugin

DataEventArgs\`1 DelegateReference
DispatcherEventSubscription DispatcherEventSubscription\`1
EventAggregator EventBase
EventSubscription EventSubscription\`1
IDelegateReference IEventAggregator
IEventSubscription PubSubEvent
PubSubEvent\`1 SubscriptionToken
IAchievementService IAdvertisementService
IAnalyticsService IAssetService
IEventAggregatorService IInvitationService
ILanguageService ILeaderboardService
ILevelManagementService InvitationData
ISceneLoaderService ISettingService
ISkinnerBoxService IStorageService
IUserManagementService SceneLoadParameters
ScoreBalance

DataEventArgs`1

Generic arguments class to pass to event handlers that need to receive data.

Type Parameters

  • TData - The type of data to pass.

Constructor(value)

Initializes the DataEventArgs class.

Name Description
value `0
Information related to the event.

Value

Gets the information related to the event.

Value

Information related to the event.

DelegateReference

Represents a reference to a System.Delegate that may contain a System.WeakReference to the target. This class is used internally by the Prism Library.

Constructor(delegate, keepReferenceAlive)

Initializes a new instance of DelegateReference.

Name Description
delegate System.Delegate
The original System.Delegate to create a reference for.
keepReferenceAlive System.Boolean
If the class will create a weak reference to the delegate, allowing it to be garbage collected. Otherwise it will keep a strong reference to the target.

System.ArgumentNullException: If the passed delegate is not assignable to System.Delegate.

Target

Gets the System.Delegate (the target) referenced by the current DelegateReference object.

Value

if the object referenced by the current DelegateReference object has been garbage collected; otherwise, a reference to the System.Delegate referenced by the current DelegateReference object.

DispatcherEventSubscription

Extends EventSubscription to invoke the EventSubscription.Action delegate in a specific System.Threading.SynchronizationContext.

Constructor(actionReference, context)

Creates a new instance of BackgroundEventSubscription.

Name Description
actionReference Fort.Aggregator.IDelegateReference
A reference to a delegate of type System.Action`1.
context System.Threading.SynchronizationContext
The synchronization context to use for UI thread dispatching.

System.ArgumentNullException: When actionReference or are .

System.ArgumentException: When the target of actionReference is not of type System.Action`1.

InvokeAction(action)

Invokes the specified System.Action`1 asynchronously in the specified System.Threading.SynchronizationContext.

Name Description
action System.Action
The action to execute.

DispatcherEventSubscription`1

Extends EventSubscription`1 to invoke the EventSubscription`1.Action delegate in a specific System.Threading.SynchronizationContext.

Type Parameters

Constructor(actionReference, filterReference, context)

Creates a new instance of BackgroundEventSubscription.

Name Description
actionReference Fort.Aggregator.IDelegateReference
A reference to a delegate of type System.Action`1.
filterReference Fort.Aggregator.IDelegateReference
A reference to a delegate of type System.Predicate`1.
context System.Threading.SynchronizationContext
The synchronization context to use for UI thread dispatching.

System.ArgumentNullException: When actionReference or are .

System.ArgumentException: When the target of actionReference is not of type System.Action`1, or the target of filterReference is not of type System.Predicate`1.

InvokeAction(action, argument)

Invokes the specified System.Action`1 asynchronously in the specified System.Threading.SynchronizationContext.

Name Description
action System.Action{`0}
The action to execute.
argument `0
The payload to pass action while invoking it.

EventAggregator

Implements IEventAggregator.

GetEvent``1

Gets the single instance of the event managed by this EventAggregator. Multiple calls to this method with the same TEventType returns the same event instance.

Type Parameters

  • TEventType - The type of event to get. This must inherit from EventBase.

Returns

A singleton instance of an event object of type TEventType.

EventBase

Defines a base class to publish and subscribe to events.

Contains(token)

Returns if there is a subscriber matching SubscriptionToken.

Name Description
token Fort.Aggregator.SubscriptionToken
The SubscriptionToken returned by EventBase while subscribing to the event.

Returns

if there is a SubscriptionToken that matches; otherwise .

InternalPublish(arguments)

Calls all the execution strategies exposed by the list of IEventSubscription.

Name Description
arguments System.Object[]
The arguments that will be passed to the listeners.

Remarks

Before executing the strategies, this class will prune all the subscribers from the list that return a System.Action`1 when calling the IEventSubscription.GetExecutionStrategy method.

InternalSubscribe(eventSubscription)

Adds the specified IEventSubscription to the subscribers' collection.

Name Description
eventSubscription Fort.Aggregator.IEventSubscription
The subscriber.

Returns

The SubscriptionToken that uniquely identifies every subscriber.

Remarks

Adds the subscription to the internal list and assigns it a new SubscriptionToken.

Subscriptions

Gets the list of current subscriptions.

Value

The current subscribers.

SynchronizationContext

Allows the SynchronizationContext to be set by the EventAggregator for UI Thread Dispatching

Unsubscribe(token)

Removes the subscriber matching the SubscriptionToken.

Name Description
token Fort.Aggregator.SubscriptionToken
The SubscriptionToken returned by EventBase while subscribing to the event.

EventSubscription

Provides a way to retrieve a System.Delegate to execute an action depending on the value of a second filter predicate that returns true if the action should execute.

Constructor(actionReference)

Creates a new instance of EventSubscription.

Name Description
actionReference Fort.Aggregator.IDelegateReference
A reference to a delegate of type System.Action.

System.ArgumentNullException: When actionReference or are .

System.ArgumentException: When the target of actionReference is not of type System.Action.

Action

Gets the target System.Action that is referenced by the IDelegateReference.

Value

An System.Action or if the referenced target is not alive.

GetExecutionStrategy

Gets the execution strategy to publish this event.

Returns

An System.Action with the execution strategy, or if the IEventSubscription is no longer valid.

Remarks

If EventSubscription.Actionis no longer valid because it was garbage collected, this method will return . Otherwise it will return a delegate that evaluates the Filter and if it returns will then call EventSubscription.InvokeAction(System.Action). The returned delegate holds a hard reference to the EventSubscription.Action target System.Delegate. As long as the returned delegate is not garbage collected, the EventSubscription.Action references delegates won't get collected either.

InvokeAction(action)

Invokes the specified System.Action`1 synchronously when not overridden.

Name Description
action System.Action
The action to execute.

System.ArgumentNullException: An System.ArgumentNullException is thrown if action is null.

SubscriptionToken

Gets or sets a EventSubscription.SubscriptionToken that identifies this IEventSubscription.

Value

A token that identifies this IEventSubscription.

EventSubscription`1

Provides a way to retrieve a System.Delegate to execute an action depending on the value of a second filter predicate that returns true if the action should execute.

Type Parameters

Constructor(actionReference, filterReference)

Creates a new instance of EventSubscription`1.

Name Description
actionReference Fort.Aggregator.IDelegateReference
A reference to a delegate of type System.Action`1.
filterReference Fort.Aggregator.IDelegateReference
A reference to a delegate of type System.Predicate`1.

System.ArgumentNullException: When actionReference or are .

System.ArgumentException: When the target of actionReference is not of type System.Action`1, or the target of filterReference is not of type System.Predicate`1.

Action

Gets the target System.Action`1 that is referenced by the IDelegateReference.

Value

An System.Action`1 or if the referenced target is not alive.

Filter

Gets the target System.Predicate`1 that is referenced by the IDelegateReference.

Value

An System.Predicate`1 or if the referenced target is not alive.

GetExecutionStrategy

Gets the execution strategy to publish this event.

Returns

An System.Action`1 with the execution strategy, or if the IEventSubscription is no longer valid.

Remarks

If EventSubscription`1.Action or EventSubscription`1.Filter are no longer valid because they were garbage collected, this method will return . Otherwise it will return a delegate that evaluates the EventSubscription`1.Filter and if it returns will then call EventSubscription`1.InvokeAction(System.Action{`0},`0). The returned delegate holds hard references to the EventSubscription`1.Action and EventSubscription`1.Filter target System.Delegate. As long as the returned delegate is not garbage collected, the EventSubscription`1.Action and EventSubscription`1.Filter references delegates won't get collected either.

InvokeAction(action, argument)

Invokes the specified System.Action`1 synchronously when not overridden.

Name Description
action System.Action{`0}
The action to execute.
argument `0
The payload to pass action while invoking it.

System.ArgumentNullException: An System.ArgumentNullException is thrown if action is null.

SubscriptionToken

Gets or sets a EventSubscription`1.SubscriptionToken that identifies this IEventSubscription.

Value

A token that identifies this IEventSubscription.

IDelegateReference

Represents a reference to a System.Delegate.

Target

Gets the referenced System.Delegate object.

Value

A System.Delegate instance if the target is valid; otherwise .

IEventAggregator

Defines an interface to get instances of an event type.

IEventSubscription

Defines a contract for an event subscription to be used by EventBase.

GetExecutionStrategy

Gets the execution strategy to publish this event.

Returns

An System.Action`1 with the execution strategy, or if the IEventSubscription is no longer valid.

SubscriptionToken

Gets or sets a IEventSubscription.SubscriptionToken that identifies this IEventSubscription.

Value

A token that identifies this IEventSubscription.

PubSubEvent

Defines a class that manages publication and subscription to events.

Contains(subscriber)

Returns if there is a subscriber matching System.Action.

Name Description
subscriber System.Action
The System.Action used when subscribing to the event.

Returns

if there is an System.Action that matches; otherwise .

Publish

Publishes the PubSubEvent.

Subscribe(action, keepSubscriberReferenceAlive)

Subscribes a delegate to an event that will be published on the ThreadOption.PublisherThread.

Name Description
action System.Action
The delegate that gets executed when the event is published.
keepSubscriberReferenceAlive System.Boolean
When , the PubSubEvent keeps a reference to the subscriber so it does not get garbage collected.

Returns

A SubscriptionToken that uniquely identifies the added subscription.

Remarks

If keepSubscriberReferenceAlive is set to , PubSubEvent will maintain a System.WeakReference to the Target of the supplied action delegate. If not using a WeakReference (keepSubscriberReferenceAlive is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior.

The PubSubEvent collection is thread-safe.

Subscribe(action)

Subscribes a delegate to an event that will be published on the ThreadOption.PublisherThread. PubSubEvent will maintain a System.WeakReference to the target of the supplied action delegate.

Name Description
action System.Action
The delegate that gets executed when the event is published.

Returns

A SubscriptionToken that uniquely identifies the added subscription.

Remarks

The PubSubEvent collection is thread-safe.

Unsubscribe(subscriber)

Removes the first subscriber matching System.Action from the subscribers' list.

Name Description
subscriber System.Action
The System.Action used when subscribing to the event.

PubSubEvent`1

Defines a class that manages publication and subscription to events.

Type Parameters

  • TPayload - The type of message that will be passed to the subscribers.

Contains(subscriber)

Returns if there is a subscriber matching System.Action`1.

Name Description
subscriber System.Action{`0}
The System.Action`1 used when subscribing to the event.

Returns

if there is an System.Action`1 that matches; otherwise .

Publish(payload)

Publishes the PubSubEvent`1.

Name Description
payload `0
Message to pass to the subscribers.

Subscribe(action, threadOption, keepSubscriberReferenceAlive, filter)

Subscribes a delegate to an event.

Name Description
action System.Action{`0}
The delegate that gets executed when the event is published.
threadOption System.Boolean
Specifies on which thread to receive the delegate callback.
keepSubscriberReferenceAlive System.Predicate{`0}
When , the PubSubEvent`1 keeps a reference to the subscriber so it does not get garbage collected.
filter Unknown type
Filter to evaluate if the subscriber should receive the event.

Returns

A SubscriptionToken that uniquely identifies the added subscription.

Remarks

If keepSubscriberReferenceAlive is set to , PubSubEvent`1 will maintain a System.WeakReference to the Target of the supplied action delegate. If not using a WeakReference (keepSubscriberReferenceAlive is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior. The PubSubEvent collection is thread-safe.

Subscribe(action, keepSubscriberReferenceAlive)

Subscribes a delegate to an event that will be published on the ThreadOption.PublisherThread.

Name Description
action System.Action{`0}
The delegate that gets executed when the event is published.
keepSubscriberReferenceAlive System.Boolean
When , the PubSubEvent`1 keeps a reference to the subscriber so it does not get garbage collected.

Returns

A SubscriptionToken that uniquely identifies the added subscription.

Remarks

If keepSubscriberReferenceAlive is set to , PubSubEvent`1 will maintain a System.WeakReference to the Target of the supplied action delegate. If not using a WeakReference (keepSubscriberReferenceAlive is ), the user must explicitly call Unsubscribe for the event when disposing the subscriber in order to avoid memory leaks or unexpected behavior.

The PubSubEvent collection is thread-safe.

Subscribe(action)

Subscribes a delegate to an event that will be published on the ThreadOption.PublisherThread. PubSubEvent`1 will maintain a System.WeakReference to the target of the supplied action delegate.

Name Description
action System.Action{`0}
The delegate that gets executed when the event is published.

Returns

A SubscriptionToken that uniquely identifies the added subscription.

Remarks

The PubSubEvent collection is thread-safe.

Unsubscribe(subscriber)

Removes the first subscriber matching System.Action`1 from the subscribers' list.

Name Description
subscriber System.Action{`0}
The System.Action`1 used when subscribing to the event.

SubscriptionToken

Subscription token returned from EventBase on subscribe.

Constructor(System.Action{Fort.Aggregator.SubscriptionToken})

Initializes a new instance of SubscriptionToken.

Dispose

Disposes the SubscriptionToken, removing the subscription from the corresponding EventBase.

Equals(other)

Indicates whether the current object is equal to another object of the same type.

Returns

if the current object is equal to the other parameter; otherwise, .

Name Description
other Fort.Aggregator.SubscriptionToken
An object to compare with this object.

Equals(obj)

Determines whether the specified System.Object is equal to the current System.Object.

Returns

true if the specified System.Object is equal to the current System.Object; otherwise, false.

Name Description
obj System.Object
The System.Object to compare with the current System.Object.

System.NullReferenceException: The obj parameter is null.

GetHashCode

Serves as a hash function for a particular type.

Returns

A hash code for the current System.Object.

IAchievementService

This service is used to manage Achievement actions like claiming achievement and checking if achievement is claimed

ClaimAchievement(levelBaseType, achivementLevelIndex)

Claiming level base achievement

Name Description
levelBaseType System.Type
The type of level base achievement
achivementLevelIndex System.Int32
Level of achievement that must be claimed

ClaimAchievement(noneLevelBaseType)

Claiming none level base achievement

Name Description
noneLevelBaseType System.Type
The type of none level base achievement

GetAchievementClaimedIndex(levelBaseType)

Return the index of claimed level base achievement

Name Description
levelBaseType System.Type
index of claimed level base achievement

Returns

IsAchievementClaimed(noneLevelBaseType)

Is none level base achievement claimed

Name Description
noneLevelBaseType System.Type
The type of none level base achievement

Returns

ResolveAchievementScoreBalance(id)

Resolving the score and balance of an achievement or achievement level by Id

Name Description
id System.String
Id of achievement or achievement level

Returns

IAdvertisementService

This Service is used to manage advertisement. Ability such as adding advertisement providers and prioritize them or optimization of video fill rate

ChangeStandardBannerPosition(verticalAlignment, horizantalAlignment)

Changing standard banner Position

Name Description
verticalAlignment Fort.StandardBannerVerticalAlignment
Vertical Alignment
horizantalAlignment Fort.StandardBannerHorizantalAlignment
Horizantal Alignment

HideStandardBanner

Hiding standard banner

IsInterstitialBannerSupported

Is any added video provider support Interstitial Banner

IsStandardBannerSupported

Is any added video provider support Standard Banner ad

IsVideoSupported

Is any added video provider support Video

ShowInterstiatialBanner

Showing interstiatial banner

ShowStandardBanner

Shownig standard banner

ShowVideo(zone, skipable, removabale)

Show video

Name Description
zone System.Int32
zone is used in video providers to classifying advertisement
skipable System.Boolean
Is video skipable
removabale System.Boolean
Is showing this video can be removed by purchasing RemoveAdIapPackage

Returns

Return a promise

IAnalyticsService

This service is used to stat Fort and custom analytic item

StatAchievementClaimed(achievementId, award)

Stat achievemt claim

Name Description
achievementId System.String
The Id of Achievement or Achievement item level
award Fort.ScoreBalance

StateCustomEvent(name, label, category, value)

Stat custom events

Name Description
name System.String
Name of event
label System.String
Label of event
category System.String
category of event
value System.Object
value of event

StatGameLevelFinished(gameLevelInfo, levelFinishStat)

Stat the finishing of game level

Name Description
gameLevelInfo Fort.Info.GameLevel.GameLevelInfo
The corresponding game level info
levelFinishStat Fort.ILevelFinishStat
The stat of game level

StatIapFailed(iapPackage, purchaseToken, market, iapPurchaseFail)

Stat Iap package purchase failed

Name Description
iapPackage Fort.Info.Market.Iap.IapPackageInfo
Corresponding iap package
purchaseToken System.String
Market returned purchase token
market System.String
The name of the market that the purchase occurred in
iapPurchaseFail Fort.IapPurchaseFail
Failed reason. Possible values (Cancel,MarketFailed,FortServerFail,FraudDetected)

StatIapPurchased(iapPackage, market)

Stat Iap package purchase

Name Description
iapPackage Fort.Info.Market.Iap.IapPackageInfo
Corresponding iap package
market System.String
The name of the market that the purchase occurred in

StatIapRetry(iapPackage, purchaseToken, market)

Stat Iap package retry

Name Description
iapPackage Fort.Info.Market.Iap.IapPackageInfo
Corresponding iap package
purchaseToken System.String
Market returned purchase token
market System.String
The name of the market that the purchase occurred in

StatIapRetryFail(iapPackage, purchaseToken, market, iapRetryFail)

Stat Iap package retry failed

Name Description
iapPackage Fort.Info.Market.Iap.IapPackageInfo
Corresponding iap package
purchaseToken System.String
Market returned purchase token
market System.String
The name of the market that the purchase occurred in
iapRetryFail Fort.IapRetryFail
Failed reason. Possible values (FortServerFail,FraudDetected)

StatInterstitialBanner(advertismentProvider)

Stat showing interstitial banner

Name Description
advertismentProvider System.String
The provider of advertisement

StatInvitationApplied

Stat applying of invitation

StatInvitationShare

Stat sharing of invitation

StatItemPurchased(itemId, cost, discount)

Stat item purchase

Name Description
itemId System.String
The Id of Purchased item or Purchase item level
cost Fort.Info.Balance
The cost of purchase
discount System.Int32
The discount or purchase

StatItemRent(itemId, duration)

Stat item rent

Name Description
itemId System.String
The Id of Purchased item or Purchase item level
duration System.TimeSpan
Rent duration

StatSceneLoaded(sceneName)

Stat loading of scene

Name Description
sceneName System.String
The name of scene

StatStandardBanner(advertismentProvider)

Stat showing standard banner

Name Description
advertismentProvider System.String
The provider of advertisement

StatUserRegisterd

Stat user registeration

StatVideoRequest(advertismentProvider, zone, skipable)

Stat video showing request

Name Description
advertismentProvider System.String
The provider of advertisement
zone System.Int32
The zone of advertisement
skipable System.Boolean
Is requested video skipable

StatVideoResult(advertismentProvider, zone, skipable, videoResult)

Stat video showing result

Name Description
advertismentProvider System.String
The provider of advertisement
zone System.Int32
The zone of advertisement
skipable System.Boolean
Is requested video skipable
videoResult Fort.ShowVideoResult
The result of showing video.Possible values (Succeeded,Cancel,NoVideoAvilable,ProviderError)

IAssetService

This service is used to manage assets of game. Asset bundle management is provided by this service.

DownloadAllAssetBundles(progress)

Download not downloaded asset bundle

Name Description
progress System.Action{Fort.AllAssetBundleDownloadProgressInfo}
A call back that return progress of download

Returns

Promise of download

DownloadAssetBundle(assetBundle, progress)

Download single asset bundle

Name Description
assetBundle System.String
Name of asset bundle
progress System.Action{Fort.ServerConnection.DownloadProgress}
A call back that return progress of download

Returns

Promise of download

GetAssetBundleList

Resolving the list of asset bundle

Returns

List of asset bundles

GetNotDownloadedInfo

Resolve not downloaded asset bundle name and size of them

Returns

Return not downloaded asset bundle name and size of them

IsAssetBundleDownloaded(assetBundle)

Is asset bundle downloaded

Name Description
assetBundle System.String
Name of asset bundle

Returns

Is asset bundle downloaded

IsReady(gameItem)

Is game item ready to use

Name Description
gameItem Fort.Info.GameItem.GameItemInfo
Corresponding game item

Returns

Is game item ready to use

Resolve(gameItem)

Resolving game item

Name Description
gameItem Fort.Info.GameItem.GameItemInfo
Corresponding game item

Returns

The asset

IEventAggregatorService

This service used for aggregating event

GetEvent``1

Return event

Type Parameters

  • TEventType - Event class

Returns

Return event

IInvitationService

This service is used to manage invitation.

ApplyInvitation

Apply invitation from cached Invitation token

Returns

Promise of invitation applying

ResolveInvitationData

Resolve Invititation data from server

Returns

Invitaion Data Promise

ResolveInvitationToken

Resolving invitation token from application url or cache

Returns

invitation token

ShareLink

Share Game link and invitation token

ILanguageService

The service that used to manage languages

ActivateLanguage(language)

Activating language

Name Description
language Fort.Info.Language.LanguageInfo
Corresponding language

GetActiveLanguage

Get active language

Returns

Active language

GetLanguagesList

Get avialable language in publish

Returns

Language list

ILeaderboardService

This service is use to load leaderboard data

ResolveLeaderBoardUsers

Resolve leaderboard user data

Returns

promise leaderboard user list

ILevelManagementService

Service to manage game levels

ContinueLoadGameLevelAsync

Continue loading game scene after loader scene

Returns

Unity load scene async operation

GameLevelFinished(parameters)

Call this method whenever the game is finished

Name Description
parameters Fort.LevelFinishParameters
Level finish parameter

GetGameFinishStat(level)

Resolve cached level finish stat of a game level info

Name Description
level Fort.Info.GameLevel.GameLevelInfo
Corresponding game level info

Returns

Level finish stat

GetLastGameFinishStat

Get Last game level stat that is passed to GameLevelFinished() method

Returns

Level finish stat.(If no cached data null value will be returned)

GetLastLoadedLevel

Resolve last loaded game level info

Returns

last loaded game level info

LoadGameLevel(level)

Load Game Level

Name Description
level Fort.Info.GameLevel.GameLevelInfo
Corresponding game level info

LoadGameLevelAsync(level)

Load game level async.(Loader scene of GameLevel in fort will be load)

Name Description
level Fort.Info.GameLevel.GameLevelInfo
Corresponding game level info

InvitationData

Data for invitation

InvitationAddedValues

Applied invitation added values

InvitationCount

Invitation applied count

InvitorUserName

The username of invitor

ISceneLoaderService

Service to manage loading of scene. Ability such as stacking level loaded sequences and return to last scene and passing context to newly loaded scene

GetLastLoadContext

Returning last load context

Returns

Last load context

IsReturnCapable

Determine if any scene exists in stack to return

Load(parameters)

Loading scene and returning a complition promise. Whenever another load accurred or return call the new context will pass to this promise and resolve it

Name Description
parameters Fort.SceneLoadParameters
Scene loading parameters

Returns

LoadAsync(parameters)

Load scene async.

Name Description
parameters Fort.SceneLoadParameters
Scene loading parameters

Returns

Unity load scene async operation

Return(context)

Return to last stacked scene

Name Description
context System.Object
The context of Load() Method promise

ISettingService

Fort global settings

GetVersion

Get deployed version can be used in android and ios and is changable in Player settings of unity

Returns

Version of deployment

ResolveCachedServerSetting

Resolving server chached settings

Returns

Server settings

ResolveServerSettings

Resolving server Settings

Returns

Promise of server settings

ISkinnerBoxService

Service to manage skinner box

GetFreeSkinnerBoxAvailabiltyDuration(boxInfo)

Returning the availability delay of free skinner box

Name Description
boxInfo Fort.Info.SkinnerBox.FreeSkinnerBoxInfo
Corresponding free skinner box

Returns

The availability delay of free skinner box

GetPurchableskinnerBoxCount(boxInfo)

Resolve the count of purchased box

Name Description
boxInfo Fort.Info.SkinnerBox.PurchableSkinnerBoxInfo

Returns

count of purchased box

IsFreeSkinnerBoxAvailable(boxInfo)

Return if skinner box available

Name Description
boxInfo Fort.Info.SkinnerBox.FreeSkinnerBoxInfo
Free box info

Returns

Is skinner box available

OpenBox(boxInfo)

Opening a box

Name Description
boxInfo Fort.Info.SkinnerBox.SkinnerBoxInfo
Corresponding skinner box

Returns

Returning item that is picked from skinner box

IStorageService

Service that is used to save classes

ContainsData(dataType)

Is any data saved for this type

Name Description
dataType System.Type
Type of class

Returns

Is any data saved for this type

ResolveData(dataType)

Resolving saved data.(null will return if no data saved for this class type)

Name Description
dataType System.Type
Type of class

Returns

Returning saved data.(null will return if no data saved for this class type)

ResolveTokenData(dataType, token)

Resolving data that contain a token

Name Description
dataType System.Type
Type of class
token System.String
Token for load

Returns

Returning saved data.(null will return if no data saved for this class type)

SaveOnMemoryData(dataType)

Save cached data to storage

Name Description
dataType System.Type
Type of class

SaveOnMemoryDataLatent(dataType)

Save cached data to storage in another thread. Data will be cloned and a copy of it will be saved

Name Description
dataType System.Type
Type of class

Returns

Promise of updating

UpdateData(data, dataType)

Updating data

Name Description
data System.Object
Data to update
dataType System.Type
Type of class

UpdateDataLatent(data, dataType)

Updating data in another thread. Data will be cloned and a copy of it will be saved

Name Description
data System.Object
Data to update
dataType System.Type
Type of class

Returns

Promise of updating

UpdateOnMemory(data, dataType)

Update data only on cache of storage

Name Description
data System.Object
Data to update
dataType System.Type
Type of class

UpdateTokenData(data, token, dataType)

Save data with a token

Name Description
data System.Object
Data to update
token System.String
Token for save
dataType System.Type
Type of class

UpdateTokenDataLatent(data, token, dataType)

Save data with a token in another thread. Data will be cloned and a copy of it will be saved

Name Description
data System.Object
Data to update
token System.String
Token for save
dataType System.Type
Type of class

Returns

Promise of updating

Fort.IStoreService.GetDiscount(packageType)

Get discount of Iap package

Name Description
packageType System.Type
Type of IapPackageInfo

Returns

Discount

Fort.IStoreService.IsEnoughFundToPurchaseItem(purchasableItem, discount)

Return if user has enough fund to purchase this item

Name Description
purchasableItem Fort.Info.PurchasableItem.PurchasableItemInfo
Item to purchase
discount System.Int32
Discout for purchase.(value betwean 0 and 100)

Returns

User has enough fund to purchase this item

Fort.IStoreService.IsItemPurchased(id)

Return if item purchased

Name Description
id System.String
Id of purchase item or id of Level of purchase item

Returns

Is item purchased

Fort.IStoreService.IsItemRented(id)

Return if item Rented

Name Description
id System.String
Id of purchase item or id of Level of purchase item

Returns

Is item rented

Fort.IStoreService.IsItemUsable(id)

Return if item can be use in game.(purchased or rented)

Name Description
id System.String
Id of purchase item or id of Level of purchase item

Returns

Item can be use in game.(purchased or rented)

Fort.IStoreService.PurchaseItem(purchasableItem, discount)

Purchase item.In Level base purchasable item first posibble Level will be purchased

Name Description
purchasableItem Fort.Info.PurchasableItem.PurchasableItemInfo
Item to purchase
discount System.Int32
Discout for purchase.(value betwean 0 and 100)

Fort.IStoreService.PurchasePackage(iapPackage)

Purchase Iap package

Name Description
iapPackage Fort.Info.Market.Iap.IapPackageInfo
Corresponding Iap package

Returns

Promise of purchasing Iap package

Fort.IStoreService.RemoveDiscount(packageType)

Removing discount of Iap package

Name Description
packageType System.Type

Fort.IStoreService.RentItem(noneLevelBasePurchasableItemInfo, discount, rentDuration)

Rent none level base purchasable item

Name Description
noneLevelBasePurchasableItemInfo Fort.Info.PurchasableItem.NoneLevelBasePurchasableItemInfo
Item to rent
discount System.Int32
Discout for rent.(value betwean 0 and 100)
rentDuration System.TimeSpan
The duration of rent.

Fort.IStoreService.RentItem(purchasableLevelInfo, discount, rentDuration)

Rent Level base purchasable item

Name Description
purchasableLevelInfo Fort.Info.PurchasableItem.PurchasableLevelInfo
Level of item
discount System.Int32
Discout for rent.(value betwean 0 and 100)
rentDuration System.TimeSpan
The duration of rent.

Fort.IStoreService.ReportPurchasePackage(iapPackage, purchaseToken)

In some cases the purchasing of Iap package Encounter a problem.Report Iap package will retry purchase Iap package.

Name Description
iapPackage Fort.Info.Market.Iap.IapPackageInfo
Corresponding Iap package
purchaseToken System.String
Market purchase token

Returns

Promise of purchasing Iap package

Fort.IStoreService.ResolvePackages

Resolving Iap package list. If server provider added this list will be loaded from server and prices will be synced from server.

Returns

Promise of Iap package list.

Fort.IStoreService.ResolvePurchasableItemCost(id)

Return if item purchase and rent cost

Name Description
id System.String
Id of purchase item or id of Level of purchase item

Returns

Item purchase and rent cost

Fort.IStoreService.SetDiscount(packageType, discount, duration)

Set discount for Iap package

Name Description
packageType System.Type
Type of IapPackageInfo
discount System.Int32
Discout for Iap package.(value betwean 0 and 100)
duration System.TimeSpan
Duration of discount

IUserManagementService

Service to manage user

AddScoreAndBalance(score, balance)

Adding score and balance.Data will update to server in full update

Name Description
score System.Int32
Added score
balance Fort.Info.Balance
Added balance

Balance

Get user balance

FullUpdate

Full update user score, balance, claimed achievement and purchased item

Returns

Promise of update

GetSystemId

return a unique id of system

Returns

Unique id of system

IsRegistered

Is user registered

Login(username, password)

Login user

Name Description
username System.String
The username of user
password System.String
The password of user

Returns

Register(username, password)

Register user

Name Description
username System.String
The username of user
password System.String
The password of user

Returns

Score

Get user score

Username

Get username

SceneLoadParameters

Parameters for loading scene

AddToSceneStack

Add current scene to scene stack

CaptureReturnKey

Capture return key and automatically return to last stacked scene if possible

Context

Context that will pass to GetLastLoadContext() Method of ISceneLoaderService and can be resolve by GetLastLoadContext() of ISceneLoaderService

FlushSceneStack

Clear all scene stack

SceneName

Scene name

ScoreBalance

This class encapsulates score and balance

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.