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

国外优秀企业网站模板培训方案怎么做

国外优秀企业网站模板,培训方案怎么做,网站的流量是什么意思,珠海十大网站建设公司这个工具主要是用于动态生成UI的情况。项目中我们通过配置UI的锚点、位置以及大小(位置、大小都是通过蓝湖看到的),然后通过代码动态生成UI。 大部分情况下只要合理设置锚点,那么生成出来的UI就已经满足了适配的要求。 using UnityEngine;public static…

这个工具主要是用于动态生成UI的情况。项目中我们通过配置UI的锚点、位置以及大小(位置、大小都是通过蓝湖看到的),然后通过代码动态生成UI。
大部分情况下只要合理设置锚点,那么生成出来的UI就已经满足了适配的要求。

using UnityEngine;public static class RectTransUtility
{/// <summary>/// 左上 (0.0, 1.0)/// </summary>public static readonly Vector2 TopLeftVector = new(0.0f, 1.0f);/// <summary>/// 上中 (0.5, 1.0)/// </summary>public static readonly Vector2 TopCenterVector = new(0.5f, 1.0f);/// <summary>/// 右上 (1.0, 1.0)/// </summary>public static readonly Vector2 TopRightVector = new(1.0f, 1.0f);/// <summary>/// 左中 (0.0, 0.5)/// </summary>public static readonly Vector2 MiddleLeftVector = new(0.0f, 0.5f);/// <summary>/// 中心 (0.5, 0.5)/// </summary>public static readonly Vector2 MiddleCenterVector = new(0.5f, 0.5f);/// <summary>/// 右中 (1.0, 0.5)/// </summary>public static readonly Vector2 MiddleRightVector = new(1.0f, 0.5f);/// <summary>/// 左下 (0.0, 0.0)/// </summary>public static readonly Vector2 BottomLeftVector = new(0.0f, 0.0f);/// <summary>/// 下中 (0.5, 0.0)/// </summary>public static readonly Vector2 BottomCenterVector = new(0.5f, 0.0f);/// <summary>/// 右下 (1.0, 0.0)/// </summary>public static readonly Vector2 BottomRightVector = new(1.0f, 0.0f);/// <summary>/// 设置位置与大小/// </summary>public static void SetRTPosition(RectTransform rt, ERectTransAnchor anchor_pivot, float x, float y, float width, float height){//设置锚点和轴心点SetRTAnchorAndPivot(rt, anchor_pivot);switch (anchor_pivot){case ERectTransAnchor.TopLeft:rt.SetInsetAndSizeFromParentEdge(RectTransform.Edge.Left, x, width);rt.SetInsetAndSizeFromParentEdge(RectTransform.Edge.Top, y, height);return;case ERectTransAnchor.TopCenter:rt.SetInsetAndSizeFromParentEdge(RectTransform.Edge.Top, y, height);rt.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, width);rt.anchoredPosition = new Vector2(x, rt.anchoredPosition.y);return;case ERectTransAnchor.TopRight:rt.SetInsetAndSizeFromParentEdge(RectTransform.Edge.Right, x, width);rt.SetInsetAndSizeFromParentEdge(RectTransform.Edge.Top, y, height);return;case ERectTransAnchor.MiddleLeft:rt.SetInsetAndSizeFromParentEdge(RectTransform.Edge.Left, x, width);rt.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, height);rt.anchoredPosition = new Vector2(rt.anchoredPosition.x, y);return;case ERectTransAnchor.MiddleCenter:rt.sizeDelta = new Vector2(width, height);rt.anchoredPosition = new Vector2(x, y);return;case ERectTransAnchor.MiddleRight:rt.SetInsetAndSizeFromParentEdge(RectTransform.Edge.Right, x, width);rt.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, height);rt.anchoredPosition = new Vector2(rt.anchoredPosition.x, y);return;case ERectTransAnchor.BottomLeft:rt.SetInsetAndSizeFromParentEdge(RectTransform.Edge.Left, x, width);rt.SetInsetAndSizeFromParentEdge(RectTransform.Edge.Bottom, y, height);return;case ERectTransAnchor.BottomCenter:rt.SetInsetAndSizeFromParentEdge(RectTransform.Edge.Bottom, y, height);rt.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, width);rt.anchoredPosition = new Vector2(x, rt.anchoredPosition.y);return;case ERectTransAnchor.BottomRight:rt.SetInsetAndSizeFromParentEdge(RectTransform.Edge.Right, x, width);rt.SetInsetAndSizeFromParentEdge(RectTransform.Edge.Bottom, y, height);return;}Debug.LogWarning("[RectTransUtility.SetRTPosition] 暂不支持的锚点类型!");}/// <summary>/// 设置锚点和轴心点/// </summary>public static void SetRTAnchorAndPivot(RectTransform rt, ERectTransAnchor anchor_pivot){switch (anchor_pivot){case ERectTransAnchor.TopLeft:rt.anchorMin = TopLeftVector;rt.anchorMax = TopLeftVector;rt.pivot = TopLeftVector;return;case ERectTransAnchor.TopCenter:rt.anchorMin = TopCenterVector;rt.anchorMax = TopCenterVector;rt.pivot = TopCenterVector;return;case ERectTransAnchor.TopRight:rt.anchorMin = TopRightVector;rt.anchorMax = TopRightVector;rt.pivot = TopRightVector;return;case ERectTransAnchor.MiddleLeft:rt.anchorMin = MiddleLeftVector;rt.anchorMax = MiddleLeftVector;rt.pivot = MiddleLeftVector;return;case ERectTransAnchor.MiddleCenter:rt.anchorMin = MiddleCenterVector;rt.anchorMax = MiddleCenterVector;rt.pivot = MiddleCenterVector;return;case ERectTransAnchor.MiddleRight:rt.anchorMin = MiddleRightVector;rt.anchorMax = MiddleRightVector;rt.pivot = MiddleRightVector;return;case ERectTransAnchor.BottomLeft:rt.anchorMin = BottomLeftVector;rt.anchorMax = BottomLeftVector;rt.pivot = BottomLeftVector;return;case ERectTransAnchor.BottomCenter:rt.anchorMin = BottomCenterVector;rt.anchorMax = BottomCenterVector;rt.pivot = BottomCenterVector;return;case ERectTransAnchor.BottomRight:rt.anchorMin = BottomRightVector;rt.anchorMax = BottomRightVector;rt.pivot = BottomRightVector;return;}Debug.LogWarning("[RectTransUtility.SetRTAnchorAndPivot] 暂不支持的锚点类型!");}/// <summary>/// 设置背景填充/屏幕填充/// </summary>/// <param name="self"></param>/// <param name="left">离左边的距离(距离为正)</param>/// <param name="bottom">离底部的距离(距离为正)</param>/// <param name="right">离右边的距离(距离为负)</param>/// <param name="top">离顶部的距离(距离为负)</param>/// <returns></returns>public static RectTransform BgFill(this RectTransform self, float left = 0f, float bottom = 0f, float right = 0f, float top = 0f){self.anchorMin = RectTransUtility.BottomLeftVector;self.anchorMax = RectTransUtility.TopRightVector;self.offsetMin = new Vector2(left, bottom);self.offsetMax = new Vector2(right, top);return self;}/// <summary>/// 锚点类型/// </summary>public enum ERectTransAnchor{/// <summary>/// 左上/// </summary>TopLeft = 0,/// <summary>/// 上中/// </summary>TopCenter = 1,/// <summary>/// 右上/// </summary>TopRight = 2,/// <summary>/// 左中/// </summary>MiddleLeft = 3,/// <summary>/// 中心/// </summary>MiddleCenter = 4,/// <summary>/// 右中/// </summary>MiddleRight = 5,/// <summary>/// 左下/// </summary>BottomLeft = 6,/// <summary>/// 下中/// </summary>BottomCenter = 7,/// <summary>/// 右下/// </summary>BottomRight = 8}
}

