public void Click(DFD_Grid m_oClicked) { m_lSelection.Add(m_oClicked); m_lCheck.Add(m_oClicked); if (m_lSelection.Count > m_nLength) { m_lSelection[0].StartCoroutine(m_lSelection[0].Flip(-m_fFlipDuration)); m_lCheck.Remove(m_lSelection[0]); m_lSelection.RemoveAt(0); } }
public void Click(DFD_Grid m_oClicked) { m_lSelection.Add ( m_oClicked ); m_lCheck.Add( m_oClicked ); if ( m_lSelection.Count > m_nLength ) { m_lSelection[0].StartCoroutine( m_lSelection[0].Flip(-m_fFlipDuration) ); m_lCheck.Remove( m_lSelection[0] ); m_lSelection.RemoveAt(0); } }
public void GenerateGrid(int _nLength, int _nHeight, float _fLengthDelta, float _fHeightDelta) { m_oGrid = new DFD_Grid[_nLength, _nHeight]; if (m_goGrid.activeSelf) { for (int x = 0; x < _nLength; ++x) { for (int y = 0; y < _nHeight; ++y) { GameObject goTemp = GameObject.Instantiate(m_goGrid) as GameObject; goTemp.transform.parent = this.transform; goTemp.transform.position = m_goGrid.transform.position; goTemp.transform.position += new Vector3(x * _fLengthDelta, y * _fHeightDelta, 0); m_oGrid[x, y] = goTemp.GetComponent <DFD_Grid>(); } } RandomizeGrid(); m_goGrid.SetActive(false); } }