public TransportMain(string type, string land, string stad) { InitializeComponent(); using (TransportServiceClient tsc = new TransportServiceClient()) { if (land.Equals("")) land = null; if (stad.Equals("")) stad = null; this.lastTransportResult = tsc.getTransport(type, land, stad); transportType[] tt = tsc.getAlleTransportTypes(); if (this.lastTransportResult != null && this.lastTransportResult.Count() > 0) { foreach (transport tr in this.lastTransportResult) { transportType ttp = new transportType(); foreach (transportType t in tt) { if (t.type_id == tr.type_id) { ttp = t; break; } } listBox1.Items.Add("[" + ttp.naam + "] " + tr.omschrijving); } } } }
public BoardObj(CardDB.cardName cName, int lvl = 0) { CardDB.Card c = CardDB.Instance.getCardDataFromName(cName, lvl); this.card = c; this.Name = c.name; this.type = c.type; this.Transport = c.Transport; this.affectOn = c.affectType; this.cost = c.cost; this.DeployTime = c.DeployTime; this.DamageRadius = c.DamageRadius; this.MaxHP = c.MaxHP; this.HP = c.MaxHP; this.Atk = c.Atk; this.Shield = c.Shield; this.Speed = c.Speed; this.HitSpeed = c.HitSpeed; this.MinRange = c.MinRange; this.Range = c.MaxRange; this.SightRange = c.SightRange; this.TargetType = c.TargetType; this.MaxTargets = c.MultipleTargets; this.LifeTime = c.LifeTime; this.SpawnNumber = c.SpawnNumber; this.SpawnInterval = c.SpawnInterval; this.SpawnTime = c.SpawnPause; this.SpawnCharacterLevel = c.SpawnCharacterLevel; this.DeathEffect = c.DeathEffect; this.level = lvl; //this.Tower = c.Tower; }
public TransportMain() { InitializeComponent(); using(TransportServiceClient tsc = new TransportServiceClient()) { this.lastTransportResult = tsc.getAlleTransportMiddelen(); transportType[] tt = tsc.getAlleTransportTypes(); foreach (transport tr in this.lastTransportResult) { transportType ttp = new transportType(); foreach(transportType t in tt) { if(t.type_id == tr.type_id) { ttp = t; break; } } listBox1.Items.Add("[" + ttp.naam + "] " + tr.omschrijving); } } }
public citizenBot(Vector3 pos, botType type, inventory inventory, transportType transportType) { this.transform.position = pos; this.type = type; this.inventory = inventory; this.transportType = transportType; pathManager = new BotPathManager(); }
public BoardObj(BoardObj bo) { this.Name = bo.Name; this.card = bo.card; this.type = bo.type; this.Transport = bo.Transport; this.affectOn = bo.affectOn; this.Position = bo.Position; this.own = bo.own; this.pID = bo.pID; //-???????? this.Line = bo.Line; this.GId = bo.GId; this.cost = bo.cost; this.DeployTime = bo.DeployTime; this.DamageRadius = bo.DamageRadius; this.MaxHP = bo.MaxHP; this.HP = bo.HP; this.Atk = bo.Atk; this.Shield = bo.Shield; this.Speed = bo.Speed; this.HitSpeed = bo.HitSpeed; this.MinRange = bo.MinRange; this.Range = bo.Range; this.SightRange = bo.SightRange; this.TargetType = bo.TargetType; this.MaxTargets = bo.MaxTargets; this.attacking = bo.attacking; this.attacked = bo.attacked; this.LifeTime = bo.LifeTime; this.SpawnNumber = bo.SpawnNumber; this.SpawnInterval = bo.SpawnInterval; this.SpawnTime = bo.SpawnTime; this.SpawnCharacterLevel = bo.SpawnCharacterLevel; this.frozen = bo.frozen; this.clone = bo.clone; this.startFrozen = bo.startFrozen; this.attacker = bo.attacker; this.target = bo.target; this.DeathEffect = bo.DeathEffect; this.Tower = bo.Tower; this.extraData = bo.extraData; }
public BoardObj(CardDB.cardName cName, int lvl = 0) { CardDB.Card c = CardDB.Instance.getCardDataFromName(cName, lvl); this.card = c; this.Name = c.name; this.type = c.type; this.Transport = c.Transport; this.affectOn = c.affectType; //this.Position = c.Position; //this.own = c.own; //this.pID = c.pID; //-???????? //this.Line = c.Line; //this.GId = c.GId; this.cost = c.cost; this.DeployTime = c.DeployTime; this.DamageRadius = c.DamageRadius; this.MaxHP = c.MaxHP; this.HP = c.MaxHP; this.Atk = c.Atk; this.Shield = c.Shield; this.Speed = c.Speed; this.HitSpeed = c.HitSpeed; this.MinRange = c.MinRange; this.Range = c.MaxRange; this.SightRange = c.SightRange; this.TargetType = c.TargetType; this.MaxTargets = c.MultipleTargets; //this.attacking = c.attacking; //this.attacked = c.attacked; this.LifeTime = c.LifeTime; this.SpawnNumber = c.SpawnNumber; this.SpawnInterval = c.SpawnInterval; this.SpawnTime = c.SpawnPause; this.SpawnCharacterLevel = c.SpawnCharacterLevel; //this.frozen = c.frozen; //this.startFrozen = c.startFrozen; //this.attacker = c.attacker; //this.target = c.target; this.DeathEffect = c.DeathEffect; //this.Tower = c.Tower; }
private void button2_Click(object sender, RoutedEventArgs e) { if (listBox1.SelectedValue == null) return; else { string item = (string)listBox1.SelectedValue; foreach (transport trans in this.lastTransportResult) { transportType ttp = new transportType(); using (TransportServiceClient tsc = new TransportServiceClient()) { foreach(transportType t in tsc.getAlleTransportTypes()) { if(t.type_id == trans.type_id) { ttp = t; break; } } } if (("[" + ttp.naam + "] " + trans.omschrijving).Equals(item)) { CommonMethods.GetFrame(this).Navigate(new TransportBooking(trans)); return; } } } }
public static BoardObj EnemyCharacterWithTheMostEnemiesAround(Playfield p, out int count, transportType tP) { int boarderX = 1000; int boarderY = 1000; IEnumerable <BoardObj> enemies = p.enemyMinions; BoardObj enemy = null; count = 0; foreach (var item in enemies) { BoardObj[] enemiesAroundTemp; if (tP != transportType.NONE) { enemiesAroundTemp = enemies.Where(n => n.Position.X > item.Position.X - boarderX && n.Position.X <item.Position.X + boarderX && n.Position.Y> item.Position.Y - boarderY && n.Position.Y < item.Position.Y + boarderY && n.Transport == tP).ToArray(); } else { enemiesAroundTemp = enemies.Where(n => n.Position.X > item.Position.X - boarderX && n.Position.X <item.Position.X + boarderX && n.Position.Y> item.Position.Y - boarderY && n.Position.Y < item.Position.Y + boarderY).ToArray(); } if (!(enemiesAroundTemp?.Count() > count)) { continue; } count = enemiesAroundTemp.Count(); enemy = item; } return(enemy); }