From dffafe98df846a8bbe7ac708e8e55a573a65d55a Mon Sep 17 00:00:00 2001 From: xzb <223@qq.com> Date: Tue, 19 Dec 2023 11:13:01 +0800 Subject: [PATCH] =?UTF-8?q?iscs=20=20ecs=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fi/iscs_bas.go | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/fi/iscs_bas.go b/fi/iscs_bas.go index 130e7ea..d6bff8f 100644 --- a/fi/iscs_bas.go +++ b/fi/iscs_bas.go @@ -8,29 +8,6 @@ import ( "joylink.club/rtsssimulation/entity" ) -// DeviceHandTagOperate 设备设置手型图标操作 -func DeviceHandTagOperate(w ecs.World, deviceId string, hand bool) error { - r := <-ecs.Request[ecs.EmptyType](w, func() ecs.Result[ecs.EmptyType] { - wd := entity.GetWorldData(w) - deviceEntry, ok := wd.EntityMap[deviceId] - if !ok { - return ecs.NewErrResult(fmt.Errorf("设备[%s]实体不存在", deviceId)) - } - if hand { - if !deviceEntry.HasComponent(component.HandTag) { - deviceEntry.AddComponent(component.HandTag) - } - } else { - if deviceEntry.HasComponent(component.HandTag) { - deviceEntry.RemoveComponent(component.HandTag) - } - } - // - return ecs.NewOkEmptyResult() - }) - return r.Err -} - // CommonFanOperate 一般风机控制,如排烟风机、正压送风机、射流风机、普通风机、硬线风机 // // power : 风机电源,大于0接通正转相序电源,小于0接通反转相序电源,等于0关闭电源