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

如何在电子商务化平台上做企业网站推广免费邮箱注册入口

如何在电子商务化平台上做企业网站推广,免费邮箱注册入口,wordpress 评论框,分类信息网站系统ECS是一种软件架构模式#xff0c;就像MVC一样。ECS最早在游戏《守望先锋》中提及到的相关链接。ECS具体是指实体#xff08;entity#xff09;、 组件#xff08;component#xff09;和系统#xff08;system#xff09;#xff1a; 实体#xff1a;实体是一个ID就像MVC一样。ECS最早在游戏《守望先锋》中提及到的相关链接。ECS具体是指实体entity、 组件component和系统system 实体实体是一个ID它是一个唯一的标识符用于标识一个对象它本身不包含任何数据只是一个ID它的作用是用于标识一个对象它的数据是由组件来提供的。 组件组件是一个数据结构它包含了一些数据用于描述一个对象的属性组件是没有任何行为的它只是一个数据结构。 系统主要用户逻辑处理进行状态迁移。系统中不保留数据且是无状态的。 三者之间的关系如下图所示 ECS在unity中出现的原因 在使用unity开发的时候monobehaviour是我们最常用的然而monobehaviour中的update是基于gameobject去更新的且无序的这样很容易造成memory cache miss。而ECS是基于数据的它将具有相同Component组合的Entity放在一起这样可以更好的利用cache提高性能。 archetype 通过上面的图和介绍我们知道通过将不同的Component组合和Entity一起组成了GameOjbectComponent不同组合的唯一性在ECS中被称为archetype。在ECS中archetype是一个很重要的概念它是用来管理内存的每个archetype都有一个chunk列表chunk是一种内存管理方式。 上图中EntityA和EntityB具有相同的Component组合所以它们属于同一个Archetype M而EntityC具有不同的Component组合所以它们属于不同的Archetype N。 下图是一个chunk的内存排布 component在chunk中的排布. #mermaid-svg-dOLGdj5zBc8nNxlZ {font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-dOLGdj5zBc8nNxlZ .error-icon{fill:#552222;}#mermaid-svg-dOLGdj5zBc8nNxlZ .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-dOLGdj5zBc8nNxlZ .edge-thickness-normal{stroke-width:2px;}#mermaid-svg-dOLGdj5zBc8nNxlZ .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-dOLGdj5zBc8nNxlZ .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-dOLGdj5zBc8nNxlZ .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-dOLGdj5zBc8nNxlZ .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-dOLGdj5zBc8nNxlZ .marker{fill:#333333;stroke:#333333;}#mermaid-svg-dOLGdj5zBc8nNxlZ .marker.cross{stroke:#333333;}#mermaid-svg-dOLGdj5zBc8nNxlZ svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-dOLGdj5zBc8nNxlZ g.classGroup text{fill:#9370DB;fill:#131300;stroke:none;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:10px;}#mermaid-svg-dOLGdj5zBc8nNxlZ g.classGroup text .title{font-weight:bolder;}#mermaid-svg-dOLGdj5zBc8nNxlZ .nodeLabel,#mermaid-svg-dOLGdj5zBc8nNxlZ .edgeLabel{color:#131300;}#mermaid-svg-dOLGdj5zBc8nNxlZ .edgeLabel .label rect{fill:#ECECFF;}#mermaid-svg-dOLGdj5zBc8nNxlZ .label text{fill:#131300;}#mermaid-svg-dOLGdj5zBc8nNxlZ .edgeLabel .label span{background:#ECECFF;}#mermaid-svg-dOLGdj5zBc8nNxlZ .classTitle{font-weight:bolder;}#mermaid-svg-dOLGdj5zBc8nNxlZ .node rect,#mermaid-svg-dOLGdj5zBc8nNxlZ .node circle,#mermaid-svg-dOLGdj5zBc8nNxlZ .node ellipse,#mermaid-svg-dOLGdj5zBc8nNxlZ .node polygon,#mermaid-svg-dOLGdj5zBc8nNxlZ .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-dOLGdj5zBc8nNxlZ .divider{stroke:#9370DB;stroke:1;}#mermaid-svg-dOLGdj5zBc8nNxlZ g.clickable{cursor:pointer;}#mermaid-svg-dOLGdj5zBc8nNxlZ g.classGroup rect{fill:#ECECFF;stroke:#9370DB;}#mermaid-svg-dOLGdj5zBc8nNxlZ g.classGroup line{stroke:#9370DB;stroke-width:1;}#mermaid-svg-dOLGdj5zBc8nNxlZ .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5;}#mermaid-svg-dOLGdj5zBc8nNxlZ .classLabel .label{fill:#9370DB;font-size:10px;}#mermaid-svg-dOLGdj5zBc8nNxlZ .relation{stroke:#333333;stroke-width:1;fill:none;}#mermaid-svg-dOLGdj5zBc8nNxlZ .dashed-line{stroke-dasharray:3;}#mermaid-svg-dOLGdj5zBc8nNxlZ #compositionStart,#mermaid-svg-dOLGdj5zBc8nNxlZ .composition{fill:#333333!important;stroke:#333333!important;stroke-width:1;}#mermaid-svg-dOLGdj5zBc8nNxlZ #compositionEnd,#mermaid-svg-dOLGdj5zBc8nNxlZ .composition{fill:#333333!important;stroke:#333333!important;stroke-width:1;}#mermaid-svg-dOLGdj5zBc8nNxlZ #dependencyStart,#mermaid-svg-dOLGdj5zBc8nNxlZ .dependency{fill:#333333!important;stroke:#333333!important;stroke-width:1;}#mermaid-svg-dOLGdj5zBc8nNxlZ #dependencyStart,#mermaid-svg-dOLGdj5zBc8nNxlZ .dependency{fill:#333333!important;stroke:#333333!important;stroke-width:1;}#mermaid-svg-dOLGdj5zBc8nNxlZ #extensionStart,#mermaid-svg-dOLGdj5zBc8nNxlZ .extension{fill:#333333!important;stroke:#333333!important;stroke-width:1;}#mermaid-svg-dOLGdj5zBc8nNxlZ #extensionEnd,#mermaid-svg-dOLGdj5zBc8nNxlZ .extension{fill:#333333!important;stroke:#333333!important;stroke-width:1;}#mermaid-svg-dOLGdj5zBc8nNxlZ #aggregationStart,#mermaid-svg-dOLGdj5zBc8nNxlZ .aggregation{fill:#ECECFF!important;stroke:#333333!important;stroke-width:1;}#mermaid-svg-dOLGdj5zBc8nNxlZ #aggregationEnd,#mermaid-svg-dOLGdj5zBc8nNxlZ .aggregation{fill:#ECECFF!important;stroke:#333333!important;stroke-width:1;}#mermaid-svg-dOLGdj5zBc8nNxlZ .edgeTerminals{font-size:11px;}#mermaid-svg-dOLGdj5zBc8nNxlZ :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} Archetype ArchetypeChunkData Chunks; ComponentTypeInArchetype* Types; ArchetypeChunkData Chunk** p; Chunk 执行System unity会自己实例化system,system里的方法默认都在主线程执行可以通过一下几种方式来实现多线程 Entities.ForEachJob.WithCodeIJobEntityIJobEntityBatchC# Job System 各部分的创建 下面是一个简单的例子创建一个CustomSystem它会在每一帧中更新CustomData的值。ComponentData不一定要和MonoBehaviour一起使用它可以单独使用像一些CPU密集性的计算可以使用ComponentData来实现。下面的示例重点是为了说明各部分的创建过程从LaunchECS中可以发现仅仅使用了World中的EntityManager来创建了一个Entity系统的创建被注视掉了。这是因为unity会自己实例化system所以我们不需要手动创建system。 public class Custom : MonoBehaviour {private void Awake(){LaunchECS();}private void LaunchECS(){var world World.DefaultGameObjectInjectionWorld;world.EntityManager.CreateEntity(typeof(CustomData));// world.CreateSystemCustomSystem();} }public struct CustomData : IComponentData {public int Value; }public partial class CustomSystem : SystemBase {[BurstCompile]protected override void OnUpdate(){var timeElapsedTime World.Time.ElapsedTime;Entities.ForEach((ref CustomData customData) {customData.Value (int)(100 * math.sin(timeElapsedTime));}).ScheduleParallel();} }游戏制作 ECS的大致情况我们已经了解了那如何在项目中应用呢。下面是一个简单的例子我们创建一个Cube然后通过ECS来控制它的移动。 将下面的代码放到名叫MoveMono的cs文件中然后在场景中添加一个sub scene在sub scene中添加一个Cube然后添加一个MoveMono组件并设置Velocity的值。 运行后我们会发现Cube会按照我们设置的Velocity的值进行移动。 [GenerateAuthoringComponent] public struct MoveData : IComponentData {public float3 Velocity; }public partial class MoveSystem : SystemBase {[BurstCompile]protected override void OnUpdate(){var deltaTime World.Time.DeltaTime;Entities.ForEach((ref Translation translation, in MoveData moveData) {translation.Value moveData.Velocity * deltaTime;}).ScheduleParallel();} }上面代码中使用了GenerateAuthoringComponent这个属性将会自动生成一个名为MoveMono的MonoBehaviour所有虽然我们并没有显示的创建MoveMono但是我们可以给GameObject添加组件是可以看到MoveMono. 除了GenerateAuthoringComponent属性以外还有其他方式去将ComponentData和MonoBehaviour关联起来还可以有其他方式。我们将在后面的gameplay文章中介绍。
http://www.pierceye.com/news/506188/

