public ChartScrollIntoView() { InitializeComponent(); maxvalue = InsectData.getMaxValue(); this.numericYAxis.MaximumValue = maxvalue + 10; YAxisScrollSlider.Maximum = maxvalue + 10; this.DataChart.Loaded += OnChartLoaded; this.XAxisScrollSlider.ValueChanged += OnXAxisScrollSliderChanged; this.YAxisScrollSlider.ValueChanged += OnYAxisScrollSliderChanged; this.BubbleDataListBox.SelectionChanged += OnBubbleDataListBoxSelectionChanged; }
private void SpawnInsects(int count, Hand hand) { GameObject original = this.m_Prefabs[this.m_Type]; for (int i = 0; i < count; i++) { BIWoundSlot woundSlot = BodyInspectionController.Get().GetWoundSlot((hand != Hand.Right) ? InjuryPlace.LHand : InjuryPlace.RHand, InjuryType.Leech, null); if (!woundSlot) { break; } InsectData insectData = new InsectData(); insectData.m_Insect = UnityEngine.Object.Instantiate <GameObject>(original, woundSlot.transform.position, woundSlot.transform.rotation); insectData.m_Slot = woundSlot; insectData.m_Hand = hand; this.m_Insects.Add(insectData); } }
public NumericDataSample() { List <int> list = InsectData.getDate(); string name = InsectData.getName(); List <double> values = InsectData.getData(name); for (int i = 0; i < list.Count; i++) { NumericDataPoint ndp = new NumericDataPoint(); ndp.X = list[i]; ndp.Y = values[i]; this.Add(ndp); } int index = 0; foreach (NumericDataPoint dataPoint in Items) { dataPoint.Index = index++; } }
public override bool Run() { try { InsectData data; Route r = Actor.RoutingComponent.CreateRoute(); r.PlanToPointRadialRange(Target.Position, 0f, InsectJig.sMaxCatchRange, RouteDistancePreference.PreferNearestToRouteDestination, RouteOrientationPreference.TowardsObject, Target.LotCurrent.LotId, null); try { if (!Actor.RoutingComponent.DoRoute(r) || Target.InUse) { return(false); } } catch (ResetException) { throw; } catch (Exception e) { Common.DebugException(Actor, Target, e); return(false); } mDummyIkJig = GlobalFunctions.CreateObjectOutOfWorld("SocialJigOnePerson") as SocialJigOnePerson; mDummyIkJig.SetForward(Actor.ForwardVector); mDummyIkJig.SetPosition(Actor.Position); mDummyIkJig.SetHiddenFlags(~HiddenFlags.Nothing); mDummyIkJig.AddToWorld(); StandardEntry(); BeginCommodityUpdates(); bool succeeded = false; try { if (InsectData.sData.TryGetValue(Target.InsectType, out data)) { mTempInsect = Sims3.Gameplay.Objects.Insect.Insect.Create(Target.InsectType); string jazzInsectParameterName = data.GetJazzInsectParameterName(); string jazzEnterStateName = data.GetJazzEnterStateName(); float catchChance = data.CatchChance; InsectRarity rarity = data.Rarity; data = null; mCurrentStateMachine = InsectData.AcquireInitAndEnterStateMachine(Actor, mTempInsect, mDummyIkJig, jazzInsectParameterName, jazzEnterStateName); if (mCurrentStateMachine != null) { Collecting collecting = Actor.SkillManager.AddElement(SkillNames.Collecting) as Collecting; if (collecting.IsBeetleCollector()) { succeeded = true; } else { succeeded = RandomUtil.RandomChance01(catchChance); } AnimateSim(succeeded ? "ExitSuccess" : "ExitFailure"); if (succeeded) { InsectTerrarium.Create(Target, Actor); } else { ReactionTypes reactionType = RandomUtil.CoinFlip() ? ReactionTypes.Annoyed : (RandomUtil.CoinFlip() ? ReactionTypes.Shrug : ReactionTypes.Angry); Actor.PlayReaction(reactionType, ReactionSpeed.NowOrLater); } } } } finally { EndCommodityUpdates(succeeded); } StandardExit(); DestroyObject(Target); return(succeeded); } catch (ResetException) { throw; } catch (Exception e) { Common.Exception(Actor, Target, e); return(false); } }
public ValueOverlays() { InitializeComponent(); maxvalue = InsectData.getMaxValue(); this.numericYAxis.MaximumValue = maxvalue + 10; }