/* * FieldController.cs * Authors: * Copyright (c) 2007-2008 Cornell University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ namespace StarJack { public class FieldController:GameObject { public bool[,,] mFieldList; public static int MAX_LAYERS = 3; public enum FieldType { Static=0, Sludge=1, Gas=2 } public GameObject[] mFields; public FieldController(string name) : base(name, false) { mFieldList = new bool[Room.TILECOUNT, Room.TILECOUNT, MAX_LAYERS]; mFields = new GameObject[MAX_LAYERS]; GameObject temp; FieldType type; for (int a = 0; a < MAX_LAYERS; a++) { type = (FieldType)a; temp = new GameObject(type.ToString(), true); } } public void Add(FieldType type, int[] pos) { mFieldList[pos[0], pos[1], (int)type] = true; } } }