// Update is called once per frame public override void Update() { if (Application.loadedLevel == 3) { if (!NewStart) { FleetariMonoGo = new GameObject(); Mono = FleetariMonoGo.AddComponent <FleetariTowingMono>(); Mono.StartCoroutine(GetGameobjects()); NewStart = true; } RayCastPlayer(); CheckPlayerBrochureDistance(); } if (Application.loadedLevel != 3) { ResetMod(); } if (Input.GetKeyDown(KeyCode.Alpha0)) { var writer = new StreamWriter("REPAIRSHOPEVENTS.txt"); writer.Close(); } }
//Reset mod in menu internal void ResetMod() { //Objects HandUseTexture = null; Mono = null; OriginalJoint = null; Player = null; TowingPaper = null; //Bool DeliveryInProgress = false; CheckBoxSatsumaExtraEnabled = false; ShowTowInProgressLabel = false; ShowNoMoneyLabel = false; ShowTowMenu = false; ShowMouse = false; ShowGui = false; BrouchureFound = false; GetGameoobjects = false; FindPlayer = false; NewStart = false; }