public void Init(Legs legs,Grid grid) { base.Init(legs); this.grid = grid; this.auxiliarySteering = new Arrive(); this.auxiliarySteering.Init(getLegs()); }
public override void DTRMStart() { base.DTRMStart(); attack = GetComponent<Attack>(); legs = GetComponent<Legs>(); }
public void DoYourJob() { Console.WriteLine($"{Name} is doing all their {Job} duties..."); Legs.Walk(15); Head.EatPie("Cherry"); Torso.Flex(); Legs.Walk(10); }
public override void DTRMStart() { base.DTRMStart(); legs = GetComponent <Legs>(); vision = GetComponent <Vision>(); attack = GetComponent <Attack>(); }
public void DoYourJob(int stepsToWalk) { Console.WriteLine($"Doing all my {Job} duties..."); Legs.Walk(stepsToWalk); Head.EatPie("Cherry"); Torso.Flex(); Legs.Walk(stepsToWalk); }
public void DoYourJob() { Console.WriteLine($"{Name} is doing all their {Job} duties..."); Legs.Walk(15); Head.EatPie("pumpkin"); Torso.Flex(); // because we are using TorsoBase, can only call common methods from the base. Can't use ChangeThermostat(); Legs.Walk(10); }
//public SpaceGuy(string v1, string v2, ZoeHead head, AstronautTorso torso, AstronautLegs legs) //{ // this.v1 = v1; // this.v2 = v2; // this.head = head; // this.torso = torso; // this.legs = legs; //} public void DoYourJob(int stepsToWalk) { Console.WriteLine($"Here I am. Doing all my {Job} duties... definitely being a very effective {Job}."); Legs.Walk(stepsToWalk); Head.EatPie("Cherry"); Torso.Flex(); Legs.Walk(stepsToWalk); }
/// <summary> Находит и возвращает ноги </summary> /// <param name="legs_owner"> Хозяин ног (ноги должны быть его детьми) </param> static Legs Find_Legs(GameObject legs_owner) { Legs legs; legs = legs_owner.GetComponentInChildren <Legs>(); return(legs); }
internal Itinerary WithLeg(Leg leg) { var newLegs = new List <Leg>(Legs.Count() + 1); newLegs.AddRange(Legs); newLegs.Add(leg); return(new Itinerary(newLegs)); }
void itemImgSetter(int val, string imgPath) { switch (val) { case 0: Gun1.Load(imgPath); break; case 1: Gun2.Load(imgPath); break; case 2: Gun3.Load(imgPath); break; case 3: Head.Load(imgPath); break; case 4: Arms.Load(imgPath); break; case 5: Chest.Load(imgPath); break; case 6: Legs.Load(imgPath); break; case 7: ClassArmour.Load(imgPath); break; case 8: Ghost.Load(imgPath); break; case 9: Sparrow.Load(imgPath); break; case 10: Ship.Load(imgPath); break; case 11: SubClass.Load(imgPath); break; case 13: Embelm.Load(imgPath); break; } }
internal Itinerary AppendBy(Itinerary other) { var newLegs = new List <Leg>(Legs.Count() + other.Legs.Count()); newLegs.AddRange(Legs); newLegs.AddRange(other.Legs); return(new Itinerary(newLegs)); }
public void Awake() { if (instance != null) { Debug.LogWarning("More than one instance of Inventory found!"); return; } instance = this; }
public String NameOfPart(int partNum) // I am truly sorry for this method! { String name = ""; Part thePart = parts[partNum]; if (thePart is Head) { Head head = (Head)thePart; name = "Head: " + thePart.PartName; name += " Class: " + (int)head.PartRank; name += " Scan Level: " + (int)head.EnemyScanAbility; name += " Missle Defense Rate: " + head.MissileInterceptionRate; } if (thePart is Core) { Core core = (Core)thePart; name = "Core: " + thePart.PartName; name += " Class:" + (int)core.PartRank; name += " HP: " + core.MaxHp; } if (thePart is LeftArm) { LeftArm leftArm = (LeftArm)thePart; name = "Left Arm: " + thePart.PartName; name += " Class: " + (int)leftArm.PartRank; name += " Blade Length: " + leftArm.SwordLength; name += " Blade Damage: " + leftArm.SwordDamage; } if (thePart is RightArm) { RightArm rightArm = (RightArm)thePart; name = "Right Arm: " + thePart.PartName; name += " Class: " + (int)rightArm.PartRank; name += " Size: " + rightArm.ProjectileSize; name += " Damage: " + rightArm.Damage; } if (thePart is Shoulders) { Shoulders shoudlers = (Shoulders)thePart; name = "Shoulder: " + thePart.PartName; name += " Class: " + (int)shoudlers.PartRank; name += " Size: " + shoudlers.MissleSize; name += " Damage: " + shoudlers.Damage; } if (thePart is Legs) { Legs legs = (Legs)thePart; name = "Legs: " + thePart.PartName; name += " Class: " + (int)legs.PartRank; name += " Speed: " + legs.SpeedTilesPerSecond; name += " Hover: " + ((legs.Movement.Water != MoveQuality.none) ? "True" : "False"); name += " Heat Resist: " + ((legs.Movement.Water != MoveQuality.none) ? "True" : "False"); } return(name); }
protected void ManageReachingLegsTurnDirection(Vector3 logicLookDirection, Vector3 movementTurnLogicDirection) { var legsLogicDirection = GetLogicVector(Legs.transform.forward); var torsoLogicDirection = GetLogicVector(Torso.transform.forward); var angle = AngleCalculator.CalculateLogicAngle(legsLogicDirection, movementTurnLogicDirection); Legs.TurnTowards(movementTurnLogicDirection); }
public ActionResult Edit([Bind(Include = "LegsId,Picure,Instructions,Benefits,Sets")] Legs legs) { if (ModelState.IsValid) { db.Entry(legs).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(legs)); }
static void Main(string[] args) { Console.WriteLine("Let's assemble a Lego character!"); Console.WriteLine('\n'); var head = new Head() { Name = "Mr. Lego" }; Console.WriteLine('\n'); head.Hair = "green"; Console.WriteLine($"Without {head.Name}'s hat, his {head.Hair} hair danced in the wind."); head.MagnifyVision(true); Console.WriteLine('\n'); var torso = new Torso() { }; Console.WriteLine('\n'); Parts.Torso.haveExtraSupplies(true); Console.WriteLine('\n'); var arms = new Arms(); Console.WriteLine('\n'); Console.WriteLine($"{head.Name} asked..."); arms.UseArms("rectangular"); Console.WriteLine('\n'); var legs = new Legs() { }; Console.WriteLine('\n'); Console.WriteLine($"He looked down at his {legs._legColor} legs."); legs.Walk("stubby"); }
public override double CalculateMaxProfit() { MaxProfit = Legs.Sum((leg) => leg.CalculateFinalProfit(0)); if (MaxProfit < 0) { throw new Exception("Bear Spread 的最大收益不应小于0"); } return(MaxProfit); }
private Pattern GenerateSmartPattern(int lines) { var bins = TypeCode == "RACE_ORDER" ? PatternGenerator.CreateFectaPattern(lines, Legs.Length) : PatternGenerator.CreateSmartPattern(lines, Legs.ToDictionary(l => l.LegOrder, l => l.Selections.Length)); var pattern = new Pattern(bins.ToArray()); SmartPickPatterns[lines] = pattern; return(pattern); }
public void LegsPowerIsSeventyFive() { // Arrange var legs = new Legs(); // Act var power = legs.Power(); // Assert Assert.Equal(75, power); }
public ActionResult Create([Bind(Include = "LegsId,Picure,Instructions,Benefits,Sets")] Legs legs) { if (ModelState.IsValid) { db.Legs.Add(legs); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(legs)); }
public override double CalculateMaxLose() { MaxLose = Legs.Sum((leg) => leg.CalculateFinalProfit(Put.StrikePrice)); if (MaxLose > 0) { throw new Exception("Bear Spread 的最大损失不应大于0"); } return(MaxLose); }
/// <summary> /// Gets the leg after the specified leg. /// </summary> /// <param name="leg">leg</param> /// <returns>The next leg, or null if this is the last leg.</returns> internal Leg NextLeg(Leg leg) { for (var it = Legs.GetEnumerator(); it.MoveNext();) { if (it.Current.sameValueAs(leg)) { return(it.MoveNext() ? it.Current : null); } } return(null); }
public override UnitState FixedUpdate() { var logicLookDirection = GetLogicVector(Parameters.LookLogicDirection); Torso.TurnTowards(logicLookDirection); Torso.AimAt(Parameters.AimAtDirection); ManageReachingLegsTurnDirection(logicLookDirection, logicLookDirection); Legs.StraightenUp(); Torso.StraightenUp(); return(this); }
public float GetSpeed() { Legs legsPart = legs.part as Legs; if (legsPart == null) { return(0.0f); } else { return(legsPart.speed); } }
public LegData(Legs legPos, GameObject gameObject, float angleRange, float startMaxRange, float arctanRotation) { this.legPos = legPos; this.gameObject = gameObject; this.currentAngle = gameObject.transform.localEulerAngles.z; this.angleLimits = new Vector2(currentAngle - angleRange / 2.0F, currentAngle + angleRange / 2.0F); this.startMaxRange = startMaxRange; this.arctanRotation = arctanRotation; this.lr = gameObject.GetComponent <LineRenderer>(); this.spring = null; originalLocalPos = gameObject.transform.localPosition; }
public void LoadAll() { Floors.LoadAll(); Items.LoadAll(); Creatures.LoadAll(); Templates.LoadAll(); Animations.LoadAll(); Heads.LoadAll(); Chests.LoadAll(); Legs.LoadAll(); Arms.LoadAll(); Weapons.LoadAll(); Shields.LoadAll(); }
// GET: Legs/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Legs legs = db.Legs.Find(id); if (legs == null) { return(HttpNotFound()); } return(View(legs)); }
public void AddLegs(Legs legs) { if (this.legs.part == null) { this.legs.part = legs; body.transform.localPosition += new Vector3(0, legs.height, 0); legs.gameObject.SetActive(true); legs.AddToRobot(this); } else { legs.gameObject.SetActive(false); } }
public void Walk(int numberOfSteps) { switch (Head.HeadGear) { case Hair hair: Console.WriteLine($"{Name} tossed his {hair.Length} {hair.Color} hair in the wind."); break; case Helmet helmet: Console.WriteLine($"{Name} wondered why he is wearing a {helmet.Color} helmat. He is just going on a walk."); break; } Legs.Walk(numberOfSteps); }
public bool GetApplyCommissionToBuy(int commoditySellID, int commodityBuyID) { if (Legs.Count > 0) { if (IsBuy) { return(Legs.Where(l => l.CommodityID == commoditySellID).Single().Leg.ApplyCommissionToBuy); } else { return(Legs.Where(l => l.CommodityID == commodityBuyID).Single().Leg.ApplyCommissionToBuy); } } return(Ask.ApplyCommissionToBuy); }
public double?GetBuyRatio(int sellID, int buyId) { if (Legs.Count > 0) { var leg = IsBuy ? Legs.Where(l => l.CommodityID == sellID).SingleOrDefault() : Legs.Where(l => l.CommodityID == buyId).SingleOrDefault(); if (leg != null) { return((double)leg.SellRatio / (double)leg.BuyRatio); } } else if (SellRatio != null && BuyRatio != null) { return((double)SellRatio / BuyRatio); } return(null); }
public BearSpread(Position Leg1, Position Leg2) { Legs.Add(Leg1); Legs.Add(Leg2); Strategy = ComboStrategy.BearSpread; if (VaildateSameSymbol() && VaildateBearSpread()) { IsVaildated = true; } else { IsVaildated = false; } }
void Awake() { legs = GetComponent<Legs>(); }
public override void DTRMStart() { attack = GetComponent<Attack>(); legs = GetComponent<Legs>(); vision = GetComponent<Vision>(); }
public HabboFigure SetLegs(Legs value) { _legs = value; return this; }
public void Init(Legs legs,Grid grid) { base.Init(legs); this.grid = grid; }
public void Init(Legs legs) { weight = 1.0f; internal_weight = 1.0f; this.legs = legs; }