public static string GetStringForPlace(TypeOfPlace place) { switch (place) { case TypeOfPlace.none: return(""); case TypeOfPlace.east: return("E"); case TypeOfPlace.west: return("W"); case TypeOfPlace.south: return("S"); case TypeOfPlace.north: return("N"); case TypeOfPlace.foreign: return("F"); default: return(""); } }
/* * public void ApplyTextToModel() * { * average = float.Parse(avgText.text); * homerun = float.Parse(homerunText.text); * discipline = float.Parse(disciplineText.text); * * onPlayerAbilityValueChange?.Invoke(average, homerun, discipline); * } */ public void LoadModel(PlayerModel model) { average = model.GetAverage(); homerun = model.GetHomerun(); discipline = model.GetDisc(); num = model.num; school = model.school; place = model.place; ID = model.ID; grade = model.grade; name = model.name; level = 1; modifiedAverage = average; modifiedHomerun = homerun; modifiedDiscipline = discipline; display.UpdateText(average, homerun, discipline, grade, name); display.UpdateAttribute(school, num, place); display.UpdateLevel(level); onPlayerAbilityValueChange?.Invoke(average, homerun, discipline); onPlayerModelLoaded?.Invoke(); }
public void UpdateAttribute(TypeOfSchool school, int num, TypeOfPlace place, int cost) { colorImage.color = GetColor(school); numText.text = PlayerModel.GetStringForNum(num); placeText.text = PlayerModel.GetStringForPlace(place); costText.text = cost.ToString(); }
public ActionResult DeleteConfirmed(int id) { TypeOfPlace typeOfPlace = db.TypeOfPlace.Find(id); db.TypeOfPlace.Remove(typeOfPlace); db.SaveChanges(); return(RedirectToAction("Index")); }
public WaypointData(string coordinates, TypeOfPlace type, string name, string direction, string uri, string email, string telephone) { this.Coordinates = coordinates; this.Type = type; this.Name = name; this.Address = direction; this.Uri = uri; this.Email = email; this.Telephone = telephone; }
public ActionResult Edit([Bind(Include = "IdTypeOfPlace,NameTypeOfPlace")] TypeOfPlace typeOfPlace) { if (ModelState.IsValid) { db.Entry(typeOfPlace).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(typeOfPlace)); }
public ActionResult Create([Bind(Include = "IdTypeOfPlace,NameTypeOfPlace")] TypeOfPlace typeOfPlace) { if (ModelState.IsValid) { db.TypeOfPlace.Add(typeOfPlace); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(typeOfPlace)); }
void LoadModel(PlayerModel model) { average = model.GetAverage(); homerun = model.GetHomerun(); discipline = model.GetDisc(); num = model.num; school = model.school; place = model.place; cost = model.grade; ID = model.ID; }
// GET: TypeOfPlaces/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TypeOfPlace typeOfPlace = db.TypeOfPlace.Find(id); if (typeOfPlace == null) { return(HttpNotFound()); } return(View(typeOfPlace)); }
public string PlaceInfo() { var parentpath = string.Empty; Place currentPlace = this; // Generating path from parent and grand(n) parent info while (currentPlace.parent != null) { parentpath = currentPlace.parent.Alias + (string.IsNullOrEmpty(parentpath) ? string.Empty : $"/{parentpath}"); currentPlace = currentPlace.parent; } return($"{Alias}, {parentpath}, {TypeOfPlace.ToString()}"); }
private void UpdatePlaceAura(TypeOfPlace place, int[] indexes) { for (int i = 0; i < indexes.Length; i++) { RectTransform rect = order[indexes[i]].placeRect; Sequence seq = DOTween.Sequence().Append(rect.DOScale( new Vector2(1.2f, 1.2f), //終了時点のScale 0.5f //時間 )).Append(rect.DOScale( new Vector2(1, 1), //終了時点のScale 0.5f //時間 )); switch (place) { case TypeOfPlace.east: order[indexes[i]].SetAuraForPlace(Color.black); seq.Play(); break; case TypeOfPlace.west: order[indexes[i]].SetAuraForPlace(Color.black); seq.Play(); break; case TypeOfPlace.south: order[indexes[i]].SetAuraForPlace(Color.black); seq.Play(); break; case TypeOfPlace.north: order[indexes[i]].SetAuraForPlace(Color.black); seq.Play(); break; defalut: break; } } }
private void SetActivePlaceBuff(TypeOfPlace place, bool isActive) { switch (place) { case TypeOfPlace.east: isEastBuffOn.SetValue(isActive); break; case TypeOfPlace.west: isWestBuffOn.SetValue(isActive); break; case TypeOfPlace.south: isSouthBuffOn.SetValue(isActive); break; case TypeOfPlace.north: isNorthBuffOn.SetValue(isActive); break; default: break; } }
public AudioSourceAndPlace(AudioSource source, TypeOfPlace place) { this.source = source; this.place = place; }
public SoundAndPlace(AudioClip sound, TypeOfPlace place) { this.sound = sound; this.place = place; }
public Place(int num, string type) { Number = num; TypeOf = (TypeOfPlace)Enum.Parse(TypeOf.GetType(), type); }
public WaypointData JsonToWaypoint(string t, TypeOfPlace a, bool todo) { string[] splitArray = new string[10000]; string[] splitArray2 = new string[10000]; string coordenadas, url, telefono, nombre, email, direccion; TypeOfPlace tipo; //Coordenadas splitArray = t.Split(new string[] { "[" }, StringSplitOptions.None); if (!splitArray[0].Equals(t)) { splitArray2 = splitArray[1].Split(new string[] { "]" }, StringSplitOptions.None); splitArray = splitArray2[0].Split(new string[] { "," }, StringSplitOptions.None); coordenadas = splitArray[1] + ", " + splitArray[0]; } else { coordenadas = ""; } //URL del lugar splitArray = t.Split(new string[] { "\"schema_url\" : \"" }, StringSplitOptions.None); if (!splitArray[0].Equals(t)) { splitArray2 = splitArray[1].Split(new string[] { "\"" }, StringSplitOptions.None); url = splitArray2[0]; } else { url = ""; } //email del lugar splitArray = t.Split(new string[] { "\"schema_email\" : \"" }, StringSplitOptions.None); if (!splitArray[0].Equals(t)) { splitArray2 = splitArray[1].Split(new string[] { "\"" }, StringSplitOptions.None); email = splitArray2[0]; } else { email = ""; } //teléfono del lugar splitArray = t.Split(new string[] { "\"schema_telephone\" : \"" }, StringSplitOptions.None); if (!splitArray[0].Equals(t)) { splitArray2 = splitArray[1].Split(new string[] { "\"" }, StringSplitOptions.None); telefono = splitArray2[0]; } else { telefono = ""; } //email del lugar splitArray = t.Split(new string[] { "\"rdfs_label\" : \"" }, StringSplitOptions.None); if (!splitArray[0].Equals(t)) { splitArray2 = splitArray[1].Split(new string[] { "\"" }, StringSplitOptions.None); nombre = splitArray2[0]; } else { nombre = ""; } //email del lugar splitArray = t.Split(new string[] { "\"schema_address_streetAddress\" : \"" }, StringSplitOptions.None); if (!splitArray[0].Equals(t)) { splitArray2 = splitArray[1].Split(new string[] { "\"" }, StringSplitOptions.None); direccion = splitArray2[0]; } else { direccion = ""; } if (todo) { //tipo splitArray = t.Split(new string[] { "\"type\" : \"" }, StringSplitOptions.None); splitArray2 = splitArray[1].Split(new string[] { "\"" }, StringSplitOptions.None); switch (splitArray2[0]) { case "0": tipo = TypeOfPlace.alojamiento; break; case "1": tipo = TypeOfPlace.barCopas; break; case "2": tipo = TypeOfPlace.cafebar; break; case "3": tipo = TypeOfPlace.centroTuristico; break; case "4": tipo = TypeOfPlace.monumento; break; case "5": tipo = TypeOfPlace.restaurante; break; default: tipo = TypeOfPlace.cafebar; //Debug.Log("FALLO: " + t); break; } } else { tipo = a; } WaypointData final = new WaypointData(coordenadas, tipo, nombre, direccion, url, email, telefono); return(final); }
public Place(string[] place) { TypeOf = (TypeOfPlace)Enum.Parse(TypeOf.GetType(), place[0]); Number = Convert.ToInt32(place[1]); }