Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

遇到的几个小问题 #83

Open
ck2739046 opened this issue Nov 10, 2024 · 0 comments
Open

遇到的几个小问题 #83

ck2739046 opened this issue Nov 10, 2024 · 0 comments

Comments

@ck2739046
Copy link

ck2739046 commented Nov 10, 2024

  1. 我在使用SDGA145懒人包+最新版aquamai mod,遇到了几个问题...
    我的代码水平好烂,仅供参考,所以没提pull request(((

  2. 开启1p_only后Test菜单的触摸测试无法使用
    似乎是singleplayer.cs的left.transform.position = Vector3.zero;的问题?

1.1 可以移动相机来修复 (copy from sdez135 dll)
Vector3 position = Camera.main.gameObject.transform.position;
Camera.main.gameObject.transform.position = new Vector3(position.x - 540f, position.y, position.z);
right.localScale = Vector3.zero;

1.2 或者可以将left transform向左偏移1f
left.transform.position = new Vector3(-1f, 0f, 0f);
right.localScale = Vector3.zero;
GameObject.Find("Mask").transform.position = new Vector3(539f, 0f, 0f);

  1. 打自制谱会上传aquanet,最近成绩显示未知歌曲
    因为我所有的自制谱都在同一个opt中,所以我在immediatesave.cs中添加了一段代码来防止指定opt的歌曲上传服务器
    //调整import
    using UserDetail = Manager.UserDatas.UserDetail;
    using UserRate = Manager.UserDatas.UserRate;
    using Net.VO.Mai2;
    //以下代码添加到PacketHelper.StartPacket()
    //Get current play song ID
    UserPlaylog playlog = userData.ExportUserPlaylog(i, (int)GameManager.MusicTrackNumber - 1);
    int current_song_ID = playlog.musicId;
    //Get song's opt number
    MusicData current_music = Singleton<DataManager>.Instance.GetMusic(current_song_ID);
    string opt_number = MusicDirHelper.LookupPath(current_music).Split('/').Reverse().ToArray()[3];
    //Print current play song info
    MelonLogger.Msg($"Track {GameManager.MusicTrackNumber}: ID {current_song_ID} from {opt_number}");
    //Check if in A066 (此处我图方便直接hardcode)
    if (opt_number == "A066") {
    MelonLogger.Msg("Skip upload this song to server");
    UnityEngine.Object.Destroy(ui);
    ui = null;
    return;
    }

  2. ESC关闭游戏后,主控没有正确关闭
    我在用seeed samd21主控的自制手台游玩,正常来说游戏退出时应该会发送{HALT}通知主控停止发送触摸数据,但是sdga退出时主控似乎没有收到停止信号...不知道能不能修复?(感觉不是重要的问题)
    作为参考,目前我在start.bat末尾添加了停止主控的代码以解决此问题
    :: send stop signal
    mode COM3: BAUD=9600 PARITY=N DATA=8 STOP=1
    echo {HALT} > COM3
    timeout /t 1 > nul
    mode COM3: dtr=off

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant