Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        Armors     = MasterManager.ManagerSprite.ArmorList;
        Helmets    = MasterManager.ManagerSprite.HelmetList;
        LeftHands  = MasterManager.ManagerSprite.LeftHandList;
        RightHands = MasterManager.ManagerSprite.RightHandList;
        Pants      = MasterManager.ManagerSprite.PantsList;
        Shoes      = MasterManager.ManagerSprite.ShoesList;
        ItemDropDown.ClearOptions();

        itemList = MasterManager.ManagerGlobalData.GetItemDataInfo();

        List <string> items = new List <string>();

        for (int i = 0; i < itemList.itemData.Count; i++)
        {
            items.Add(itemList.itemData[i].Stats.Name);
        }
        ItemDropDown.AddOptions(items);

        List <string> types = new List <string>();

        types.Add(Constants.RIGHT_HAND);
        types.Add(Constants.ARMOR);
        types.Add(Constants.LEFT_HAND);
        types.Add(Constants.HELMET);
        types.Add(Constants.PANTS);
        types.Add(Constants.SHOES);
        tierText.text = tier.ToString();

        TypeDropDown.ClearOptions();
        TypeDropDown.AddOptions(types);

        Reset();
    }
Exemplo n.º 2
0
    public void SetItemDataInfo(ListItemsInfo itemList, bool ForceSave = false)
    {
        itemDataInfo = itemList;

        if (ForceSave)
        {
            Utility.WriteDataToJSON <ListItemsInfo>(Constants.JSONIndex.DATA_ITEM, ref itemDataInfo);
        }
    }
Exemplo n.º 3
0
    public void LoadallData()
    {
        playerDataInfo  = Utility.ReadDataFromJSON <ListDataInfo>(Constants.JSONIndex.DATA_PLAYER);
        enemiesDataInfo = Utility.ReadDataFromJSON <ListEnemiesInfo>(Constants.JSONIndex.DATA_ENEMY);
        itemDataInfo    = Utility.ReadDataFromJSON <ListItemsInfo>(Constants.JSONIndex.DATA_ITEM);
        envData         = Utility.ReadDataFromJSON <EnvironmentData>(Constants.JSONIndex.DATA_ENVIRONMENT);
        workData        = Utility.ReadDataFromJSON <ListWorkInfo>(Constants.JSONIndex.DATA_WORK);
        config          = Utility.ReadDataFromJSON <Configuration>(Constants.JSONIndex.DATA_CONFIG);
        creditData      = Utility.ReadDataFromJSON <ListCreditInfo>(Constants.JSONIndex.DATA_CREDIT);

        Debug.Log("All Data Loaded");
        //Debug.Log(enemiesStatus[0].statsList[0].Agility);
    }
Exemplo n.º 4
0
    // Use this for initialization
    void Start()
    {
        rngCannon = Random.Range(0, 100);

        Button btn = continueButton.GetComponent <Button>();

        btn.onClick.AddListener(continueButtonClick);

        playerDataInfo = MasterManager.ManagerGlobalData.GetPlayerDataInfo();
        currentTier    = playerDataInfo.playerTier == 0 ? 1 : playerDataInfo.playerTier;

        itemDataInfo = MasterManager.ManagerGlobalData.GetItemDataInfo();
        itemData     = new List <ItemDataInfo>();

        fireTheCannon();
    }