// Use this for initialization void Start() { if (this.gameObject.name == "LeftCard") { slotLocType = LocType.Left; } }
// конструкторы public Location(int id, LocType type, string desc, Path[] paths) { this.id = id; this.type = type; this.desc = desc; this.paths = paths; }
public string this[string columnName] { get { string result = null; if (columnName == "LocType") { if (LocType != null && LocType.ToString().Length > 3) { result = "LocType exceeds maximum length (3)."; //LocType = (int?)int.Parse(LocType.ToString().Substring(0, 3)); } } if (columnName == "ContType") { if (ContType != null && ContType.ToString().Length > 2) { result = "ContType exceeds maximum length (2)."; //ContType = (int?)int.Parse(ContType.ToString().Substring(0, 2)); } } return(result); } }
public LocData(string rawLine) { // MarshSpawn.RockHC, Inkwater Marsh, Resource, Life, swampStateGroup, 21786, healthContainerA, 60210, -958, -4313 var lineParts = rawLine.Replace(", ", ",").Split(','); var nameParts = lineParts[0].Split('.'); Area = nameParts[0]; Name = nameParts[1]; Zone = NameToZone.GetOrElse(lineParts[1], ZoneType.Void, "LocData: NameToZone"); switch (lineParts[2]) { case "SpiritLight": Type = LocType.SpiritLight; break; case "Ability": Type = LocType.Tree; break; case "Shard": Type = LocType.Shard; break; case "Shop": Type = LocType.Shop; break; case "Wisp": case "Quest": Type = LocType.Quest; break; case "Resource": switch (lineParts[3]) { case "Energy": Type = LocType.Energy; break; case "Life": Type = LocType.Health; break; case "ShardSlot": Type = LocType.ShardSlot; break; case "Ore": Type = LocType.Ore; break; case "Keystone": Type = LocType.Keystone; break; case "Eyestone": Type = LocType.Eyestone; break; default: Randomizer.Warn("LocData init", $"Unknown resource type {lineParts[3]}"); Type = LocType.Unknown; break; } break; default: Randomizer.Warn("LocData init", $"Unknown loc type {lineParts[2]}, {lineParts[3]}"); Type = LocType.Unknown; break; } Cond = new UberStateCondition(lineParts[5].ParseToInt("LocData UGID"), lineParts[7]); }
public LocData(ZoneType zone, LocType type) { Zone = zone; Type = type; }