// Update is called once per frame void Update() { if (bomb.Position < leftSide) { bomb.explode(); mainScript.damage(true); beltObject.GetComponent <Renderer>().material = neutralArrows; } else if (bomb.Position > rightSide) { bomb.explode(); mainScript.damage(false); beltObject.GetComponent <Renderer>().material = neutralArrows; } beltObject.GetComponent <Renderer>().material.mainTextureOffset += new Vector2(bomb.Direction * bomb.CurrentSpeed * 0.00575f, 0); if (bomb.Direction == -1) { redButton.glowToggle(false); } else { redButton.glowToggle(true); } if (bomb.Direction == 1) { blueButton.glowToggle(false); } else { blueButton.glowToggle(true); } }