getcomponent find
public class PuyoAI : MonoBehaviour
{
public GameObject target1;
public Group2 Game_Script;
public static int sw1 = 0;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
// target1 = GameObject.Find("Spawner2");
target1 = GameObject.Find("GroupX2(Clone)");
Game_Script = target1.GetComponent
// if (aba == sptex2.tensuu)
/* if (Game_Script.yosi == 1)
{
sw1 = 0;
}*/
if(Game_Script.yosi==0&&sw1==0)
{
Debug.Log("u-su");
// Game_Script.testX();
StartCoroutine("otosu");
sw1 = 1;
}
}
private IEnumerator otosu()
{
Debug.Log("u-su2");
Game_Script.testX();
yield return new WaitForSeconds(1f);
sw1 = 0;
}