using System.Collections; using UnityEngine; namespace GrassCutter { public partial class DemoBot { /// /// -demofix: close looks at the base furniture people asked about: a deck ladder where it meets the railing, the hay /// bale on the deck, the foot of the loading ramp and the back of the upgrade console. /// IEnumerator FixLook() { BotCapture.From = null; yield return new WaitForSeconds(2f); TeamState.DeleteSave(); NetSession.Instance.HostLocal(); while (!Me || !Ts) yield return null; yield return new WaitForSeconds(4f); Me.SetFlying(true); var spots = new (string name, Vector3 eye, Vector3 at)[] { ("fix_ladder_a", new Vector3(-1.5f + 0.0f, 1.2f, 0f), new Vector3(-1.5f, 0.2f, 9f)), ("fix_ladder_b", new Vector3(-0.5f, 0.6f, 12f), new Vector3(-1.5f, 0.3f, 9f)), ("fix_ladder_c", new Vector3(-3.5f, 1.8f, 11.5f), new Vector3(-1.5f, 0f, 9f)), ("fix_ladder_d", new Vector3(-1.5f, -0.6f, 10.5f), new Vector3(-1.5f, 0.9f, 9f)), ("fix_hay", new Vector3(5.5f, 1.4f, -5.2f), new Vector3(7.8f, 0.2f, -7.6f)), ("fix_hay_side", new Vector3(10.5f, 0.3f, -7.6f), new Vector3(7.8f, 0.1f, -7.6f)), ("fix_yard", new Vector3(0f, 2.2f, -9f), new Vector3(0f, -1.2f, -20f)), ("fix_yard_low", new Vector3(-6f, 0f, -14f), new Vector3(0f, -1.2f, -20f)), ("fix_console_back", new Vector3(8.0f, 1.6f, -1.5f), new Vector3(6.2f, 1.4f, -1.5f)), ("fix_console_back2", new Vector3(7.8f, 1.9f, -0.2f), new Vector3(6.2f, 1.5f, -1.5f)), ("fix_console_front", new Vector3(4.4f, 1.6f, -1.5f), new Vector3(6.2f, 1.3f, -1.5f)), }; foreach (var s in spots) { Me.Teleport(s.eye - Vector3.up * 1.6f); yield return new WaitForSeconds(0.6f); Me.LookAt(s.at); yield return new WaitForSeconds(0.6f); yield return Shot(s.name); } Log("demofix done"); Application.Quit(); } } }