本文主要是介绍骑砍2霸主MOD开发(12)-游戏实例GameEntity,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
一.GameEntity游戏实例
<1.通用GameEntity,梯子,椅子,攻城云梯,战车等定义为GameEntity,一个GameEntity由若干GameEntityComponets组成,例如攻城云梯的轮子是一个独立Component,支架是一个独立Component,
GameEntity = GameEntityComponent1 + GameEntityComponent2 +GameEntityComponent3
<2.定制化GameEntity-Agent
Agent.AgentVisuals = MeshComponent + ItemComponent + SkinedMeshComponent
获取AgentComponents
MBReadOnlyList<AgentComponent> list = Mission.MainAgent.Components;获取ItemComponents
Equipment equipment = Mission.MainAgent.SpawnEquipment;
EquipmentElement equipmentElement = equipment.GetEquipmentFromSlot(EquipmentIndex.Weapon2);获取Agent骨骼Skeleton
Skeleton skelton = Mission.MainAgent.AgentVisuals.GetSkeleton();获取AgentVisual对应components
GameEntityComponent com = Mission.MainAgent.AgentVisuals .GetEntity().GetComponentAtIndex(1, GameEntity.ComponentType.Light);添加GameEntity至Agent
sbyte b
这篇关于骑砍2霸主MOD开发(12)-游戏实例GameEntity的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!