C# 클래스 Soomla.Store.UpgradeVG

An upgrade virtual good is one VG in a series of VGs that define an upgrade scale of an associated VirtualGood. This type of virtual good is best explained with an example: Let's say there's a strength attribute to one of the characters in your game and that strength is on a scale of 1-5. You want to provide your users with the ability to upgrade that strength. This is what you'll need to create: 1. SingleUseVG for 'strength' 2. UpgradeVG for strength 'level 1' 3. UpgradeVG for strength 'level 2' 4. UpgradeVG for strength 'level 3' 5. UpgradeVG for strength 'level 4' 6. UpgradeVG for strength 'level 5' When the user buys this UpgradeVG, we check and make sure the appropriate conditions are met and buy it for you (which actually means we upgrade the associated VirtualGood). NOTE: In case you want this item to be available for purchase with real money you will need to define the item in the market (App Store, Google Play...). Inheritance: UpgradeVG > com.soomla.store.domain.virtualGoods.VirtualGood > com.soomla.store.domain.PurchasableVirtualItem > com.soomla.store.domain.VirtualItem
상속: Soomla.Store.LifetimeVG
파일 보기 프로젝트 열기: fi-content2-games-platform/FIcontent.Gaming.Enabler.phenomobilecharactermanager 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
GoodItemId string
NextItemId string
PrevItemId string

공개 메소드들

메소드 설명
Give ( int amount, bool notify ) : int

Assigns the current upgrade to the associated VirtualGood (mGood).

Take ( int amount, bool notify ) : int

Takes upgrade from the user, or in other words DOWNGRADES the associated VirtualGood (mGood). Checks if the current Upgrade is really associated with the VirtualGood and:

UpgradeVG ( JSONObject jsonItem ) : UnityEngine

see parent.

UpgradeVG ( string goodItemId, string nextItemId, string prevItemId, string name, string description, string itemId, Soomla.Store.PurchaseType purchaseType ) : UnityEngine

Constructor.

toJSONObject ( ) : JSONObject

see parent.

보호된 메소드들

메소드 설명
canBuy ( ) : bool

Determines if the user is in a state that allows him/her to buy an UpgradeVG This method enforces allowing/rejecting of upgrades here so users won't buy them when they are not supposed to. If you want to give your users free upgrades, use the give function.

메소드 상세

Give() 공개 메소드

Assigns the current upgrade to the associated VirtualGood (mGood).
public Give ( int amount, bool notify ) : int
amount int NOT USED HERE!
notify bool notify of change in user's balance of current virtual item.
리턴 int

Take() 공개 메소드

Takes upgrade from the user, or in other words DOWNGRADES the associated VirtualGood (mGood). Checks if the current Upgrade is really associated with the VirtualGood and:
public Take ( int amount, bool notify ) : int
amount int NOT USED HERE!.
notify bool see parent.
리턴 int

UpgradeVG() 공개 메소드

see parent.
public UpgradeVG ( JSONObject jsonItem ) : UnityEngine
jsonItem JSONObject
리턴 UnityEngine

UpgradeVG() 공개 메소드

Constructor.
public UpgradeVG ( string goodItemId, string nextItemId, string prevItemId, string name, string description, string itemId, Soomla.Store.PurchaseType purchaseType ) : UnityEngine
goodItemId string The itemId of the VirtualGood associated with this upgrade.
nextItemId string The itemId of the UpgradeVG before, or if this is the first /// UpgradeVG in the scale then the value is null.
prevItemId string The itemId of the UpgradeVG after, or if this is the last /// UpgradeVG in the scale then the value is null.
name string nName.
description string Description.
itemId string Item id.
purchaseType Soomla.Store.PurchaseType Purchase type.
리턴 UnityEngine

canBuy() 보호된 메소드

Determines if the user is in a state that allows him/her to buy an UpgradeVG This method enforces allowing/rejecting of upgrades here so users won't buy them when they are not supposed to. If you want to give your users free upgrades, use the give function.
protected canBuy ( ) : bool
리턴 bool

toJSONObject() 공개 메소드

see parent.
public toJSONObject ( ) : JSONObject
리턴 JSONObject

프로퍼티 상세

GoodItemId 공개적으로 프로퍼티

The itemId of the associated VirtualGood.
public string GoodItemId
리턴 string

NextItemId 공개적으로 프로퍼티

The itemId of the UpgradeVG that comes after this one (or null this is the last one)
public string NextItemId
리턴 string

PrevItemId 공개적으로 프로퍼티

The itemId of the UpgradeVG that comes before this one (or null this is the first one)
public string PrevItemId
리턴 string