Inheritance: MonoBehaviour
Ejemplo n.º 1
0
    public void Init(string name, ConveyorBelt conveyerBelt, Transform parent, Vector3 position, Quaternion rotation)
    {
        _conveyerBelt = conveyerBelt;

        gameObject.name = name;
        transform.SetParent(parent);
        BoxCollider collider;

        if (!gameObject.TryGetComponent <BoxCollider>(out collider))
        {
            collider = gameObject.AddComponent <BoxCollider>();
        }

        var visualizer = GameObject.CreatePrimitive(PrimitiveType.Cube);

        Destroy(visualizer.GetComponent <BoxCollider>());
        visualizer.transform.SetParent(transform);
        visualizer.transform.localPosition = new Vector3(0, 0, 0);
        visualizer.transform.localScale    = new Vector3(1, 1, 1);

        gameObject.transform.position = position;
        gameObject.transform.Rotate(rotation.eulerAngles);
        gameObject.transform.localScale = InitScale;


        _initCalled = true;
    }
Ejemplo n.º 2
0
    // Override bc we will modify an already existing function in Unity. OnInspectorGUI is the
    // function that shows all the values in the inspector as we see them
    public override void OnInspectorGUI()
    {
        // We call this line to execute the original function (or not if we remove this line),
        // aditional code can be added before or after this
        base.OnInspectorGUI();

        // target is the object being inspected, in my case, the ConveyorBelt script bc this is the
        // script we are modifying in the editor as we said above. target is by default an Object
        // so we have to cast the value
        ConveyorBelt belt = (ConveyorBelt)target;

//		GUILayout.Label (" "); // Just to put a blank line in the editor

        // Everything between this line and GUILayout.EndHorizontal () will be displayed horizontally
        GUILayout.BeginHorizontal();

        // Generates the belt
        if (GUILayout.Button("Generate Belt"))
        {
//				Debug.Log ("We pressed generate belt! :D");
            belt.GenerateBelt();
        }

        // Resets the belt to leave room for another one
        if (GUILayout.Button("Reset Belt"))
        {
            belt.ResetBelt();
        }

        GUILayout.EndHorizontal();
    }
Ejemplo n.º 3
0
    // Start is called before the firsIt frame update
    void Start()
    {
        Spawn();
        Spawn();
        Spawn();
        Spawn();
        Spawn();
        conveyorBelts[conveyors.Count - 1].setDirection(ConveyorBelt.DIRECTION.SOUTH);
        conveyors.Add(Instantiate(conveyor, transform.position, transform.rotation));
        conveyorBelts.Add(conveyors[conveyors.Count - 1].GetComponent <ConveyorBelt>());
        conveyors[conveyors.Count - 1].transform.position += new Vector3(conveyors.Count + 1, -1);
        conveyorBelts[conveyors.Count - 1].setDirection(ConveyorBelt.DIRECTION.SOUTH);
        conveyorBelts[conveyors.Count - 2].setNextConveyor(conveyorBelts[conveyors.Count - 1]);

        MachineOven oven = Instantiate(ovenItem, transform.position, transform.rotation).GetComponent <MachineOven>();

        conveyorBelts[conveyors.Count - 1].setNextConveyor(oven);
        ConveyorBelt lastBelt = Instantiate(conveyor, transform.position, transform.rotation).GetComponent <ConveyorBelt>();


        oven.transform.position += new Vector3(conveyors.Count + 1, -2);
        oven.setDirection(MachineOven.DIRECTION.SOUTH);
        lastBelt.transform.position += new Vector3(conveyors.Count + 1, -3);
        oven.setNextConveyor(lastBelt);

        Hopper ohopper = Instantiate(hopper, transform.position, transform.rotation).GetComponent <Hopper>();

        ohopper.transform.position += new Vector3(2, 0);
        ohopper.setNextConveyor(conveyorBelts[0]);

        for (int i = 0; i < 10; i++)
        {
            ohopper.addConveyedItem(Instantiate(conveyedItem, transform.position + new Vector3(2, 0), transform.rotation).GetComponent <GenericFood>());
        }
    }
