iT邦幫忙

2025 iThome 鐵人賽

0
自我挑戰組

從零開始做出我的第一款 Unity 遊戲系列 第 10

DAY10-讓角色動起來(1)

  • 分享至 

  • xImage
  •  

1.創建腳本
點選要移動的角色並在inspectory的最下方點選add component
https://ithelp.ithome.com.tw/upload/images/20251019/20178853WEpVTCIPgE.png

https://ithelp.ithome.com.tw/upload/images/20251019/20178853HNf5vHcGCc.png

點回右下角assets就能看到剛剛創建好的腳本了
https://ithelp.ithome.com.tw/upload/images/20251019/20178853XHpOTv44e8.png
點開後就能看到剛剛創建的Snack了
https://ithelp.ithome.com.tw/upload/images/20251019/20178853R0NIUczPoF.png
2.測試
先輸入這串程式碼,輸入完後按command+5儲存,看unity是否能跑的動
https://ithelp.ithome.com.tw/upload/images/20251019/20178853aIG6QQ8IQz.png
如果按w後,底下的console有出現這行字代表完成
https://ithelp.ithome.com.tw/upload/images/20251019/20178853E7tK9SDgnx.png


上一篇
DAY9-下載Visual Studio編程工具(2)
下一篇
DAY11-讓角色動起來(2)
系列文
從零開始做出我的第一款 Unity 遊戲21
圖片
  熱門推薦
圖片
{{ item.channelVendor }} | {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言