[Unity][Crowd]学习人群模拟资源分享以及相关的问题
人群行为模拟--超市模拟
内容来源参考资料3,仅供学习。
项目描述:蓝色实体表示行人的数量,红色实体表示扒手小偷的数量,绿色表示 超级英雄的数量。
蓝色行人在逛商场,红色扒手对蓝色行人进行偷窃,红色扒手有可能 对蓝色行人 进行攻击。
绿色超级英雄(见义勇为)会从 蓝色行人 中 诞生,当 绿色超级英雄(见义勇为)发现 红色扒手小偷的时候,就会从蓝色行人 变成绿色超级英雄,并且与红色扒手小偷进行战斗。
蓝色行人产生恐慌,就变成 黑色,逃离商场。
由于项目工程的版本落后,使用Unity 2018.2.18f1 (64-bit)打开,出现的问题。
打开场景mall之后出现的问题
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(); ...
项目文件参考资料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.
总结
以上是生活随笔为你收集整理的[Unity][Crowd]学习人群模拟资源分享以及相关的问题的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: VC中常见的108个问题
- 下一篇: 使用NPOI导出Excel模板