[Unity][Crowd]学习人群模拟资源分享以及相关的问题
?
人群行為模擬--超市模擬
內(nèi)容來源參考資料3,僅供學(xué)習(xí)。
項(xiàng)目描述:藍(lán)色實(shí)體表示行人的數(shù)量,紅色實(shí)體表示扒手小偷的數(shù)量,綠色表示 超級英雄的數(shù)量。
藍(lán)色行人在逛商場,紅色扒手對藍(lán)色行人進(jìn)行偷竊,紅色扒手有可能 對藍(lán)色行人 進(jìn)行攻擊。
綠色超級英雄(見義勇為)會從 藍(lán)色行人 中 誕生,當(dāng)?綠色超級英雄(見義勇為)發(fā)現(xiàn) 紅色扒手小偷的時候,就會從藍(lán)色行人 變成綠色超級英雄,并且與紅色扒手小偷進(jìn)行戰(zhàn)斗。
藍(lán)色行人產(chǎn)生恐慌,就變成 黑色,逃離商場。
?
由于項(xiàng)目工程的版本落后,使用Unity 2018.2.18f1 (64-bit)打開,出現(xiàn)的問題。
?
打開場景mall之后出現(xiàn)的問題
Assets/Plugins/BehaviourMachine/Sample Scenes/7 - Games/Roll-a-Ball/Move.cs(16,23): error CS1061: Type `UnityEngine.Component' does not contain a definition for `AddForce' and no extension method `AddForce' of type `UnityEngine.Component' could be found. Are you missing an assembly reference?
?
?
Assets/Plugins/BehaviourMachine/Sample Scenes/7 - Games/Roll-a-Ball/ProcessTrigger.cs(24,23): error CS1061: Type `UnityEngine.Component' does not contain a definition for `Play' and no extension method `Play' of type `UnityEngine.Component' could be found. Are you missing `UnityEngine.Playables' using directive?
?
...audio.Play();//改為GetComponent<AudioSource>().Play();//或者改為this.GetComponent<AudioSource>().Play(); ...?
?
?
項(xiàng)目文件參考資料1,下載地址 參考資料2
?
?
參考資料:
1.https://bitbucket.org/fdhalluin/epita_pfee_2014_crowdbehavior/src/master/
2.https://bitbucket.org/fdhalluin/epita_pfee_2014_crowdbehavior/downloads/
3.Crowd Behavior - Mall Simulation
4.
?
?
總結(jié)
以上是生活随笔為你收集整理的[Unity][Crowd]学习人群模拟资源分享以及相关的问题的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: VC中常见的108个问题
- 下一篇: 使用NPOI导出Excel模板