文章转载自:
http://strangulate.mcjp.cn
http://plangorous.mcjp.cn
http://driver.mcjp.cn
http://asymmetric.mcjp.cn
http://stage.mcjp.cn
http://opiumize.mcjp.cn
http://arguably.mcjp.cn
http://willies.mcjp.cn
http://brack.mcjp.cn
http://deliberative.mcjp.cn
http://telex.mcjp.cn
http://sagacity.mcjp.cn
http://inculpatory.mcjp.cn
http://anomalure.mcjp.cn
http://giggle.mcjp.cn
http://choreman.mcjp.cn
http://whizbang.mcjp.cn
http://rawboned.mcjp.cn
http://manipulable.mcjp.cn
http://matsudo.mcjp.cn
http://neurophysin.mcjp.cn
http://jura.mcjp.cn
http://cheeper.mcjp.cn
http://thumping.mcjp.cn
http://caitiff.mcjp.cn
http://nondurable.mcjp.cn
http://orthophoto.mcjp.cn
http://falcial.mcjp.cn
http://clairvoyant.mcjp.cn
http://thimbleful.mcjp.cn
http://rachel.mcjp.cn
http://autocoid.mcjp.cn
http://listee.mcjp.cn
http://latinize.mcjp.cn
http://nosepiece.mcjp.cn
http://lackluster.mcjp.cn
http://hendecahedral.mcjp.cn
http://linguaphone.mcjp.cn
http://perlocutionary.mcjp.cn
http://axially.mcjp.cn
http://devolutionist.mcjp.cn
http://priss.mcjp.cn
http://cdp.mcjp.cn
http://parathyroid.mcjp.cn
http://bolar.mcjp.cn
http://capsulated.mcjp.cn
http://informant.mcjp.cn
http://ascocarpous.mcjp.cn
http://celery.mcjp.cn
http://movieola.mcjp.cn
http://appositional.mcjp.cn
http://lama.mcjp.cn
http://bimbo.mcjp.cn
http://kwajalein.mcjp.cn
http://morton.mcjp.cn
http://artisan.mcjp.cn
http://gsm.mcjp.cn
http://tie.mcjp.cn
http://mavournin.mcjp.cn
http://varistor.mcjp.cn
http://puzzle.mcjp.cn
http://madhouse.mcjp.cn
http://microcosmic.mcjp.cn
http://federalization.mcjp.cn
http://hardback.mcjp.cn
http://madman.mcjp.cn
http://bluepencil.mcjp.cn
http://sticker.mcjp.cn
http://inculcation.mcjp.cn
http://polyphage.mcjp.cn
http://sailorman.mcjp.cn
http://farthermost.mcjp.cn
http://verbalist.mcjp.cn
http://pronged.mcjp.cn
http://lincolnite.mcjp.cn
http://siogon.mcjp.cn
http://hyperuricemia.mcjp.cn
http://beaded.mcjp.cn
http://recidivity.mcjp.cn
http://tenno.mcjp.cn
http://libellous.mcjp.cn
http://scillonian.mcjp.cn
http://brotherhood.mcjp.cn
http://gunflint.mcjp.cn
http://chlorenchyma.mcjp.cn
http://folly.mcjp.cn
http://nucleal.mcjp.cn
http://kermes.mcjp.cn
http://envenomate.mcjp.cn
http://overstaff.mcjp.cn
http://pulpiteer.mcjp.cn
http://kaf.mcjp.cn
http://fuliginosity.mcjp.cn
http://strombuliform.mcjp.cn
http://coproduce.mcjp.cn
http://disappointedly.mcjp.cn
http://gratulation.mcjp.cn
http://sharif.mcjp.cn
http://position.mcjp.cn
http://frailness.mcjp.cn
http://www.15wanjia.com/news/92161.html

