Exemple #1
0
    //多线路输送机(平行于高架库方向)
    #region Create_BeltConveyorGroup
    public void Create_BeltConveyorGroup(ParametersList1 PL, GameObject ConveyorGroup)
    {
        HighStoreShelf_Parameter HP  = PL.HP;
        MultiHighBay_Parameter   MHP = PL.MHP;
        //先创建一条输送线,再clone
        GameObject BeltConveyors = new GameObject(); BeltConveyors.name = "BeltConveyors";
        GameObject BeltConveyor  = new GameObject(); BeltConveyor.name = "BeltConveyor";

        RollerConveyor.Create_BeltConveyor(PL.RCP, BeltConveyor);
        BeltConveyor.transform.Rotate(0, 180, 0);
        for (int i = 0; i < (PL.MHP.Num + 1) / 2; i++)
        {
            GameObject clone1 = Instantiate(BeltConveyors); clone1.name = BeltConveyors.name + (i + 1).ToString();
            for (int j = 0; j < 3; j++)
            {
                GameObject clone = Instantiate(BeltConveyor);
                clone.name             = BeltConveyor.name + (i + 1) + "_" + (j + 1);
                clone.transform.parent = clone1.transform;
                float tempZ = PL.RCP.RCLength * j;
                clone.transform.localPosition = new Vector3(0, 0, -tempZ);
            }
            clone1.transform.parent = ConveyorGroup.transform;
            float TempValue1 = PL.RCP.RCWidth / 2 - ((2 * i + 1) * HP.Size.x + i * MHP.TunnelWidth + i * MHP.HookupDistance);
            clone1.transform.localPosition = new Vector3(TempValue1, 0, 0);
        }
        DestroyImmediate(BeltConveyor);
        DestroyImmediate(BeltConveyors);
    }
Exemple #2
0
    //创建出库的皮带输送机
    #region Create_ExitBeltConveyors
    public void Create_ExitBeltConveyors(ParametersList1 PL, GameObject BeltConveyors)
    {
        GameObject BeltConveyor = new GameObject();

        BeltConveyor.name = "ExitBeltConveyor";
        RollerConveyor.Create_BeltConveyor(PL.RCP, BeltConveyor);
        for (int i = 0; i < 2; i++)
        {
            GameObject clone = Instantiate(BeltConveyor);
            clone.name             = BeltConveyor.name + (i + 1);
            clone.transform.parent = BeltConveyors.transform;
            float tempZ = PL.RCP.RCLength * i;
            clone.transform.localPosition = new Vector3(0, 0, tempZ);
        }
        DestroyImmediate(BeltConveyor);
    }