Ejemplo n.º 4
0
    public bool WillInteract(PositionalHandApply interaction, NetworkSide side)
    {
        // Use default interaction checks
        if (!DefaultWillInteract.Default(interaction, side))
        {
            return(false);
        }
        if (!Validations.IsTarget(gameObject, interaction))
        {
            APCPoweredDevice PoweredDevice = interaction.TargetObject.GetComponent <APCPoweredDevice>();
            if (PoweredDevice != null)
            {
                return(true);
            }
            APC _APC = interaction.TargetObject.GetComponent <APC>();
            if (_APC != null)
            {
                return(true);
            }

            //conveyorbelt
            ConveyorBelt conveyorBelt = interaction.TargetObject.GetComponent <ConveyorBelt>();
            if (conveyorBelt != null)
            {
                return(true);
            }
            ConveyorBeltSwitch conveyorBeltSwitch = interaction.TargetObject.GetComponent <ConveyorBeltSwitch>();
            if (conveyorBeltSwitch != null)
            {
                return(true);
            }
            return(true);
        }
        return(false);
    }
Ejemplo n.º 5
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.tag == "MovingPlatforms")
        {
            if (collision.GetComponent <ConveyorBelt>() != null)
            {
                m_conveyorBelt = collision.GetComponent <ConveyorBelt>();

                // If the player is not trying to move and the conveyor belt is off
                if (Mathf.Approximately(m_inputListener.m_horizontalMoveInput, 0.0f) && !m_conveyorBelt.ConveyorBeltActive)
                {
                    StopPlayerMovement();
                }
            }
        }

        if (collision.tag == "Crusher")
        {
            if (collision.gameObject.GetComponent <Animator>() != null)
            {
                if (collision.gameObject.GetComponent <Animator>().GetCurrentAnimatorStateInfo(0).IsName("CrushingPiston_Extended"))
                {
                    m_isCrushed = true;
                    m_playerAnim.SetBool("IsCrushed", true);
                    StartCoroutine("IsCrushedTimer");
                    ParticlePoof(m_gotCrushedPoof);
                }
            }
        }
    }
Ejemplo n.º 6
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();

        ConveyorBelt[] cbs = new ConveyorBelt[targets.Length];
        for (int i = 0; i < cbs.Length; i++)
        {
            cbs[i] = targets[i] as ConveyorBelt;
        }

        if (GUILayout.Button("Generate"))
        {
            foreach (ConveyorBelt cb in cbs)
            {
                cb.Setup();
            }
        }

        if (GUILayout.Button("Clear"))
        {
            foreach (ConveyorBelt cb in cbs)
            {
                cb.ClearHierarchy();
            }
        }
    }
Ejemplo n.º 7
0
 public Part(ConveyorBelt belt, Rigidbody body, float lowBound, float upBound)
 {
     this.belt     = belt;
     this.body     = body;
     this.lowBound = lowBound;
     this.upBound  = upBound;
     transform     = body.GetComponent <Transform>();
 }
Ejemplo n.º 8
0
    private void OnCollisionExit(Collision collision)
    {
        ConveyorBelt conveyorBelt = collision.gameObject.GetComponent <ConveyorBelt>();

        if (conveyorBelt != null)
        {
            m_ConveyorBeltList.Remove(conveyorBelt);
        }
    }
Ejemplo n.º 9
0
    private string CheckFloor()
    {
        RaycastHit hit;

        // float distance = 1.1f;

        Vector3 ray = transform.Find("Collider").position + new Vector3(horizontalDirection * .35f, verticalDirection * .35f, transform.position.z);

        if (Physics.Raycast(ray, Vector3.forward, out hit))
        {
            //Trying to catch errors with objects that have no parent parents
            // if(hit.transform.parent == null){
            // return;
            // }
            // Debug.Log(hit.transform.tag);
            if (hit.transform.parent != null && hit.transform.parent.parent != null && hit.transform.parent.parent.tag == "MovingPlatform")
            {
                transform.parent = hit.transform.parent;
            }
            else if (hit.transform.tag == "MovingPlatform")
            {
                transform.parent = hit.transform;
                return(hit.transform.tag);
            }
            else
            {
                transform.parent = null;
            }

            if (hit.transform.gameObject.name == "Conveyor Belt" || hit.transform.gameObject.name == "Box" || hit.transform.gameObject.name == "FloorSwitch" || hit.transform.gameObject.name == "InvisibleFloorSwitch" || hit.transform.tag == "NPC" || hit.transform.gameObject.name == "Teleporter")
            {
                // Debug.Log("Raycast Starts Here: " + ray + ". And it hits here: " + hit.point);
                // How do we make the conveyor belt move the player
                if (hit.transform.gameObject.name == "Conveyor Belt")
                {
                    ConveyorBelt belt = hit.transform.gameObject.GetComponent <ConveyorBelt>();
                    OnConveyorBelt(belt.isHorizontal, belt.isReverse);
                }
                return(hit.transform.tag);
            }
            else
            {
                // Debug.Log("Raycast Starts Here: " + ray + ". And it hits here: " + hit.point);
                if (hit.transform.parent == null)
                {
                    return(hit.transform.tag);
                }
                else
                {
                    return(hit.transform.parent.tag);
                }
            }
        }

        return("");
    }
