build update
This commit is contained in:
@@ -33,10 +33,20 @@ namespace Simulator.Data {
|
||||
entitys.Add(entity[0].gameObject);
|
||||
}
|
||||
|
||||
public void SetASRSQueue(DataObject modelData)
|
||||
{
|
||||
var datas = modelData.GetDataObject("data");
|
||||
var entityid = datas.GetString("entity_id");
|
||||
var entity = EntityManager.Instance.GetEntity(entityid, this);
|
||||
entity.transform.SetParent(cellComponents[(-1, 0, 0)].Socket.transform);
|
||||
entity.transform.localPosition = new Vector3(0, -0.25f, -0.25f);
|
||||
entitys.Add(entity.gameObject);
|
||||
}
|
||||
|
||||
public void SpawnCell(rack_layout layout,bool asrs)
|
||||
{
|
||||
Vector3 center = new Vector3(layout.x * layout.x_length / 2f, 0f, layout.z * layout.z_length / 2f);
|
||||
transform.position = center;
|
||||
//Vector3 center = new Vector3(layout.x * layout.x_length / 2f, 0f, layout.z * layout.z_length / 2f);
|
||||
//transform.position = center;
|
||||
|
||||
for (int z = 0; z < layout.z; z++)
|
||||
{
|
||||
@@ -46,10 +56,10 @@ namespace Simulator.Data {
|
||||
{
|
||||
var cell = Instantiate(cellPrefab);
|
||||
//cell.transform.localScale=new Vector3(layout.x_length, layout.y_length, layout.z_length);
|
||||
cell.transform.localScale=new Vector3(layout.x_length/0.55f, layout.y_length / 0.55f, layout.z_length / 0.55f);
|
||||
cell.transform.localScale=new Vector3(layout.x_length/0.63f, layout.y_length / 0.63f, layout.z_length / 0.59f);
|
||||
//cell.transform.position = new Vector3(layout.x_length * x*0.55f, layout.y_length * y * 0.59f, layout.z_length * z * 0.75f);
|
||||
//cell.transform.position = new Vector3(layout.x_length * x, layout.y_length * y*0.55f/0.59f, layout.z_length*z* 0.55f / 0.75f);
|
||||
cell.transform.position = new Vector3(layout.x_length * x, layout.y_length * y, layout.z_length*z);
|
||||
cell.transform.position = new Vector3(layout.x_length * x, layout.y_length * y+0.8f, layout.z_length*z);
|
||||
cell.transform.parent = this.transform;
|
||||
cellComponents.Add((x, y, z), cell.GetComponent<CellComponent>());
|
||||
cellComponents[(x, y, z)].x = x;
|
||||
@@ -62,15 +72,15 @@ namespace Simulator.Data {
|
||||
{
|
||||
var pickcell = Instantiate(cellPrefab);
|
||||
//pickcell.transform.localScale = new Vector3(layout.x_length, layout.y_length, layout.z_length);
|
||||
pickcell.transform.localScale = new Vector3(layout.x_length / 0.55f, layout.y_length / 0.55f, layout.z_length / 0.55f);
|
||||
pickcell.transform.localScale = new Vector3(layout.x_length / 0.63f, layout.y_length / 0.63f, layout.z_length / 0.59f);
|
||||
//pickcell.transform.position = new Vector3(layout.x_length * -0.55f, layout.y_length * 0, layout.z_length * 0);
|
||||
pickcell.transform.position = new Vector3(layout.x_length*-1f, layout.y_length * 0, layout.z_length * 0);
|
||||
pickcell.transform.position = new Vector3(layout.x_length*-1f, layout.y_length * 0 + 0.8f, layout.z_length * 0);
|
||||
pickcell.transform.parent = this.transform;
|
||||
cellComponents.Add((-1, 0, 0), pickcell.GetComponent<CellComponent>());
|
||||
var dropcell = Instantiate(cellPrefab);
|
||||
//dropcell.transform.localScale = new Vector3(layout.x_length, layout.y_length, layout.z_length);
|
||||
dropcell.transform.localScale = new Vector3(layout.x_length / 0.55f, layout.y_length / 0.55f, layout.z_length / 0.55f);
|
||||
dropcell.transform.position = new Vector3(layout.x_length * (layout.x), layout.y_length * 0, layout.z_length * 0);
|
||||
dropcell.transform.localScale = new Vector3(layout.x_length / 0.63f, layout.y_length / 0.63f, layout.z_length / 0.59f);
|
||||
dropcell.transform.position = new Vector3(layout.x_length * (layout.x), layout.y_length * 0+0.8f, layout.z_length * 0);
|
||||
dropcell.transform.parent = this.transform;
|
||||
cellComponents.Add(((int)(layout.x), 0, 0), dropcell.GetComponent<CellComponent>());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user