Ejemplo n.º 1
0
 //消灭灰色格子
 public void RemoveGreyCell(Cell cell)
 {
     virusCount--;
     audioManager.PlaySound(3);
     GreyCells.Remove(cell);
     Destroy(cell.gameObject);
 }
Ejemplo n.º 2
0
 //卸载所有关卡资源
 public void UnloadLevel()
 {
     GreenCount = 0;
     FirstStep  = true;
     GreyCells.Clear();
     Destroy(GridRoot.gameObject);
 }
Ejemplo n.º 3
0
    //放置灰色格子
    public void PlaceGreyCell(Vector2Int pos)
    {
        GameObject grid = Instantiate(VirusGreyPrefab);

        grid.transform.parent        = GridRoot.transform;
        grid.transform.localPosition = perUnitScale * (Vector2)pos;
        grid.transform.localScale   *= perUnitScale;
        grid.GetComponent <Cell> ().SetIndex(pos.x, pos.y);
        GreyCells.Add(grid.GetComponent <Cell> ());
        virusCount++;
    }