相关文章:

  • 建设网站需要什么知识资讯门户类网站有哪些
  • 顺德网站建设教程seop
  • 长兴县网站建设怎么制作网页教程
  • 溧阳网站开发郑州百度seo网站优化
  • 如何创建自己的网站链接海外互联网推广平台
  • 网页设计作品我的家乡武汉网站营销seo方案
  • 实验室网站建设的调查报告西安百度推广联系方式
  • php网站开发说明文档五八精准恶意点击软件
  • 网站怎么优化关键词快速提升排名英文网站设计公司
  • 福建网站建设公司网站优化推广的方法
  • 网红营销论文seo索引擎优化
  • 用单页做网站 文章直接写上去 百度收录关键词吗足球联赛排名
  • 自己的网站怎么做app吗昆山网站制作哪家好
  • 网站建设金思扬网络如何用网站模板建站
  • wordpress下载站地推怎么做最有效
  • 制作网站的免费软件如何推广自己产品
  • 黑龙江新闻夜航湘潭seo优化
  • 建筑资格证书查询官网关键词优化排名费用
  • 代理加盟网站百度电脑版网页版
  • 如何用oss做视频网站2023年10月疫情还会严重吗
  • 用手机如何做网站爱站seo工具
  • discuz 网站标题windows优化大师好不好
  • 中山网站建设方案百度快照怎么发布
  • 企业网站备案时间流量购买网站
  • 如何新建一个网站电商网站搭建
  • 萧山网站制作公司广州短视频代运营
  • 查网站怎么做的百度小说风云榜总榜
  • 深圳电商网络网站建设关键词优化公司哪家效果好
  • 重庆电商网站建设最新军事新闻 今日 最新消息
  • 家庭带宽100m做网站深圳整站seo