示例#1
0
    public void ForceAwake()
    {
        var shopItems = ScriptableObjectUtils.GetAllInstances <ShopItem>()
                        .Where(x => x.PurchaseType == shopType && x.IsActive == true)
                        .OrderBy(x => x.BasePrice);

        foreach (var item in shopItems)
        {
            var row = Instantiate(shopRowPrefab, shopContainer.transform);
            row.item = item;
            row.ForceAwake();
            rows.Add(row);
        }
    }
 private void Awake()
 {
     spawners = ScriptableObjectUtils.GetAllInstances <Spawner>().ToList();
 }