Exemplo n.º 1
0
 private void INLINE_Constructor(Plane p)
 {
     deleted              = false;
     plane                = p; plane.AssignGrassland(this);
     nature               = p.myChunk.InitializeNature();
     categoriesCatalog    = new PlantCategory[MAX_CATEGORIES_COUNT];
     categoriesCatalog[0] = (PlantCategory)Random.Range(0, 3);
     categoriesCatalog[1] = (PlantCategory)Random.Range(0, 3);
     categoriesCatalog[2] = (PlantCategory)Random.Range(0, 3);
     plane.SetMeshRotation((byte)Random.Range(0, 4), false);
     Recalculation();
     nature.AddGrassland(this);
 }
Exemplo n.º 2
0
 public Grassland(Plane p, Nature n)
 {
     plane                = p;
     nature               = n;
     categoriesCatalog    = new PlantCategory[MAX_CATEGORIES_COUNT];
     categoriesCatalog[0] = (PlantCategory)Random.Range(0, 3);
     categoriesCatalog[1] = (PlantCategory)Random.Range(0, 3);
     categoriesCatalog[2] = (PlantCategory)Random.Range(0, 3);
     if (plane.FORCED_GetExtension().SetGrassland(this))
     {
         plane.SetMeshRotation((byte)Random.Range(0, 4), false);
         nature.AddGrassland(this);
         Recalculation();
     }
 }