public override void StartSimulation() { base.StartSimulation(); allomancer = GetComponentInChildren <NonPlayerPushPullController>(); coin = GetComponentInChildren <Magnetic>(); coinWall = transform.Find("CoinWall").GetComponent <Rigidbody>(); alloWall = transform.Find("AlloWall").GetComponent <Rigidbody>(); counter = 0; cleared = false; allomancer.PushTargets.MaxRange = -1; allomancer.AddPushTarget(coin); texts = HUDSimulations.CoinWall.GetComponentsInChildren <Text>(); texts[texts.Length - 8].text = "Wall: " + TextCodes.LightBlue("Anchored"); texts[texts.Length - 7].text = "Allomancer: " + TextCodes.Gray("Unanchored"); texts[texts.Length - 6].text = "Coin: " + TextCodes.Gray("Unanchored"); texts[texts.Length - 5].text = "Wall: " + TextCodes.LightBlue("Anchored"); if (SettingsMenu.settingsData.anchoredBoost == 1) { texts[texts.Length - 4].text = "Allomantic Normal Force"; //Time.timeScale = 1f; } else if (SettingsMenu.settingsData.anchoredBoost == 2) { texts[texts.Length - 4].text = "Exponential w/ Velocity factor"; //Time.timeScale = 1f; } else { texts[texts.Length - 4].text = "Distributed Power"; //Time.timeScale = .2f; } // This is what messes up the DP's energy distribution //Time.fixedDeltaTime = Time.timeScale * 1 / 60f; if (SettingsMenu.settingsData.forceDistanceRelationship == 0) { texts[texts.Length - 9].text = "Linear Distance Relationship"; } else if (SettingsMenu.settingsData.forceDistanceRelationship == 1) { texts[texts.Length - 9].text = "Inverse Square Distance Relationship"; } else if (SettingsMenu.settingsData.forceDistanceRelationship == 2) { texts[texts.Length - 9].text = "Exponential w/ Distance Relationship"; } texts[texts.Length - 3].text = "Time scale: " + HUD.RoundStringToSigFigs(Time.timeScale); texts[texts.Length - 2].text = "Allomancer mass: " + allomancer.Mass + "kg"; texts[texts.Length - 1].text = "Coin mass: " + coin.MagneticMass + "kg"; }
private void Start() { allomancer = GetComponentInChildren <NonPlayerPushPullController>(); allomancer.Strength = 1f; allomancer.PullTargets.MaxRange = distanceThresholdPulling; allomancer.IronBurnPercentageTarget = 1; rb = GetComponentInChildren <Rigidbody>(); anim = GetComponent <Animator>(); harmonySphere = rb.GetComponent <Transform>(); cameraPositionTarget = transform.GetChild(0).GetChild(0); inner = transform.GetChild(1); outerLeft = transform.GetChild(2); outerRight = transform.GetChild(3); cameraLookAtTarget = inner.GetChild(0); symbolRenderers = GetComponentsInChildren <Renderer>(); harmonySphere.gameObject.AddComponent <HarmonySphere>(); playerHasEntered = false; controllingPlayer = false; zeroRotation = transform.rotation; }
void Start() { anim = GetComponent <Animator>(); spike = GetComponentInChildren <NonPlayerPushPullController>(); spikeRb = spike.GetComponent <Rigidbody>(); spikeTarget = spike.transform.parent; SpikeSpline[] splines = GetComponentsInChildren <SpikeSpline>(); splineDragging = splines[0]; splineReturnHome = splines[1]; spike.LinesAreVisibleWhenNotBurning = true; facingPlayer = false; tracingPlayer = false; chasingPlayer = false; spikingPlayer = false; tracingPath = false; releasingPlayer = false; returningHome = false; startTime = 0; slerpTime = 0; slerpTimeRotation = 0; progress = 0; }
public override void StartSimulation() { base.StartSimulation(); allomancerTop = transform.Find("AllomancerTop").GetComponent <NonPlayerPushPullController>(); coinTop = transform.Find("CoinTop").GetComponentInChildren <Magnetic>(); allomancerBottom = transform.Find("AllomancerBottom").GetComponent <NonPlayerPushPullController>(); coinBottom = transform.Find("CoinBottom").GetComponentInChildren <Magnetic>(); counter = 0; groundHeight = transform.Find("CoinWall").transform.position.y + .5f; allomancerTop.PushTargets.MaxRange = -1; allomancerTop.AddPushTarget(coinTop); allomancerTop.SteelBurnPercentageTarget = 1; allomancerBottom.PushTargets.MaxRange = -1; allomancerBottom.AddPushTarget(coinBottom); allomancerBottom.SteelBurnPercentageTarget = 1; texts = HUDSimulations.CoinGround.GetComponentsInChildren <Text>(); if (SettingsMenu.settingsData.anchoredBoost == 1) { texts[texts.Length - 6].text = "Allomantic Normal Force"; } else if (SettingsMenu.settingsData.anchoredBoost == 2) { texts[texts.Length - 6].text = "Exponential w/ Velocity factor"; switch (SettingsMenu.settingsData.exponentialWithVelocitySignage) { case 0: { texts[texts.Length - 5].text = "Relationship 1 (Both Directions Decrease)"; break; } case 1: { texts[texts.Length - 5].text = "Relationship 2/3 (Moving Towards Decreases)"; break; } case 2: { texts[texts.Length - 5].text = "Relationship 3/4 (Moving Away Decreases)"; break; } case 3: { texts[texts.Length - 5].text = "Relationship 6/7 (Symmetrical)"; break; } } } else if (SettingsMenu.settingsData.anchoredBoost == 3) { texts[texts.Length - 6].text = "Distributed Power"; } else { texts[texts.Length - 6].text = "No Anchored Boost"; } if (SettingsMenu.settingsData.forceDistanceRelationship == 0) { texts[texts.Length - 4].text = "Linear Distance"; } else if (SettingsMenu.settingsData.forceDistanceRelationship == 1) { texts[texts.Length - 4].text = "Inverse Square Distance"; } else if (SettingsMenu.settingsData.forceDistanceRelationship == 2) { texts[texts.Length - 4].text = "Exponential w/ Distance"; } texts[texts.Length - 3].text = "Time scale: " + HUD.RoundStringToSigFigs(Time.timeScale); texts[texts.Length - 2].text = "Allomancer mass: " + allomancerTop.Mass + "kg"; texts[texts.Length - 1].text = "Coin mass: " + coinTop.MagneticMass + "kg"; }