Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- [System.Serializable]
- public class Order {
- public bool hasDrink = false;
- public bool hasCheese = true;
- public bool hasTomato = false;
- public List<IngredientData> toppings;
- public int weight = 1;
- }
- [System.Serializable]
- public class CustomerData
- {
- public float basePatience;
- public List<Order> potentialOrders;
- }
- [System.Serializable]
- public class Wave {
- public float basePatience = 40f;
- public List<Order> potentialOrders;
- public float timeToNextWave = 1f;
- public float customerSpawnInterval = 1f;
- public int normalCustomerCount;
- public List<CustomerData> startCustomers;
- public List<CustomerData> endCustomers;
- [HideInInspector]
- public List<CustomerData> customers;
- public void GenerateCustomers()
- {
- customers = new List<CustomerData>();
- for(int i = 0; i < startCustomers.Count; i++)
- {
- customers.Add(startCustomers[i]);
- }
- for(int i = 0; i < normalCustomerCount; i++)
- {
- CustomerData customerData = new CustomerData();
- customerData.basePatience = this.basePatience;
- customerData.potentialOrders = new List<Order>(potentialOrders);
- customers.Add(customerData);
- }
- for (int i = 0; i < endCustomers.Count; i++)
- {
- customers.Add(endCustomers[i]);
- }
- }
- }
- [CreateAssetMenu(fileName = "Data", menuName = "ScriptableObjects/LevelData", order = 1)]
- public class LevelData : ScriptableObject
- {
- public float scoreOneStar, scoreTwoStar, scoreThreeStar = 0f;
- // score stuff
- public List<Wave> waves;
- public int GetCustomerCount()
- {
- int count = 0;
- foreach(Wave wave in waves)
- {
- count += wave.startCustomers.Count;
- count += wave.endCustomers.Count;
- count += wave.normalCustomerCount;
- }
- return count;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement