Esempio n. 1
0
 public Cell(Cell cell)
 {
     this.spawn_count = cell.spawn_count;
     this.adjacent_limit = cell.adjacent_limit;
     this.amount = cell.amount;
     this.starting_count = cell.starting_count;
     this.offset = cell.offset;
     this.alive = cell.alive;
 }
Esempio n. 2
0
 public bool Equals(Cell obj)
 {
     if(this.id.Equals(obj.id)&&this.go==obj.go)
         return true;
     return false;
 }
 protected virtual void Init()
 {
     int j = 0;
     for(int i=0;i<celltype.Length;i++)
         while(celltype[j].starting_count!=0){
             int rx = Random.Range(0,size.x);
             int ry = Random.Range(0,size.y);
             j++;
             board[rx,ry] = new Cell(celltype[i]);
             celltype[i].starting_count--;
         }
 }