Moving array of gameobjects.

using UnityEngine;
using System.Collections;

public class Script: MonoBehaviour 
{
	public GameObject [] GO = new GameObject [4];

	private bool isClicked;

	private int moveGO;
	
	void Update () 
	{
		for(int i=0 ; i<4; i++)
		{
			if(GO *!= null)*
  •  	{*
    
  •  		if(isClicked)*
    
  •  		{*
    

GO.transform.localPosition = new Vector3(GO.transform.localPosition.x + avatarPosition, GO_.transform.localPosition.y, GO*.transform.localPosition.z);*_

* isClicked = false;*
* }*

_ if(GO*.transform.localPosition.x > 8)
GO.transform.localPosition = new Vector3(-4, GO.transform.localPosition.y, GO.transform.localPosition.z);*_

_ if(GO*.transform.localPosition.x < -4)
GO.transform.localPosition = new Vector3(8, GO.transform.localPosition.y, GO.transform.localPosition.z);
}
}
}*_

* void OnGUI()*
* {*
* for(int i=0; i<4; i++)*
* {*
_ if(GO*.active == true)
{
//Next gameObject*

* if(GUI.Button(new Rect(600, 200, 50, 50), “>”))
{
isClicked = true;
moveGO= moveGO+ 4;
}*_

* //Previous gameObject*
* if(GUI.Button(new Rect(100, 200, 50, 50), “<”))*
* {*
* isClicked = true;*
* moveGO= moveGO- 4;*
* }*
}
*} *
There are 4 gameobjects and i have stored them in an array. On button click i want these objects to move by unit 4. Whenever i am pressing the buttons only 1 game object is moving because immediately i am making isclicked as false. I know this is easy but somehow i am not able to solve. Please help

within Update() change to the following:

  bool resetClick = false; // Add this
  for(int i=0 ; i<4; i++)
       {
         if(GO *!= null)*

{
if(isClicked)
{
GO.transform.localPosition = new Vector3(GO.transform.localPosition.x + avatarPosition, GO_.transform.localPosition.y, GO*.transform.localPosition.z);*_

resetClick = true; // Change this
}

if(GO*.transform.localPosition.x > 8)*
GO.transform.localPosition = new Vector3(-4, GO_.transform.localPosition.y, GO*.transform.localPosition.z);*_

if(GO*.transform.localPosition.x < -4)*
GO.transform.localPosition = new Vector3(8, GO_.transform.localPosition.y, GO*.transform.localPosition.z);
}
}*

if ( resetClick ) isClicked = false; // Add this_