1.Game Controller:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameController : MonoBehaviour
{
public GameObject pot1;
public GameObject pot2;
public int columnNum = 7;
public int rowNum = 7;
public GameObject cat;
ArrayList potArr;
public GameObject startScreen;
public GameObject vvvvvv;
public GameObject fa;
public GameObject re;
bool started = false;
bool gameOver = false;
ArrayList pot2Arr;
// Use this for initialization
void Start()
{
pot2Arr = new ArrayList();
potArr = new ArrayList();
for (int rowIndex = 0; rowIndex < rowNum; rowIndex++)
{
ArrayList tmp = new ArrayList();
for (int columnIndex = 0; columnIndex < columnNum; columnIndex++)
{
//GameObject o = Instantiate(pot1) as GameObject;
//o.transform.parent = this.transform;
//Item item = o.GetComponent<Item>();
item.rowIndex = rowIndex;
item.columnIndex = columnIndex;
//item.Goto(rowIndex, columnIndex);
//item.game = this;
Item item = CreatePot(pot1, rowIndex, columnIndex);
tmp.Add(item);
}
potArr.Add(tmp);
}
//Catmove(4, 4);
}
// Update is called once per frame
public void StartGame()
{
started &#