我的Go+语言初体验——【三、spx案例测试_许式伟先生推荐补充(附-视频)】

欢迎大家参与【我的Go+语言初体验】活动:

活动地址:【https://bbs.csdn.net/topics/603464006?utm_source=1594742339

安装过程博文:【我的Go+语言初体验——goplus环境问题锦集(一)_红目香薰-CSDN博客

安装过程视频:【GoPlus_Win10_红目香薰-CSDN直播

专栏路径:【https://blog.csdn.net/feng8403000/category_11496375.html

视频地址:【https://live.csdn.net/v/181609

B站地址:【https://www.bilibili.com/video/BV1i3411b7Nj/

本课程根据【许式伟】先生的指点说明,向大家推荐【tutorial】下的【Demo】,此类demo会对大家掌握【Go+的spx】会有很大的帮助。

目录

欢迎大家参与【我的Go+语言初体验】活动:

1、拉取【spx】测试内容

2、【tutorial】下的【Demo】运行

案例一、聊天气

3、编码分析

Jaime的对白编码:

kai的对白编码:

生成的【gop_autogen.go】文件分析


1、拉取【spx】测试内容

前置环境需要有【git】

git clone https://github.com/goplus/spx.git

拉取完成后请关闭当前【cmd】,无法再这个【cmd】内执行测试。

可能偶尔出现拉取失败,重试即可。

2、【tutorial】下的【Demo】运行

案例一、聊天气

3、编码分析

这个调用的是网络包看着名字是【七牛】的,也就是B栈那个。

七牛云的B栈主页:【七牛云的个人空间_哔哩哔哩_Bilibili】 

Jaime的对白编码:

onMsg "1", => {
	play recordingComeFrom
	say "I come from England.", 2
	broadcast "2"
}

onMsg "3", => {
	play recordingMild
	say "It's mild, but it's not always pleasant.", 4
	nextCostume
	play recordingEast
	say "The weather's often cold in the North and windy in the East.", 5.5
	play recordingSouth
	say "It's often wet in the West and sometimes warm in the South.", 5
	broadcast "4"
}

onMsg "5", => {
	nextCostume
	play recordingSummer
	say "I like spring and summer.", 2
	play recordingShort
	say "The days are long and the nights are short.", 3
	play recordingLate
	say "The sun rises early and sets late. ", 3
	nextCostume
	play recordingWinter
	say "I don't like autumn and winter.", 3
	play recordingLong
	say "The days are short and the nights are long.", 4
	play recordingEarly
	say "The sun rises late and sets early.", 4
	nextCostume
	play recordingInteresting
	say "Our climate is not very good, but it's certainly interesting.", 5
	play recordingConversation
	say "It's our favourite subject of conversation.", 4
	broadcast "6"
}

onMsg "7", => {
	play recordingBye
	say "Bye!", 2
	nextCostume
}

kai的对白编码:

onStart => {
	setCostume "kai-a"
	play recordingWhere
	say "Where do you come from?", 2
	broadcast "1"
}

onMsg "2", => {
	play recordingCountry
	say "What's the climate like in your country?", 3
	broadcast "3"
}

onMsg "4", => {
	play recordingBest
	say "Which seasons do you like best?", 3
	broadcast "5"
}

onMsg "6", => {
	play recordingBye2
	say "Thanks. Bye!", 2
	nextCostume
	broadcast "7"
}

生成的【gop_autogen.go】文件分析

 

后面的对白就是写死的了:

应该是为了让咱们更好理解吧,很直接。不过我还找到开启多线程的文档。

声音是在线生成的,不知道里面怎么调用的。

  • 1
    点赞
  • 0
    收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

红目香薰

你的鼓励将是我创作的最大动力

¥2 ¥4 ¥6 ¥10 ¥20
输入1-500的整数
余额支付 (余额:-- )
扫码支付
扫码支付:¥2
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值