void InsertAnimation() { if (State == 1) { transform.localRotation = Quaternion.Slerp(RotA, RotB, Time / MaxTime); transform.localPosition = Vector3.Lerp(PosA, PosB, Time / MaxTime); Time += UnityEngine.Time.deltaTime; if (Time >= MaxTime) { State++; Time = 0; } } else if (State == 2) { transform.localPosition = Vector3.Lerp(PosB, PosC, Time / MaxTime); Time += UnityEngine.Time.deltaTime; if (Time >= MaxTime) { State++; Time = 0; } } else if (State == 3) { DX8.dx8 dx8 = GameObject.Find("DX8").GetComponent <DX8.dx8>(); dx8.SetEjectButton(true); dx8.UI_InsertFloppy(Path); State++; Direction = 0; } }
void Check() { if (Input.GetMouseButtonUp(0) == false) { return; } Vector2 mp = Input.mousePosition; int x = (int)mp.x, y = Screen.height - (int)mp.y; x /= Scale; y /= Scale; if (Mode == PauseMode.Welcome) { for (int i = 0; i < welcomeHitboxes.Count; i++) { int id = welcomeHitboxes[i].Mouse(x, y); if (id != 0) { Action(id); return; } } } else { for (int i = 0; i < tabHitBoxes.Count; i++) { int id = tabHitBoxes[i].Mouse(x, y); if (id != 0) { Action(id); return; } } if (Mode == PauseMode.Options) { for (int i = 0; i < optionBoxes.Count; i++) { int id = optionBoxes[i].Mouse(x, y); if (id != 0) { Action(id); return; } } } else if (Mode == PauseMode.Disks) { if (DX8.FloppySensor.IsEmpty == true) { foreach (var floppy in DX8.Floppys) { if (CheckMp(x, y, floppy.UI_X0, floppy.UI_Y0, floppy.UI_X1, floppy.UI_Y1)) { floppy.WarpFloppy(DX8.FloppySensor); DX8.UI_InsertFloppy(floppy.Path); IsDirty = true; if (DX8.PowerIsOn == false) { DX8.UI_Power(); } DX8.TogglePaused(); return; } } } } } }