15 if (bodyRaycastResult.HasValue) {
17 if (componentHealth ==
null
18 || componentHealth.
Health > 0f) {
19 string entityTemplateName = $
"{bodyRaycastResult.Value.ComponentBody.Entity.ValuesDictionary.DatabaseObject.Name}_Saddled";
39 base.Load(valuesDictionary);
virtual void RemoveActiveTool(int removeCount)
virtual object Raycast(Ray3 ray, RaycastMode mode, bool raycastTerrain=true, bool raycastBodies=true, bool raycastMovingBlocks=true, float? Reach=null)
发出射线检测,检测玩家点击到的目标
static Entity CreateEntity(Project project, SpawnEntityData spawnEntityData, bool throwIfNotFound)
override void Load(ValuesDictionary valuesDictionary)
override bool OnUse(Ray3 ray, ComponentMiner componentMiner)
override int[] HandledBlocks
SubsystemAudio m_subsystemAudio
Component FindComponent(Type type, string name, bool throwOnError)
ValuesDictionary ValuesDictionary
ComponentBody ComponentBody