03 2024 档案

摘要:using System.Collections; using System.Collections.Generic; using UnityEngine; public class ModuleManage : MonoBehaviour { private static ModuleManage 阅读全文
posted @ 2024-03-26 16:23 WalkingSnail 阅读(8) 评论(0) 推荐(0) 编辑
摘要:第一种: ScreenCapture.CaptureScreenshot 优点:简单、快速的截取某一帧的画面,全屏截图。 缺点:不能针对某个摄像机截图,不能定制大小截图。 代码如下: using System.Collections; using System.Collections.Generic 阅读全文
posted @ 2024-03-18 14:40 WalkingSnail 阅读(283) 评论(0) 推荐(0) 编辑
摘要:时间戳场景:报一串数字,当听到数字“1”敲一下桌子,需要将敲桌子的时间戳与开始读语音的时间戳的差值给到服务端。后端实现念到数字1时,ui有闪动的效果 代码如下: using System.Collections; using System.Collections.Generic; using Uni 阅读全文
posted @ 2024-03-16 16:21 WalkingSnail 阅读(95) 评论(0) 推荐(0) 编辑
摘要:方案一: using System; using UnityEngine; public class TimeTest : MonoBehaviour { DateTime startTime; private void Start() { //获取开始时的时间 startTime = DateTi 阅读全文
posted @ 2024-03-13 15:56 WalkingSnail 阅读(34) 评论(0) 推荐(0) 编辑
摘要:1.正规表达式:System.Text.RegularExpressions.Regex.Replace(str, "([ ]+)", "") -- str是输入或要检测的字符串。 正则表达式方法Regex.Replace()和匹配符\s(匹配任何空白字符,包括空格,制表符,换页符等,与[\f\n\ 阅读全文
posted @ 2024-03-13 15:39 WalkingSnail 阅读(685) 评论(0) 推荐(0) 编辑
摘要://第一种方法、将字符串中最后一个元素","逗号去掉, //str = str.substring(0, str.lastIndexOf(',')); //第二种方法、将字符串中最后一个元素","逗号去掉, //str = (str.substring(str.length - 1) == ',') 阅读全文
posted @ 2024-03-13 15:20 WalkingSnail 阅读(1203) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示