Exemple #1
0
    public PowerupData(Dictionary <string, object> rawData)
    {
        powerupName        = JsonUtility.GetString(rawData, TAG_ITEM_NAME);
        powerupId          = JsonUtility.GetString(rawData, TAG_ITEM_ID);
        powerupDescription = JsonUtility.GetString(rawData, TAG_ITEM_DESCRIPTION);
        powerupPrice       = JsonUtility.GetFloat(rawData, TAG_PRICE);
        buffCode           = JsonUtility.GetString(rawData, TAG_BUFF_ID);
        Object o = AssetManager.Instance.GetPrefabByKeyword(buffCode + TAG_PREVIEW);

        spritePowerUp = ImageUtility.CreateSpriteFromObject(o);
    }
Exemple #2
0
    public LeaderboardData(Dictionary <string, object> rawData)
    {
        leaderboardId         = JsonUtility.GetString(rawData, TAG_ITEM_ID);
        leaderboardPlayerName = JsonUtility.GetString(rawData, TAG_ITEM_NICKNAME);

        rankingNumber = JsonUtility.GetInt(rawData, TAG_ITEM_RANK);
        colorCode     = JsonUtility.GetInt(rawData, TAG_COLORCODE);

        skinCode = JsonUtility.GetString(rawData, TAG_SKIN_ID);

        spriteFish = ImageUtility.CreateSpriteFromObject(AssetManager.Instance.GetPrefabByKeyword(skinCode + TAG_LV1));
    }
Exemple #3
0
    public ShopSkinData(Dictionary <string, object> rawData)
    {
        skinName        = JsonUtility.GetString(rawData, TAG_ITEM_NAME);
        skinId          = JsonUtility.GetString(rawData, TAG_ITEM_ID);
        skinDescription = JsonUtility.GetString(rawData, TAG_ITEM_DESCRIPTION);
        skinPrice       = JsonUtility.GetFloat(rawData, TAG_PRICE);
        isPayWithGold   = true;

        skinCode          = JsonUtility.GetString(rawData, TAG_SKIN_ID);
        spriteMinLevel    = ImageUtility.CreateSpriteFromObject(AssetManager.Instance.GetPrefabByKeyword(skinCode + TAG_LV1));
        spriteMaxLevel    = ImageUtility.CreateSpriteFromObject(AssetManager.Instance.GetPrefabByKeyword(skinCode + TAG_LV10));
        spriteColorSprite = ImageUtility.CreateSpriteFromObject(AssetManager.Instance.GetPrefabByKeyword(skinCode + TAG_COLORSPRITE));
    }
Exemple #4
0
    public ShopGoldData(Dictionary <string, object> rawData)
    {
        skuId  = JsonUtility.GetString(rawData, TAG_PACKAGE_NAME);
        goldId = JsonUtility.GetString(rawData, TAG_ITEM_ID);

        goldPrice = JsonUtility.GetFloat(rawData, TAG_PRICE);

        goldName = JsonUtility.GetString(rawData, TAG_ITEM_NAME);
        codeIAP  = JsonUtility.GetString(rawData, TAG_SKIN_NAME);
        if (codeIAP.Contains("no_ads") || codeIAP.Contains("xmas_bundle_2016"))
        {
            spriteIAP = ImageUtility.CreateSpriteFromObject(AssetManager.Instance.GetPrefabByKeyword(codeIAP));
            isSprite  = true;
        }
        else
        {
            // use 'codeIAP' to generate prefab and put under parent.
//			goldName = JsonUtility.GetInt(rawData, TAG_AMOUNT) + " GOLD";
            //spriteIAP = ImageUtility.CreateSpriteFromObject (AssetManager.Instance.GetPrefabByKeyword(codeIAP));
            isSprite = false;
        }
    }