private void Awake() { if (m_instance != null && m_instance != this) { Destroy(this.gameObject); } m_instance = this; gnds = GameObject.FindGameObjectsWithTag("Ground"); grid = new GndController[length, width]; foreach (GameObject gnd in gnds) { GndController gndController = gnd.GetComponent <GndController>(); int x = gndController.GetCoordinate().Item1; int y = gndController.GetCoordinate().Item2; grid[x, y] = gndController; } }
private void Start() { gndManager = GndManager.GetGndManager(); }
private void Start() { rend = GetComponent <Renderer>(); startColor = rend.material.color; gndManager = GndManager.GetGndManager(); }