Ejemplo n.º 10
0
 private void OnTriggerExit2D(Collider2D collision)
 {
     if (collision.gameObject.tag == "MovingPlatforms")
     {
         if (m_conveyorBelt != null)
         {
             m_conveyorBelt = null;
         }
     }
 }
Ejemplo n.º 11
0
    private void SetGround(Collider2D ground)
    {
        currentGround = ground;

        if (ground != null)
        {
            // do not fail if no special component is found, anything is possible
            currentConveyorBelt     = currentGround.GetComponent <ConveyorBelt>();
            currentMovingGroundBody = currentGround.GetComponent <Rigidbody2D>();
        }
    }
Ejemplo n.º 12
0
 /// <summary>
 /// Triggers the actions when the battery is no longer on the belt
 /// </summary>
 /// <param name="other"></param>
 void OnTriggerExit(Collider other)
 {
     if (OnConveyorBelt != null && other.CompareTag("ConveyorBelt"))
     {
         ConveyorBelt conveyor = other.gameObject.GetComponentInParent <ConveyorBelt>();
         OnConveyorBeltExit(other.transform.forward, conveyor.MoveSpeed);
     }
     else if (other.CompareTag("PlayerBatterySlot"))
     {
         m_playerBatteryInRange = null;
     }
 }
Ejemplo n.º 13
0
    public bool Register(ConveyorBelt belt)
    {
        // Check for existing belt
        if (belts.ContainsKey(belt.GridPosition))
        {
            return(false);
        }

        belts[belt.GridPosition] = belt;

        return(true);
    }
Ejemplo n.º 14
0
 public void MoveOnPulse(ConveyorBelt nextConveyorBelt)
 {
     if (!curConveyorBelt.isFinalConveyorBelt)
     {
         positionToMoveTo = curConveyorBelt.GetNextConveyorBeltPosition(relativeToConveyorBelt, this);
         SetRotation();
     }
     else
     {
         GetToEndOfPath();
     }
 }
    public void Initialize(ConveyorBelt conveyorBelt, ConveyorBeltPart previous, float size)
    {
        ParentConveyorBelt = conveyorBelt;
        if (previous != null)
        {
            Previous      = previous;
            previous.Next = this;
        }
        this.size = size;
#if UNITY_EDITOR
        OnValidate();
#endif
    }
Ejemplo n.º 16
0
    private void OnTriggerEnter2D(Collider2D col)
    {
        if (col.transform.tag == "Belt")
        {
            transform.parent = col.transform.parent;
            ConveyorBelt belt = col.transform.parent.GetComponent <ConveyorBelt>();

            if (belt.beltType == ObstacleType.Vertical)
            {
                isOnVerticalBelt = true;
                rb.gravityScale  = 0;
            }
        }
    }
Ejemplo n.º 17
0
    /// <summary>
    /// Used to draw conveyor belt to console
    /// </summary>
    public static void ConveyorBelt(int y, ConveyorBelt <Luggage> conveyorBelt)
    {
        for (int i = 0; i < conveyorBelt.Length; i++)
        {
            Luggage luggage = conveyorBelt.Buffer[i];

            if (luggage != null)
            {
                ConsoleEx.WriteCharacter(i, y, 'G', Color.Get((byte)(luggage.TerminalId + 1), (byte)(luggage.CounterId + 1)));
            }
        }

        ConsoleEx.SetPosition(conveyorBelt.Length + 3, y);
        ConsoleEx.WriteLine("- Sorting system's conveyor belt");
    }
