move
This commit is contained in:
@@ -73,24 +73,20 @@ public class SimulationModelSource : SimulationModel
|
||||
int productCount = 0;
|
||||
int defectCount = 0;
|
||||
|
||||
protected override void init()
|
||||
{
|
||||
base.init();
|
||||
eventKey = "generator_event";
|
||||
}
|
||||
|
||||
public override void GetData(string data)
|
||||
{
|
||||
var wrapclass = JsonConvert.DeserializeObject<SimulationDefaultJson>(data);
|
||||
if (wrapclass._event.Contains(eventGenerateProduct))
|
||||
{
|
||||
GameObject gb = Instantiate(productPrefab, productPos);
|
||||
gb.GetComponent<SimulationModelProduct>().SetParent(this.nodeID);
|
||||
listProducts.Add(gb);
|
||||
ProductSorting();
|
||||
}
|
||||
else if (wrapclass._event.Contains(eventGenerateDefect))
|
||||
{
|
||||
GameObject gb = Instantiate(defectPrefab, productPos);
|
||||
gb.GetComponent<SimulationModelProduct>().SetParent(this.nodeID);
|
||||
listProducts.Add(gb);
|
||||
ProductSorting();
|
||||
}
|
||||
@@ -116,7 +112,14 @@ public class SimulationModelSource : SimulationModel
|
||||
{
|
||||
SimulationModelStore storeModel = model.GetComponent<SimulationModelStore>();
|
||||
storeModel.maxCapacity = queueCapacity;
|
||||
storeModel.storeType = storeType;
|
||||
if (storeType == "fifo")
|
||||
{
|
||||
storeModel.storeType = StoreBehavior.FIFO;
|
||||
}
|
||||
else
|
||||
{
|
||||
storeModel.storeType = StoreBehavior.LIFO;
|
||||
}
|
||||
//storeModel.StoreProduct(product);
|
||||
Destroy(product);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user