Exemplo n.º 1
0
    public static CustomerRequestData Create(int id, int budget, TourType tourType, int[] lengthVacation)
    {
        CustomerRequestData data = ScriptableObject.CreateInstance <CustomerRequestData>();

        AssetDatabase.CreateAsset(data, "Assets/Scripts/Resources/CustomerRequestData/" + id + ".asset");
        data.SetData(id, budget, tourType, lengthVacation);
        AssetDatabase.Refresh();
        return(data);
    }
    //Разделить логику генерации и переключения элементов в игре
    private void Start()
    {
        for (int i = 0; i < _countRequest; i++)
        {
            CustomerRequestData currentReqestData = CustomerRequestData.Create(i, GetTravelBudget(), GetTourType(), GetLengthVacation());
            _currentCustomerReques.Add(currentReqestData);
        }

        _numberCurrentRequest = 0;
        ChangeTextPanel();
    }