相关文章:

  • 低价网站建设方案网站做框架
  • 企业网站建设平台的分析网站建设产品
  • 企业app定制开发设计方案win10系统优化
  • 网站开发需要逻辑吗线下编程课程收费标准
  • 网站的费用多少wordpress替换js为外部引用
  • 工业设备网站源码国家图书馆网站建设介绍
  • 南昌制作网站软件站长统计app软件
  • 商城网站建设公司哪家好上海环球金融中心简介
  • 肃宁县做网站价格wordpress获取站点标题
  • 公司做网站效果怎么样推荐网站建设话术
  • 邱县网站建设河北seo网络优化师
  • iis5.1怎么新建网站中国生意网
  • 教你做吃的网站厦门市集美区建设局网站
  • 电子商务网站建设需要青岛网站建设邓巴迪
  • 网站建设考虑的因素建设网站地图
  • 天津塘沽网站建设新网官方网站
  • 做本地团购网站国外产品网站
  • 湖北省两学一做网站国外浏览器app下载
  • 遵义网站建设公司巴彦淖尔市网站制作
  • 后台管理系统网站模板合作网站登录制作
  • 腾讯云网站备案流程seo优化实训总结
  • 那个网站有免费的模板wordpress首页模板文件
  • 阿里云主机可以放几个网站手机上自己设计广告的软件
  • 南通公司企业网站建设淘宝网店制作
  • 长沙网站建设推广太仓网站建设企业网站
  • 加强网站微信信息编辑队伍建设网站设计 北京店
  • 广州网站建设有限公司程序员入门先学什么
  • 资源下载类网站如何做外链北京有几家宽带网络公司
  • 个人网站要有什么网页设计与制作初学者教程
  • 宁波品牌网站建设芗城区建设局网站