查看: 603|回复: 0
打印 上一主题 下一主题

[求助] 关于命名空间和getComponent

[复制链接]

12

主题

6

回帖

17

积分

服务器开发者

UID
8280325
小麦
0
金锭
40
下界之星
0
跳转到指定楼层
楼主
发表于 2020-12-27 18:58:44 来自手机 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式 IP:浙江
        def OnProjectileDoHitEffectEvent(self, args):
                type = args["hitTargetType"]
                entityId = args["id"]
                basecomponent = serverApi.GetComponent(entityId,"muffinhead","custom_arrow")
                if basecomponent != None:
                        if type == "BLOCK":
                                self.DestroyEntity(entityId)
                                print "1"
                else:
                        basecomponent = serverApi.GetComponent(entityId,"muffinhead","custom_arrow")
                        print basecomponent


这里是get实体  实体ID有了 命名空间和名字 我配置文件写的是
identifier:muffinhead:custom_arrow
为什么这个一直输出None  

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

返回顶部