当前位置: 首页 > news >正文

小说网站设计模板苏州企业宣传片制作公司

小说网站设计模板,苏州企业宣传片制作公司,网上的网站模板怎么下载,建站63年来第一次闭站?北京站辟谣//在Ts、js中 this指向当前的这个组件实例 //this下的一个数据成员node#xff0c;指向组件实例化的这个节点 //同样也可以根据节点找到挂载的所有组件 //this.node 指向当前脚本挂载的节点//子节点与父节点的关系 // Node.parent是一个Node,Node.children是一个Node[] // th…//在Ts、js中 this指向当前的这个组件实例 //this下的一个数据成员node指向组件实例化的这个节点 //同样也可以根据节点找到挂载的所有组件 //this.node 指向当前脚本挂载的节点//子节点与父节点的关系 // Node.parent是一个Node,Node.children是一个Node[] // this.node.parent //等同于 console.warn(this.node.parent.name); // this.node.getParent() console.warn(this.node.getParent().name);// this.node.children this.node.children.forEach(element {console.log(子节点)console.log(element.name); });// 替换父节点 Node.parent /Node.setParent(XX) this.node.parent this.AddBtn; console.warn(this.node.parent.name) // this.node.setParent(value: Node) this.node.setParent(this.AddBtn); console.warn(this.node.getParent().name);//添加节点 使用预制的时候property(Node)AddBtn: Node null!;property(Prefab)sprite: Prefab null!; // addChild(child: Node) let tempNode: Node instantiate(this.sprite); // addChild有可能造成内存泄露尤其是加自己玩 this.node.addChild(tempNode); this.node.children.forEach(element {console.log(子节点);console.warn(element.name); }); // siblingIndex:设置位置等同于2.x的setIndex(index: number) // insertChild(child: Node, siblingIndex: number) this.node.insertChild(tempNode, 0); this.node.children.forEach(element {console.log(子节点);console.warn(element.name); }); // getSiblingIndex() // setSiblingIndex(index: number)//节点查找 find() //从1级节点开始查找 getChildByName(name: string)//下级节点 getChildByPath(path: string)//从下级节点开始算起往下找 // let node find(Canvas/Test); // console.log(node) // node this.node.getChildByName(Label) // node.getComponent(Label).string 哈哈; // // node this.node.getChildByName(Label)?.getChildByName(Label); //等同于下面这一个行代码 // node this.node.getChildByPath(Label/Label); // node.getComponent(Label).string ~哈哈~;//节点移除 removeFromParent() removeChild(child: this | Node) removeAllChildren() //节点判断 isChildOf(parent: this | Scene | null) isValid // let labelNode this.node.getChildByPath(Label/Label); // console.log(labelNode.isChildOf(this.node)) // 节点是否销毁 // console.log(this.node.isValid) //组件查找 //先找节点 再找节点上挂载的组件 // 我测试的结果挂的BoxCollider 查找Collider一样起效果 //根据类型来查找需要引入 getComponentT extends Component //根据名字来查找不需要引入 getComponent(className: string) getComponentsT extends Component getComponents(className: string) getComponentInChildrenT extends Component getComponentInChildren(className: string) getComponentsInChildrenT extends Component getComponentsInChildren(className: string) //添加移除组件 addComponentT extends Component addComponent(className: string) removeComponentT extends Component removeComponent(classNameOrInstance: string | Component) //销毁节点 destroy() destroyAllChildren() //事件监听 常用前两 on(type: string | NodeEventType, callback: Function, target?: unknown, useCapture?: boolean) //this.node.on(Input.EventType.TOUCH_MOVE, this.onTouch, this); off(type: string | NodeEventType, callback: Function, target?: unknown, useCapture?: boolean) //this.node.off(Input.EventType.TOUCH_MOVE, this.onTouch, this); once(type: string | NodeEventType, callback: Function, target?: unknown, useCapture?: boolean) //通常用非官方分装的EventListener.ts不用这些 emit(type: string, arg0?: any, arg1?: any, arg2?: any, arg3?: any, arg4?: any) dispatchEvent(event: Event) hasEventListener(type: string, callback?: Function, target?: unknown) targetOff(target: unknown) 有时候脑袋一热就问人家怎么样才能简简单单的组件化开发一款游戏怎么样才能合理的把你想要的功能代码化不知道问烦了几个家伙了经常回复我的就是那个节点有要求你就单独挂一个脚本你管它那么多干啥 有时间就学一下3.x就是没3D的素材至于为啥不透露了
http://www.w-s-a.com/news/154608/

相关文章:

  • 网站建设终稿确认书网站意义学校
  • 3小时网站建设平台专业制作教学课件
  • 曲阜网站建设百度开户现货黄金什么网站可以做直播
  • 比较好的企业建站平台小程序开发外包该注意些什么
  • 建行官网官网网站吗二次元风格wordpress模板
  • 怎样开通自己的网站网址导航哪个主页最好
  • 大良o2o网站建设详情页设计说明怎么写
  • 您与此网站之间建立的连接不安全汽车cms系统是什么意思
  • 有没有做logo的网站企业网站的内容营销
  • 哈尔滨做企业网站怎么做网站自动响应
  • 网站建设硬件和软件技术环境配置签约做网站模板
  • 教育网站建设的素材手机app制作流程
  • 免费行情软件网站大全下载网站备案查询
  • flex网站模板wordpress实时预览
  • 建设银行网站模板为什么企业要建设自己的企业文化
  • 网站建设必知免费手机网站建站系统
  • ssh可以做wap网站么嘉兴seo排名
  • 站内优化包括哪些帝国做企业网站
  • 做网站seo赚钱吗网络维护和故障维修
  • 企业网站可以自己做摄影网站开发背景怎么写
  • 网站百度指数seo最好的工具
  • 宝安专业网站建设推荐设计感强的网站
  • 网站建设 6万元北京知名的品牌设计公司
  • 网站建设的总体需求是什么vmware 下wordpress
  • 光谷网站建设请检查网络
  • 申请建设网站的报告书商务网站开发课程体会
  • 网站开发实训总结致谢群晖wordpress设置
  • 关于酒店网站建设的摘要天津市建设工程信息网官网首页
  • 网站alexa排名查询手机网站制作器
  • 建设小辣猫的网站电子毕业设计网站建设