Ejemplo n.º 18
0
    public void ServerPerformInteraction(PositionalHandApply interaction)
    {
        if (!Validations.IsTarget(gameObject, interaction))
        {
            APCPoweredDevice PoweredDevice = interaction.TargetObject.GetComponent <APCPoweredDevice>();
            if (PoweredDevice != null)
            {
                if (APCBuffer != null)
                {
                    Chat.AddExamineMsgFromServer(interaction.Performer, "You set the power device to use the APC in the buffer");
                    PoweredDevice.SetAPC(APCBuffer);
                }
                else
                {
                    Chat.AddExamineMsgFromServer(interaction.Performer, "Your buffer is empty fill it with something");
                }
            }
            APC _APC = interaction.TargetObject.GetComponent <APC>();
            if (_APC != null)
            {
                Chat.AddExamineMsgFromServer(interaction.Performer, "You set the internal buffer of the multitool to the APC");
                APCBuffer = _APC;
            }

            //conveyorbelt
            ConveyorBelt conveyorBelt = interaction.TargetObject.GetComponent <ConveyorBelt>();
            if (conveyorBelt != null)
            {
                Chat.AddExamineMsgFromServer(interaction.Performer, "You set the internal buffer of the multitool to the Conveyor Belt");
                ConveyorBeltBuffer.Add(conveyorBelt);
            }
            ConveyorBeltSwitch conveyorBeltSwitch = interaction.TargetObject.GetComponent <ConveyorBeltSwitch>();
            if (conveyorBeltSwitch != null)
            {
                if (ConveyorBeltBuffer != null)
                {
                    Chat.AddExamineMsgFromServer(interaction.Performer, "You set the Conveyor Belt Switch to use the Conveyor Belt in the buffer");
                    conveyorBeltSwitch.AddConveyorBelt(ConveyorBeltBuffer);
                }
                else
                {
                    Chat.AddExamineMsgFromServer(interaction.Performer, "Your Conveyor Belt buffer is empty fill it with something");
                }
            }

            PrintElectricalThings(interaction);
        }
    }
Ejemplo n.º 19
0
    private void OnTriggerStay2D(Collider2D collision)
    {
        if (collision.gameObject.tag == "MovingPlatforms")
        {
            if (collision.GetComponent <ConveyorBelt>() != null)
            {
                m_conveyorBelt = collision.GetComponent <ConveyorBelt>();

                // If the player is not trying to move and the conveyor belt is off
                if (Mathf.Approximately(m_inputListener.m_horizontalMoveInput, 0.0f) && !m_conveyorBelt.ConveyorBeltActive)
                {
                    StopPlayerMovement();
                }
            }
        }
    }
