Пример #1
0
    //Below methods are important for the generation behavior to be consistent
    //Do not edit those unless you know what you are doing
    void Start()
    {
        rand = new System.Random((int)(DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond));

        items = CustomItemManager.initializeListPrefab(CustomItemManager.loadItemList(CustomItemManager.getItemListPath()));

        if (orderedItems == null)
        {
            orderedItems = CustomItemManager.reorderListByChance(items);
        }
    }
Пример #2
0
    public void PrepareItemList()
    {
        rand = new System.Random((int)(DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond));


        if (!Application.isEditor)
        {
            items = CustomItemManager.initializeListPrefab(CustomItemManager.loadItemList((String.IsNullOrEmpty(CustomListPath)) ? CustomItemManager.getDefaultListPath() : CustomListPath));
        }
        else
        {
            items = CustomItemManager.initializeListPrefab(CustomItemManager.loadItemList((String.IsNullOrEmpty(CustomListPath)) ? CustomItemManager.getResourcesFolderPrefix() + CustomItemManager.getDefaultListPath() + ".txt": CustomItemManager.getResourcesFolderPrefix() + CustomListPath + ".txt"));
        }

        if (orderedItems == null)
        {
            orderedItems = CustomItemManager.reorderListByChance(items);
        }
    }