: base(Contracts.CheckRef(env, nameof(env)).Register(nameof(CopyColumnsEstimator)), new CopyColumnsTransform(env, columns)) {
"bottomleft" => cellSetOp(env, c => c.GroupBy(c => c.Y).MaxElement(g => g.Key).MinElement(c => c.X).Index), "bottomright" => cellSetOp(env, c => c.GroupBy(c => c.Y).MaxElement(g => g.Key).MaxElement(c => c.X).Index),
: base(Contracts.CheckRef(env, nameof(env)).Register(nameof(KeyToValueMappingEstimator)), new KeyToValueMappingTransformer(env, columns)) {
: base(Contracts.CheckRef(env, nameof(env)).Register(nameof(MissingValueIndicatorTransformer)), new MissingValueIndicatorTransformer(env, columns)) {
public env(env old) { _var = old._var; value = old.value; }
_ => base.InterpretMemberAccess(memberName, operand, env, grid)
void add_env_cross(env current_env) { bool already_G = false, already_H = false, already_D = false, already_B = false; foreach (env env_created in envs) // vérifier si les cases à ajouter autour de la case appelante n'existe pas déjà { if (env_created.coord.x == current_env.coord.x - 10 && env_created.coord.z == current_env.coord.z) // check if env déjà présent à gauche { already_G = true; } if (env_created.coord.x == current_env.coord.x + 10 && env_created.coord.z == current_env.coord.z) // check if env déjà présent à droite { already_D = true; } if (env_created.coord.x == current_env.coord.x && env_created.coord.z == current_env.coord.z - 10) // check if env déjà présent en bas { already_B = true; } if (env_created.coord.x == current_env.coord.x && env_created.coord.z == current_env.coord.z + 10) // check if env déjà présent en haut { already_H = true; } } // -------------------------------------- création de l'env à gauche de la case appelante ---------------------------------------// if (current_env.G && !already_G) // si une ouverture à gauche { string str_prox_G = "", str_prox_H = "", str_prox_D = "", str_prox_B = ""; string char_restrict_1 = "", char_restrict_2 = "", char_restrict_3 = "", char_delete_1 = "FFFFFF", char_delete_2 = "FFFFFF", char_delete_3 = "FFFFFF"; env new_env = new env(); new_env.coord = current_env.coord; new_env.coord.x -= 10; // set proxi bools new_env.prox_G = false; new_env.prox_H = false; new_env.prox_D = true; new_env.prox_B = false; foreach (env env_created in envs) // on vérifie les cases en croix autour de la case que l'on va rajouter à gauche { if (env_created.coord.x == new_env.coord.x - 10 && env_created.coord.z == new_env.coord.z) // check if env déjà présent à gauche { str_prox_G = env_created.plane.name; new_env.prox_G = true; } if (env_created.coord.x == new_env.coord.x + 10 && env_created.coord.z == new_env.coord.z) // check if env déjà présent à droite { str_prox_D = env_created.plane.name; new_env.prox_D = true; } if (env_created.coord.x == new_env.coord.x && env_created.coord.z == new_env.coord.z - 10) // check if env déjà présent en bas { str_prox_B = env_created.plane.name; new_env.prox_B = true; } if (env_created.coord.x == new_env.coord.x && env_created.coord.z == new_env.coord.z + 10) // check if env déjà présent en haut { str_prox_H = env_created.plane.name; new_env.prox_H = true; } } if (new_env.prox_G) // une case existe à gauche de là où on veut créer // should use new_env_X { if (str_prox_G.Contains("D")) { char_restrict_1 = "G"; } else { char_delete_1 = "G"; } } if (new_env.prox_H) // une case existe en haut de là où on veut créer { if (str_prox_H.Contains("B")) { char_restrict_2 = "H"; } else { char_delete_2 = "H"; } } if (new_env.prox_B) // une case existe en bas de là où on veut créer { if (str_prox_B.Contains("H")) { char_restrict_3 = "B"; } else { char_delete_3 = "B"; } } env_reduced.Clear(); // reducing prefab list to prefab containing D entrance foreach (GameObject env in env_prefabs) { if (env.name.Contains("D") && env.name.Contains(char_restrict_1) && env.name.Contains(char_restrict_2) && env.name.Contains(char_restrict_3) && !env.name.Contains(char_delete_1) && !env.name.Contains(char_delete_2) && !env.name.Contains(char_delete_3)) { env_reduced.Add(env); } } if (env_reduced.Count == 0) // si on n'a plus de troncon normal, on selectionne un bouchon { foreach (GameObject env in closing_prefabs) { if (env.name.Contains("D") && env.name.Contains(char_restrict_1) && env.name.Contains(char_restrict_2) && env.name.Contains(char_restrict_3) && !env.name.Contains(char_delete_1) && !env.name.Contains(char_delete_2) && !env.name.Contains(char_delete_3)) { env_reduced.Add(env); } } } new_env.plane = env_reduced[Random.Range(0, env_reduced.Count)]; //----------------------------------------- set bools -----------------------------------------// if (new_env.plane.name.Contains("G")) { new_env.G = true; } else { new_env.G = false; } if (new_env.plane.name.Contains("H")) { new_env.H = true; } else { new_env.H = false; } if (new_env.plane.name.Contains("D")) { new_env.D = true; } else { new_env.D = false; } if (new_env.plane.name.Contains("B")) { new_env.B = true; } else { new_env.B = false; } //------------------------------------------------------------------------------------------// new_env.ID = ID_count; ID_count++; Instantiate(new_env.plane, new_env.coord, Quaternion.Euler(0, 180, 0)); envs.Add(new_env); } // -------------------------------------------------------------------------------------------------------------------------// // -------------------------------------- création de l'env à droite de la case appelante ---------------------------------------// if (current_env.D && !already_D) // si une ouverture à droite { string str_prox_G = "", str_prox_H = "", str_prox_D = "", str_prox_B = ""; string char_restrict_1 = "", char_restrict_2 = "", char_restrict_3 = "", char_delete_1 = "FFFFFF", char_delete_2 = "FFFFFF", char_delete_3 = "FFFFFF"; env new_env = new env(); new_env.coord = current_env.coord; new_env.coord.x += 10; // set proxi bools new_env.prox_G = true; new_env.prox_H = false; new_env.prox_D = false; new_env.prox_B = false; foreach (env env_created in envs) // on vérifie les cases en croix autour de la case que l'on va rajouter à gauche { if (env_created.coord.x == new_env.coord.x - 10 && env_created.coord.z == new_env.coord.z) // check if env déjà présent à gauche { str_prox_G = env_created.plane.name; new_env.prox_G = true; } if (env_created.coord.x == new_env.coord.x + 10 && env_created.coord.z == new_env.coord.z) // check if env déjà présent à droite { str_prox_D = env_created.plane.name; new_env.prox_D = true; } if (env_created.coord.x == new_env.coord.x && env_created.coord.z == new_env.coord.z - 10) // check if env déjà présent en bas { str_prox_B = env_created.plane.name; new_env.prox_B = true; } if (env_created.coord.x == new_env.coord.x && env_created.coord.z == new_env.coord.z + 10) // check if env déjà présent en haut { str_prox_H = env_created.plane.name; new_env.prox_H = true; } } if (new_env.prox_D) // une case existe à droite de là où on veut créer // should use new_env_X { if (str_prox_D.Contains("G")) { char_restrict_1 = "D"; } else { char_delete_1 = "D"; } } if (new_env.prox_H) // une case existe en haut de là où on veut créer { if (str_prox_H.Contains("B")) { char_restrict_2 = "H"; } else { char_delete_2 = "H"; } } if (new_env.prox_B) // une case existe en bas de là où on veut créer { if (str_prox_B.Contains("H")) { char_restrict_3 = "B"; } else { char_delete_3 = "B"; } } env_reduced.Clear(); // reducing prefab list to prefab containing D entrance foreach (GameObject env in env_prefabs) { if (env.name.Contains("G") && env.name.Contains(char_restrict_1) && env.name.Contains(char_restrict_2) && env.name.Contains(char_restrict_3) && !env.name.Contains(char_delete_1) && !env.name.Contains(char_delete_2) && !env.name.Contains(char_delete_3)) { env_reduced.Add(env); } } if (env_reduced.Count == 0) // si on n'a plus de troncon normal, on selectionne un bouchon { foreach (GameObject env in closing_prefabs) { if (env.name.Contains("G") && env.name.Contains(char_restrict_1) && env.name.Contains(char_restrict_2) && env.name.Contains(char_restrict_3) && !env.name.Contains(char_delete_1) && !env.name.Contains(char_delete_2) && !env.name.Contains(char_delete_3)) { env_reduced.Add(env); } } } new_env.plane = env_reduced[Random.Range(0, env_reduced.Count)]; //----------------------------------------- set bools -----------------------------------------// if (new_env.plane.name.Contains("G")) { new_env.G = true; } else { new_env.G = false; } if (new_env.plane.name.Contains("H")) { new_env.H = true; } else { new_env.H = false; } if (new_env.plane.name.Contains("D")) { new_env.D = true; } else { new_env.D = false; } if (new_env.plane.name.Contains("B")) { new_env.B = true; } else { new_env.B = false; } //------------------------------------------------------------------------------------------// new_env.ID = ID_count; ID_count++; Instantiate(new_env.plane, new_env.coord, Quaternion.Euler(0, 180, 0)); envs.Add(new_env); } // -------------------------------------------------------------------------------------------------------------------------// // -------------------------------------- création de l'env en haut de la case appelante ---------------------------------------// if (current_env.H && !already_H) // si une ouverture en haut { string str_prox_G = "", str_prox_H = "", str_prox_D = "", str_prox_B = ""; string char_restrict_1 = "", char_restrict_2 = "", char_restrict_3 = "", char_delete_1 = "FFFFFF", char_delete_2 = "FFFFFF", char_delete_3 = "FFFFFF"; env new_env = new env(); new_env.coord = current_env.coord; new_env.coord.z += 10; // set proxi bools new_env.prox_G = false; new_env.prox_H = false; new_env.prox_D = false; new_env.prox_B = true; foreach (env env_created in envs) // on vérifie les cases en croix autour de la case que l'on va rajouter à gauche { if (env_created.coord.x == new_env.coord.x - 10 && env_created.coord.z == new_env.coord.z) // check if env déjà présent à gauche { str_prox_G = env_created.plane.name; new_env.prox_G = true; } if (env_created.coord.x == new_env.coord.x + 10 && env_created.coord.z == new_env.coord.z) // check if env déjà présent à droite { str_prox_D = env_created.plane.name; new_env.prox_D = true; } if (env_created.coord.x == new_env.coord.x && env_created.coord.z == new_env.coord.z - 10) // check if env déjà présent en bas { str_prox_B = env_created.plane.name; new_env.prox_B = true; } if (env_created.coord.x == new_env.coord.x && env_created.coord.z == new_env.coord.z + 10) // check if env déjà présent en haut { str_prox_H = env_created.plane.name; new_env.prox_H = true; } } if (new_env.prox_G) // une case existe à gauche de là où on veut créer // should use new_env_X { if (str_prox_G.Contains("D")) { char_restrict_1 = "G"; } else { char_delete_1 = "G"; } } if (new_env.prox_H) // une case existe en haut de là où on veut créer { if (str_prox_H.Contains("B")) { char_restrict_2 = "H"; } else { char_delete_2 = "H"; } } if (new_env.prox_D) // une case existe à droite de là où on veut créer { if (str_prox_D.Contains("G")) { char_restrict_3 = "D"; } else { char_delete_3 = "D"; } } env_reduced.Clear(); // reducing prefab list to prefab containing D entrance foreach (GameObject env in env_prefabs) { if (env.name.Contains("B") && env.name.Contains(char_restrict_1) && env.name.Contains(char_restrict_2) && env.name.Contains(char_restrict_3) && !env.name.Contains(char_delete_1) && !env.name.Contains(char_delete_2) && !env.name.Contains(char_delete_3)) { env_reduced.Add(env); } } if (env_reduced.Count == 0) // si on n'a plus de troncon normal, on selectionne un bouchon { foreach (GameObject env in closing_prefabs) { if (env.name.Contains("B") && env.name.Contains(char_restrict_1) && env.name.Contains(char_restrict_2) && env.name.Contains(char_restrict_3) && !env.name.Contains(char_delete_1) && !env.name.Contains(char_delete_2) && !env.name.Contains(char_delete_3)) { env_reduced.Add(env); } } } new_env.plane = env_reduced[Random.Range(0, env_reduced.Count)]; //----------------------------------------- set bools -----------------------------------------// if (new_env.plane.name.Contains("G")) { new_env.G = true; } else { new_env.G = false; } if (new_env.plane.name.Contains("H")) { new_env.H = true; } else { new_env.H = false; } if (new_env.plane.name.Contains("D")) { new_env.D = true; } else { new_env.D = false; } if (new_env.plane.name.Contains("B")) { new_env.B = true; } else { new_env.B = false; } //------------------------------------------------------------------------------------------// new_env.ID = ID_count; ID_count++; Instantiate(new_env.plane, new_env.coord, Quaternion.Euler(0, 180, 0)); envs.Add(new_env); } // -------------------------------------------------------------------------------------------------------------------------// // -------------------------------------- création de l'env en bas de la case appelante ---------------------------------------// if (current_env.B && !already_B) // si une ouverture en haut { string str_prox_G = "", str_prox_H = "", str_prox_D = "", str_prox_B = ""; string char_restrict_1 = "", char_restrict_2 = "", char_restrict_3 = "", char_delete_1 = "FFFFFF", char_delete_2 = "FFFFFF", char_delete_3 = "FFFFFF"; env new_env = new env(); new_env.coord = current_env.coord; new_env.coord.z -= 10; // set proxi bools new_env.prox_G = false; new_env.prox_H = true; new_env.prox_D = false; new_env.prox_B = false; foreach (env env_created in envs) // on vérifie les cases en croix autour de la case que l'on va rajouter à gauche { if (env_created.coord.x == new_env.coord.x - 10 && env_created.coord.z == new_env.coord.z) // check if env déjà présent à gauche { str_prox_G = env_created.plane.name; new_env.prox_G = true; } if (env_created.coord.x == new_env.coord.x + 10 && env_created.coord.z == new_env.coord.z) // check if env déjà présent à droite { str_prox_D = env_created.plane.name; new_env.prox_D = true; } if (env_created.coord.x == new_env.coord.x && env_created.coord.z == new_env.coord.z - 10) // check if env déjà présent en bas { str_prox_B = env_created.plane.name; new_env.prox_B = true; } if (env_created.coord.x == new_env.coord.x && env_created.coord.z == new_env.coord.z + 10) // check if env déjà présent en haut { str_prox_H = env_created.plane.name; new_env.prox_H = true; } } if (new_env.prox_G) // une case existe à gauche de là où on veut créer // should use new_env_X { if (str_prox_G.Contains("D")) { char_restrict_1 = "G"; } else { char_delete_1 = "G"; } } if (new_env.prox_D) // une case existe à droite de là où on veut créer { if (str_prox_D.Contains("G")) { char_restrict_2 = "D"; } else { char_delete_2 = "D"; } } if (new_env.prox_B) // une case existe en bas de là où on veut créer { if (str_prox_B.Contains("H")) { char_restrict_3 = "B"; } else { char_delete_3 = "B"; } } env_reduced.Clear(); // reducing prefab list to prefab containing D entrance foreach (GameObject env in env_prefabs) { if (env.name.Contains("H") && env.name.Contains(char_restrict_1) && env.name.Contains(char_restrict_2) && env.name.Contains(char_restrict_3) && !env.name.Contains(char_delete_1) && !env.name.Contains(char_delete_2) && !env.name.Contains(char_delete_3)) { env_reduced.Add(env); } } if (env_reduced.Count == 0) // si on n'a plus de troncon normal, on selectionne un bouchon { foreach (GameObject env in closing_prefabs) { if (env.name.Contains("H") && env.name.Contains(char_restrict_1) && env.name.Contains(char_restrict_2) && env.name.Contains(char_restrict_3) && !env.name.Contains(char_delete_1) && !env.name.Contains(char_delete_2) && !env.name.Contains(char_delete_3)) { env_reduced.Add(env); } } } new_env.plane = env_reduced[Random.Range(0, env_reduced.Count)]; //----------------------------------------- set bools -----------------------------------------// if (new_env.plane.name.Contains("G")) { new_env.G = true; } else { new_env.G = false; } if (new_env.plane.name.Contains("H")) { new_env.H = true; } else { new_env.H = false; } if (new_env.plane.name.Contains("D")) { new_env.D = true; } else { new_env.D = false; } if (new_env.plane.name.Contains("B")) { new_env.B = true; } else { new_env.B = false; } //------------------------------------------------------------------------------------------// new_env.ID = ID_count; ID_count++; Instantiate(new_env.plane, new_env.coord, Quaternion.Euler(0, 180, 0)); envs.Add(new_env); } // -------------------------------------------------------------------------------------------------------------------------// }
ConvertToDataView(env, keys, values, treatValuesAsKeyTypes), KeyColumnName, ValueColumnName, columns)
public void call_add(Vector3 coord_caller) { //Debug.Log(coord_caller); // Debug.Log(("call_ad_cross from : "+current_env.plane.name+ " at "+current_env.coord)); foreach (env env_created in envs) { if (coord_caller.x == env_created.coord.x && coord_caller.z == env_created.coord.z) { current_env = env_created; if (previous_env.ID != current_env.ID) { // Debug.Log(current_env.plane.name); previous_env = current_env; } } } if (!current_env.visited) { add_env_cross(current_env); } current_env.visited = true; //int G = -1, D = -1, B = -1, H = -1; //int list_indic = 0; //foreach (env env_created in envs) //{ // if (env_created.coord.x == current_env.coord.x - 10 && env_created.coord.z == current_env.coord.z) // check if env déjà présent à gauche // { // //add_env_cross(env_created); // G = list_indic; // } // if (env_created.coord.x == current_env.coord.x + 10 && env_created.coord.z == current_env.coord.z) // check if env déjà présent à droite // { // //add_env_cross(env_created); // D = list_indic; // } // if (env_created.coord.x == current_env.coord.x && env_created.coord.z == current_env.coord.z - 10) // check if env déjà présent en bas // { // //add_env_cross(env_created); // H = list_indic; // } // if (env_created.coord.x == current_env.coord.x && env_created.coord.z == current_env.coord.z + 10) // check if env déjà présent en haut // { // //add_env_cross(env_created); // B = list_indic; // } // list_indic++; //} //if (G != -1 && !envs.ElementAt(G).visited) //{ // add_env_cross(envs.ElementAt(G)); //} //if (D != -1 && !envs.ElementAt(D).visited) //{ // add_env_cross(envs.ElementAt(D)); //} //if (H != -1 && !envs.ElementAt(H).visited) //{ // add_env_cross(envs.ElementAt(H)); //} //if (B != -1 && !envs.ElementAt(B).visited) //{ // add_env_cross(envs.ElementAt(B)); //} }
void add_first_env() { env first_env = new env(); // initialise proxi bools first_env.prox_G = false; first_env.prox_H = false; first_env.prox_D = false; first_env.prox_B = false; first_env.plane = env_prefabs[Random.Range(0, env_prefabs.Count)]; Debug.Log(first_env.plane.name); //----------------------------------------- set bools -----------------------------------------// if (first_env.plane.name.Contains("G")) { first_env.G = true; } else { first_env.G = false; } if (first_env.plane.name.Contains("H")) { first_env.H = true; } else { first_env.H = false; } if (first_env.plane.name.Contains("D")) { first_env.D = true; } else { first_env.D = false; } if (first_env.plane.name.Contains("B")) { first_env.B = true; } else { first_env.B = false; } //------------------------------------------------------------------------------------------// first_env.coord = new Vector3(0, 0, 0); first_env.visited = true; first_env.ID = ID_count; ID_count++; Instantiate(first_env.plane, first_env.coord, Quaternion.Euler(0, 180, 0)); envs.Add(first_env); current_env = first_env; add_env_cross(current_env); }
super(env, fileName);
Lambda(env, bindings.Select <Pair>(Car <Object>), body)
public env(env old) { _var = old._var; value = old.value; }
"lefttop" => cellSetOp(env, c => c.GroupBy(c => c.X).MinElement(g => g.Key).MinElement(c => c.Y).Index), "righttop" => cellSetOp(env, c => c.GroupBy(c => c.X).MaxElement(g => g.Key).MinElement(c => c.Y).Index),
var(a, w, s) = f(env, state);
"rightbottom" => cellSetOp(env, c => c.GroupBy(c => c.X).MaxElement(g => g.Key).MaxElement(c => c.Y).Index),
=> (env, state) => f(env, state).Add(false);
public qnx(OldUnityXml.qnx old) { env = new env(old.env); author = old.author; authorId = old.authorId; id = old.id; filename = old.filename; name = old.name; description = old.description; publisher = old.publisher; versionNumber = old.versionNumber; int assetCount = 5, splashAssetCount = old.splashScreens.images != null ? old.splashScreens.images.Length : 0; assets = new asset[assetCount + splashAssetCount]; assets[0] = new asset(old.icon.image, old.icon.image); assets[1] = new asset("Data", null); assets[2] = new asset("lib", null); assets[3] = new asset("SLAwards.bundle", "scoreloop/SLAwards.bundle"); assets[4] = new asset("Release", null); for (int i = 0; i != splashAssetCount; ++i) { assets[assetCount+i] = new asset(old.splashScreens.images[i], old.splashScreens.images[i]); } icon = new icon(old.icon); splashScreens = new splashScreens(old.splashScreens); initialWindow = new initialWindow(old.initialWindow); configuration = new configuration(old); category = old.category; permissions = new permission[old.actions.Length]; for (int i = 0; i != permissions.Length; ++i) { permissions[i] = new permission(old.actions[i]); } }
super(env, host, user, password, db, port, socket);
// Use this for initialization void Start() { //instatiating mainmenu. //GameObject startmenu = Instantiate(Resources.Load("ui/menuGO")) as GameObject; //instantiating environement env envi = new env(); //instanciating map with it's parameters map map = new map("entrance", envi); //Debug.Log(map.mapname); //getting global map path string mapfilepath = map.getmappath(map.mapname); //Debug.Log(mapfilepath); //getting map full path map.mapfilepath = mapfilepath; //Debug.Log(map.mapfilepath); // checking if file exist if (map.mapfilepath == "error") { Debug.LogError("error occured opening map file"); } else { //Debug.Log("path ok"); string zonename; string[] mapparts = new string[100]; //populating map.tempzone acording to image map.tempzone = tools.getcolor(map.mapfilepath); string textfile = map.getzonedeftxt(map.mapname); //grabing zone references mapparts = tools.getMapZones(textfile); map.zonemap = new List<List<Zone>>(); List<Zone> row = new List<Zone>(); //instanciating every zone + adding "border" zones (not interactive) for (int i = 0; i < (map.tempzone.Count) + 2; i++) { GameObject zonepos = Instantiate(Resources.Load("map/zonepointer")) as GameObject; zonepos.transform.position = new Vector3(((i * 16) - 16), 0, -16); Zone zone = new Zone("border", zonepos, map); row.Add(zone); } map.zonemap.Add(row); for (int i = 0; i < map.tempzone.Count; i++) { row = new List<Zone>(); if (true) { GameObject zonepos = Instantiate(Resources.Load("map/zonepointer")) as GameObject; zonepos.transform.position = new Vector3(-16 , 0, i*16); Zone zone = new Zone("border", zonepos, map); row.Add(zone); } for (int j = 0; j < map.tempzone[i].Count; j++) { //Debug.Log("instanciating zones"); GameObject zonepos = Instantiate(Resources.Load("map/zonepointer")) as GameObject; zonepos.transform.position = new Vector3(j * 16, 0, i * 16); if (map.tempzone[j][i].A == 255) { string tempcolor = tools.colortostring(map.tempzone[j][i]); zonename = tools.getzonename(mapparts, tempcolor); Zone zone = new Zone(zonename, zonepos, map); row.Add(zone); } else { Zone zone = new Zone("empty", zonepos, map); row.Add(zone); } } if (true) { GameObject zonepos = Instantiate(Resources.Load("map/zonepointer")) as GameObject; zonepos.transform.position = new Vector3((map.tempzone.Count)*16, 0, i * 16); Zone zone = new Zone("border", zonepos, map); row.Add(zone); } map.zonemap.Add(row); } row = new List<Zone>(); for (int o = 0; o < (map.tempzone.Count) + 2; o++) { GameObject zonepos = Instantiate(Resources.Load("map/zonepointer")) as GameObject; zonepos.transform.position = new Vector3(((o * 16) - 16), 0, (map.tempzone.Count * 16)); Zone zone = new Zone("border", zonepos, map); row.Add(zone); } map.zonemap.Add(row); } //populating every zone Tiles //Debug.Log("populating empty tile"); for (int i = 0; i < map.zonemap.Count; i++) { for (int j = 0; j < map.zonemap[i].Count; j++) { if (map.zonemap[j][i].type == "empty") { for (int k = 0; k < 16; k++) { List<Tile> tilerow = new List<Tile>(); for (int l = 0; l < 16; l++) { GameObject tileholder = Instantiate(Resources.Load("tile/Tileholder")) as GameObject; Renderer rnd = tileholder.GetComponent<Renderer>(); Tile tile = new Tile("empty", map.zonemap[j][i], tileholder, l, 0, k); rnd.material = tileholder.GetComponent<Tileholder>().mats[0]; tileholder.GetComponent<Tileholder>().tile = tile; tileholder.tag = "empty"; tile.worldpos = new Vector3((k+(16*j)),0,l+(16*i)); tilerow.Add(tile); } map.zonemap[j][i].tilemap.Add(tilerow); } } else if (map.zonemap[j][i].type == "border") { for (int k = 0; k < 16; k++) { List<Tile> tilerow = new List<Tile>(); for (int l = 0; l < 16; l++) { GameObject tileholder = Instantiate(Resources.Load("tile/Tileholder")) as GameObject; Renderer rnd = tileholder.GetComponent<Renderer>(); Tile tile = new Tile("border", map.zonemap[j][i], tileholder, l, 0, k); rnd.material = tileholder.GetComponent<Tileholder>().mats[0]; tileholder.GetComponent<Tileholder>().tile = tile; tileholder.tag = "border"; tile.worldpos = new Vector3((k + (16 * j)), 0, l + (16 * i)); tilerow.Add(tile); } map.zonemap[j][i].tilemap.Add(tilerow); } } else { //Debug.Log("grabbing file directory"); string imagepath = map.zonemap[j][i].getzoneimagepath(map.mapsfilespath, map.zonemap[j][i].type, map.mapname); //Debug.Log(imagepath); //Debug.Log("grabbing tile color list"); List<List<System.Drawing.Color>> tilescolor = tools.getcolor(imagepath + map.zonemap[j][i].type + ".png"); //Debug.Log("grabbing zone tile definitions"); string[] tilref = tools.getMapZones(imagepath + "Tiles.txt"); for (int k = 0; k < 16; k++) { List<Tile> tilerow = new List<Tile>(); for (int l = 0; l < 16; l++) { GameObject tileholder = Instantiate(Resources.Load("tile/Tileholder")) as GameObject; Renderer rnd = tileholder.GetComponent<Renderer>(); if (tilescolor[l][k].A == 255) { string tilemame = tools.getzonename(tilref, tools.colortostring(tilescolor[l][k])); if (tilemame == "openfloorTile") { Tile tile = new Tile("openfloorTile", map.zonemap[j][i], tileholder, l, -1, k); rnd.material = tileholder.GetComponent<Tileholder>().mats[2]; tileholder.GetComponent<Tileholder>().tile = tile; tileholder.tag = "floor"; tile.worldpos = new Vector3((k + (16 * j)), 0, l + (16 * i)); tilerow.Add(tile); } else if (tilemame == "wallTile") { Tile tile = new Tile("wallTile", map.zonemap[j][i], tileholder, l, 0, k); rnd.material = tileholder.GetComponent<Tileholder>().mats[2]; tileholder.GetComponent<Tileholder>().tile = tile; tileholder.tag = "wall"; tile.worldpos = new Vector3((k + (16 * j)), 0, l + (16 * i)); tilerow.Add(tile); } else if (tilemame == "collumn") { Tile tile = new Tile("collumn", map.zonemap[j][i], tileholder, l, 0, k); rnd.material = tileholder.GetComponent<Tileholder>().mats[2]; tileholder.GetComponent<Tileholder>().tile = tile; tileholder.tag = "wall"; tile.worldpos = new Vector3((k + (16 * j)), 0, l + (16 * i)); tilerow.Add(tile); } } else { Tile tile = new Tile("empty", map.zonemap[j][i], tileholder, l, 0, k); rnd.material = tileholder.GetComponent<Tileholder>().mats[0]; tileholder.GetComponent<Tileholder>().tile = tile; tileholder.tag = "empty"; tile.worldpos = new Vector3((k + (16 * j)), 0, l + (16 * i)); tilerow.Add(tile); } } map.zonemap[j][i].tilemap.Add(tilerow); } } } } //generating map global tilemap map.generatemaptilemap(); //updating tiles according to surounding map.tileCheckForEmptyToWall(); }
: base(Contracts.CheckRef(env, nameof(env)).Register(nameof(MissingValueDroppingEstimator)), new MissingValueDroppingTransformer(env, columns)) {