public FinalCell(TissueCell parentCell) : base(parentCell) { initializeFinalCell(); //if (parentCell.GetType() == typeof(BlastCell)) //{ // this.generation = 1; // if (SimulationCore.DEBUG) // { // if (parentCell.CellBehaviors.GetType() == typeof(GOBehaviorAggregate)) // throw new NotImplementedException("have not implemented GO behaviors yet"); // } // //cellBehaviors = new SimpleBehaviorAggregate(SimulationCore.Instance.SimulationParams.FinalCellConfig); //} cellBehaviors = new SimpleBehaviorAggregate((SimpleBehaviorAggregate)parentCell.CellBehaviors); if (parentCell.GetType() == typeof(FinalCell)) this.generation = ((FinalCell)parentCell).generation + 1; //cellBehaviors = new SimpleBehaviorAggregate((SimpleBehaviorAggregate)parentCell.CellBehaviors); /* else if (parentCell.GetType() == typeof(FinalCell)) { this.generation = ((FinalCell)parentCell).generation + 1; cellBehaviors = new SimpleBehaviorAggregate((SimpleBehaviorAggregate)parentCell.CellBehaviors); } * */ }
public void DeleteCell(TissueCell deadCell) { dyingCells.Add(deadCell); if (deadCell.Mutated) MutatedCellTotal--; // for the cell count if (deadCell.GetType() == typeof(FinalCell)) Environment.Instance.FinalCellTotal--; else if (deadCell.GetType() == typeof(BlastCell)) Environment.Instance.BlastCellTotal--; else throw new Exception("unsupported cell type"); }
public void AddNewCell(TissueCell newCell) { newCells.Add(newCell); if (newCell.Mutated) MutatedCellTotal++; // for the cell count if (newCell.GetType() == typeof(FinalCell)) FinalCellTotal++; else if (newCell.GetType() == typeof(BlastCell)) BlastCellTotal++; else throw new Exception("unsupported cell type"); }