Ejemplo n.º 20
0
        protected bool PlaceBlockInGrid(Block block)
        {
            for (int i = 0; i < grid[factoryList.Count].Count; i++)
            {
                if (!grid[factoryList.Count][i].enabled)
                {
                    grid[factoryList.Count][i] = block;

                    //Add a copy of the block to the conveyor belt
                    Block b = new Block(true);
                    b.blockColor = block.blockColor;
                    ConveyorBelt.AddBlock(b);
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 21
0
        protected bool PlaceBlockInRow(List <Block> row)
        {
            Block block = new Block(true);

            block.SetColor(BlockColors.FactoryColors[blockTier]);

            //Add a copy of the block to the conveyor belt
            Block b = new Block(true);

            b.blockColor = block.blockColor;
            ConveyorBelt.AddBlock(b);

            for (int i = 0; i < row.Count; i++)
            {
                if (!row[i].enabled)
                {
                    row[i] = block;
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 22
0
    public void Toggle()
    {
        GameObject.FindGameObjectWithTag("AudioManager").GetComponent <AudioManager>().Play("Switch");

        isOn = !isOn;

        index           = index == 0 ? 1 : 0;
        renderer.sprite = sprites[color * 2 + index];

        foreach (GameObject Device in Devices)
        {
            if (Device.CompareTag("MovingPlat"))
            {
                MovingPlatform Plat = Device.GetComponent <MovingPlatform>();
                Plat.setMoving(!Plat.getMoving());
                if (!Plat.getStarted())
                {
                    Plat.setStarted(true);
                    StartCoroutine(Plat.Move());
                }
            }
            else if (Device.CompareTag("ConveyorBelt"))
            {
                ConveyorBelt Conv = Device.GetComponent <ConveyorBelt>();
                if (Conv.getStoppable())
                {
                    Conv.changeStop();
                }
                else
                {
                    Conv.changeDirection();
                    Debug.Log("Direction Changed");
                }
            }
        }
    }
Ejemplo n.º 23
0
    // Start is called before the first frame update
    void Start()
    {
        audioSource = gameObject.GetComponent <AudioSource>();
        audioSource.Play();

        // Game states
        currentState = GameState.Title;
        lives        = 5;
        score        = 0;

        // Get managers
        uiManager    = gameObject.GetComponent <UIManager>();
        audioManager = gameObject.GetComponent <AudioManager>();
        conveyorBelt = gameObject.GetComponent <ConveyorBelt>();

        // Perform setups on managers
        conveyorBelt.Setup();
        UpdateUI();

        // Get machines
        stapleMachine = FindObjectOfType <StapleMachine>();
        waterTool     = FindObjectOfType <WaterTool>();
        paintTool     = FindObjectOfType <Painttool>();
    }
Ejemplo n.º 24
0
    // TODO : Wrapper ça dans container de contrat de grosseur différente
    public void CreateNewSingleContract()
    {
        List <Client>   allClients      = new List <Client>();
        int             contractSize    = 1;
        MovableContract movableContract = null;

        // Contract object
        if (contractSize == 1)
        {
            movableContract = Instantiate(singleContractPrefab).GetComponent <MovableContract>();
        }

        //else if (contractSize == 2)
        //    movableContract = Instantiate(doubleContractPrefab).GetComponent<MovableContract>();

        Vector2 spawnPos = Vector2.zero;
        Vector2 endPos   = Vector2.zero;

        if (_belt == null)
        {
            _belt = FindObjectOfType <ConveyorBelt>();
        }

        if (_belt != null)
        {
            spawnPos    = _belt.contractsStartPos.position;
            spawnPos.x  = _belt.Bounds.center.x;
            spawnPos.x -= movableContract.ObjSpriteRenderer.bounds.extents.x;

            endPos.x  = spawnPos.x;
            endPos.y  = _belt.contractsEndPos.position.y;
            endPos.y += movableContract.ObjSpriteRenderer.bounds.size.y;
            endPos.y += 2 * (1 / 32f); // 2px offset

            movableContract.SetSortingLayer(_belt.SpriteRenderer.sortingLayerID);
            movableContract.SetOrderInLayer(_belt.SpriteRenderer.sortingOrder + 1);
        }

        movableContract.transform.position = spawnPos;
        movableContract.InitializeContract(endPos);
        movableContract.ClientAmount = contractSize;

        // Client settings
        // Start planet
        List <GridTile_Planet> allCandidatePlanets = new List <GridTile_Planet>(PlanetManager.instance.AllPlanetTiles);
        GridTile_Planet        startPlanet         = GetStartPlanet(allCandidatePlanets);

        if (startPlanet == null)
        {
            Debug.LogWarning("Could not find target start planet. Check start settings.");
            int randomIndex = UnityEngine.Random.Range(0, allCandidatePlanets.Count);
            startPlanet = allCandidatePlanets[randomIndex];
        }

        for (int i = 0; i < contractSize; i++)
        {
            int travelDistanceRating = _clientRules[_currentRuleIndex].travelDistanceRating;

            if (_clientRules[_currentRuleIndex].specialEndCondition == SpecialConditions.ClosestPlanet)
            {
                travelDistanceRating = 1;
            }

            if (travelDistanceRating == 0)
            {
                int randomDistance = UnityEngine.Random.Range(1, 4);
                travelDistanceRating = randomDistance;
            }

            // End planet
            //List<GridTile_Planet> distanceCandidates = GetPlanetsByDistance(allCandidatePlanets, candidateEndPlanets, startPlanet);
            GridTile_Planet endPlanet = GetEndPlanet(allCandidatePlanets, startPlanet, travelDistanceRating);

            allClients.Add(CreateClient(startPlanet, endPlanet, travelDistanceRating));
            allCandidatePlanets.Remove(endPlanet);
            int ruleCount = _clientRules.Count;

            if (_currentRuleIndex == _clientRules.Count - 1)
            {
                _allRulesApplied = true;
            }

            if (!_allRulesApplied)
            {
                _currentRuleIndex++;
            }
            else
            {
                _currentRuleIndex = UnityEngine.Random.Range(0, ruleCount);
            }

            startPlanet.AddContractHeat(1);
        }

        if (contractSize == 1)
        {
            Contract_Single contract = movableContract.GetComponent <Contract_Single>();
            contract.AssignClients(allClients, _completionTime, _timedContracts);
            contract.CalculatePointsReward(pointSettings);

            _allContracts.Add(contract);
        }
        //else if (contractSize == 2)
        //{
        //    Contract_Double contract = movableContract.GetComponent<Contract_Double>();
        //    contract.AssignClients(allClients);
        //    contract.CalculatePointsReward(pointSettings);
        //    _allContracts.Add(contract);
        //}

        _spawnCount++;

        if (newContractReceived != null)
        {
            newContractReceived();
        }
    }
Ejemplo n.º 25
0
 void Start()
 {
     instance = this;
     //SpawnItem();
 }
Ejemplo n.º 26
0
    public void BuildTower(TowerType towerType)
    {
        //DEBUG TESTING
        if (!hasTower)
        {
            if (towerType == TowerType.Crusher)
            {
                if (!(oppositePlatform != null && !oppositePlatform.hasTower))
                {
                    return;
                }
            }

            if (GameManager.gm.curScrap >= ScrapValues.GetTowerBuildPrice(towerType))
            {
                GameObject towerPrefab = GameManager.gm.towerPrefabs[(int)towerType];

                GameObject tower = Instantiate(towerPrefab, transform.position, Quaternion.identity);
                tower.transform.eulerAngles = new Vector3(0, GetYRotation(), 0);

                Tower t = tower.GetComponent <Tower>();
                t.setLookTargets(tower.transform.position + tower.transform.forward);

                ConveyorBelt curConveyor = firstConveyorInRange;
                GameManager.gm.towers.Add(t);
                t.towerPlatform = this;
                int thing = 3;
                if (innerCorner)
                {
                    thing = 2;
                }
                for (int index = t.range; index < thing; ++index)
                {
                    if (!curConveyor.isFinalConveyorBelt)
                    {
                        curConveyor = curConveyor.nextConveyorBelt;
                    }
                }

                curConveyor.OnEnemyEnter.AddListener(t.AddEnemyToRange);

                int num = 0;

                if (innerCorner && t.range > 1)
                {
                    num = -1;
                }
                else
                {
                    num = 1;
                }

                for (int index = num; index < t.range + t.range - 1; ++index)
                {
                    if (!curConveyor.isFinalConveyorBelt)
                    {
                        curConveyor = curConveyor.nextConveyorBelt;
                    }
                }

                curConveyor.OnEnemyLeave.AddListener(t.RemoveEnemyFromRange);


                //this is more for adding new towers, not good for our towers
                //if (innerCorner && t.range <= 1 )
                //{
                //    curConveyor = curConveyor.nextConveyorBelt.nextConveyorBelt;

                //    curConveyor.OnEnemyEnter.AddListener(t.AddEnemyToRange);
                //    curConveyor.OnEnemyLeave.AddListener(t.RemoveEnemyFromRange);
                //}



                hasTower = true;

                GameManager.gm.RemoveScrap(ScrapValues.GetTowerBuildPrice(towerType));
            }
        }
    }
Ejemplo n.º 27
0
 // Start is called before the first frame update
 void Start()
 {
     m_inanimateRigidbody = GetComponent <Rigidbody2D>();
     m_inanimateRigidbody.freezeRotation = true;
     m_assignedConveyor = GameObject.FindObjectOfType <ConveyorBelt>().GetComponent <ConveyorBelt>();
 }
Ejemplo n.º 28
0
 private void Start()
 {
     _belt = FindObjectOfType <ConveyorBelt>();
 }
Ejemplo n.º 29
0
 public RadialPart(ConveyorBelt belt, Rigidbody body, float lowBound, float upBound)
     : base(belt, body, lowBound, upBound)
 {
 }