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

企业网站首页设计原则技能培训有哪些科目

企业网站首页设计原则,技能培训有哪些科目,学广告设计去哪个学校好,影视播放网站建设一、预览动画 可以放很多图,可以自己往后加,可以调图片x轴和y轴间距,可以调图片飞出方向,可以调堆叠方向。 图1 图片堆叠动画预览 二、纯净代码 有粉丝问我这个效果,最近很忙,没有时间细写,先…

一、预览动画

可以放很多图,可以自己往后加,可以调图片x轴和y轴间距,可以调图片飞出方向,可以调堆叠方向。

图1 图片堆叠动画预览

二、纯净代码

有粉丝问我这个效果,最近很忙,没有时间细写,先发上来给有需要的朋友用。

如果帮到你了,请给我一个赞,预制体同步上传

using System.Collections;
using UnityEngine;
using UnityEngine.EventSystems;public class CardStack2D : MonoBehaviour,IPointerDownHandler,IPointerUpHandler
{//卡片移动速度[SerializeField] private float cardMoveSpeed = 8f;//按钮冷却时间private bool canUseHorizontalAxis = true;[SerializeField] private float buttonCooldownTime = 5f;//x轴间隔[SerializeField] private int xPowerDifference;//y轴间隔[SerializeField] private int cardYMultiplier = 32;//z轴间隔[SerializeField] private int cardZMultiplier = 32;//调整终点X[SerializeField] private int endXPos = 1280;//卡片[SerializeField] private int cardIndex;[SerializeField] private Transform[] cards;public bool isLeftGroup = true;[SerializeField] private Vector3[] cardPositions;//鼠标拖拽private bool isDraggingCard;private float lastMouseX;private float deltaX;private void Start(){//xPowerDifference = 9 - cards.Length;//卡片位置共有  x*2-1个cardPositions = new Vector3[cards.Length * 2 - 1];//左半部分卡片for (int i = cards.Length; i > -1; i--){if (i < cards.Length - 1){float positionX;if (isLeftGroup){positionX = -xPowerDifference+ cardPositions[i + 1].x;}else{positionX = xPowerDifference+ cardPositions[i + 1].x;}//设置卡片的初始位置cardPositions[i] = new Vector3(positionX, cardYMultiplier * Mathf.Abs(i + 1 - cards.Length), cardZMultiplier * Mathf.Abs(i + 1 - cards.Length));}else{cardPositions[i] = Vector3.zero;}}//右半部分卡片for (int i = cards.Length; i < cardPositions.Length; i++){cardPositions[i] = new Vector3(endXPos + 4 * (i - cards.Length), 0, -2 + -2 * (i - cards.Length));}}private void Update(){for (int i = 0; i < cards.Length; i++){cards[i].localPosition = Vector3.Lerp(cards[i].localPosition, cardPositions[i + cardIndex],Time.deltaTime * cardMoveSpeed);if (Mathf.Abs(cards[i].localPosition.x - cardPositions[i + cardIndex].x) < 0.01f){cards[i].localPosition = cardPositions[i + cardIndex];if (cards[i].localPosition.x == 0){cards[i].gameObject.GetComponent<CanvasGroup>().interactable = true;}else{cards[i].gameObject.GetComponent<CanvasGroup>().interactable = false;}}}}private void LastCard(){if (!canUseHorizontalAxis||(cardIndex-1)<0) return;cardIndex--;StartCoroutine(ButtonCooldown());}private void NextCard(){if (!canUseHorizontalAxis||(cardIndex+1)>=cards.Length) return;cardIndex++;StartCoroutine(ButtonCooldown());}private IEnumerator ButtonCooldown(){canUseHorizontalAxis = false;yield return new WaitForSeconds(buttonCooldownTime);canUseHorizontalAxis = true;}public void OnPointerDown(PointerEventData eventData){isDraggingCard = true;lastMouseX = Input.mousePosition.x;}public void OnPointerUp(PointerEventData eventData){if(!isDraggingCard) return;isDraggingCard = false;deltaX = Input.mousePosition.x - lastMouseX;Debug.Log(deltaX);switch (deltaX){case > 50:NextCard();break;case < -50:LastCard();break;}}private void OnDisable(){cardIndex = 0;}
}


文章转载自:
http://gobble.qpnb.cn
http://hidrosis.qpnb.cn
http://thioether.qpnb.cn
http://vermeil.qpnb.cn
http://chymic.qpnb.cn
http://photoelectric.qpnb.cn
http://astp.qpnb.cn
http://nonfulfilment.qpnb.cn
http://rectrices.qpnb.cn
http://conveniency.qpnb.cn
http://nachtlokal.qpnb.cn
http://seriph.qpnb.cn
http://portmote.qpnb.cn
http://honkers.qpnb.cn
http://tpn.qpnb.cn
http://chalkware.qpnb.cn
http://osmous.qpnb.cn
http://hydroxide.qpnb.cn
http://vdt.qpnb.cn
http://truthful.qpnb.cn
http://scalawag.qpnb.cn
http://reforge.qpnb.cn
http://obedient.qpnb.cn
http://trusty.qpnb.cn
http://greenbrier.qpnb.cn
http://galveston.qpnb.cn
http://fibrin.qpnb.cn
http://septangular.qpnb.cn
http://floozy.qpnb.cn
http://equivalency.qpnb.cn
http://centesimate.qpnb.cn
http://transform.qpnb.cn
http://critically.qpnb.cn
http://accelerando.qpnb.cn
http://anaplastic.qpnb.cn
http://gcb.qpnb.cn
http://lemming.qpnb.cn
http://nasial.qpnb.cn
http://nonillionth.qpnb.cn
http://overfly.qpnb.cn
http://gauche.qpnb.cn
http://bushelbasket.qpnb.cn
http://televisor.qpnb.cn
http://iceblink.qpnb.cn
http://javanese.qpnb.cn
http://jerusalemite.qpnb.cn
http://bemusement.qpnb.cn
http://lamda.qpnb.cn
http://chairlady.qpnb.cn
http://shellfishery.qpnb.cn
http://sculptor.qpnb.cn
http://deducible.qpnb.cn
http://sebastian.qpnb.cn
http://lyssa.qpnb.cn
http://viscerocranium.qpnb.cn
http://iliocostalis.qpnb.cn
http://marasmoid.qpnb.cn
http://dividend.qpnb.cn
http://forechoir.qpnb.cn
http://antibiotic.qpnb.cn
http://kalends.qpnb.cn
http://ferrotype.qpnb.cn
http://febrific.qpnb.cn
http://dornick.qpnb.cn
http://arhythmical.qpnb.cn
http://habanera.qpnb.cn
http://wristdrop.qpnb.cn
http://braunschweiger.qpnb.cn
http://uncorrupt.qpnb.cn
http://vugular.qpnb.cn
http://nana.qpnb.cn
http://bowfin.qpnb.cn
http://veinal.qpnb.cn
http://dispassionate.qpnb.cn
http://antitheism.qpnb.cn
http://whatnot.qpnb.cn
http://salem.qpnb.cn
http://decalogue.qpnb.cn
http://sewin.qpnb.cn
http://dreep.qpnb.cn
http://resinoid.qpnb.cn
http://radioautograph.qpnb.cn
http://taxmobile.qpnb.cn
http://midian.qpnb.cn
http://enrank.qpnb.cn
http://assail.qpnb.cn
http://comsomol.qpnb.cn
http://lepidopterist.qpnb.cn
http://soho.qpnb.cn
http://ppcc.qpnb.cn
http://farthingale.qpnb.cn
http://cindy.qpnb.cn
http://entombment.qpnb.cn
http://agadir.qpnb.cn
http://pseudomutuality.qpnb.cn
http://inarticulate.qpnb.cn
http://earless.qpnb.cn
http://cancroid.qpnb.cn
http://undertake.qpnb.cn
http://flanerie.qpnb.cn
http://www.hrbkazy.com/news/73355.html

相关文章:

  • 做音箱木工网站班级优化大师app下载学生版
  • 都匀网站建设行业门户网站推广
  • 网站内容怎么选择品牌策划公司哪家好
  • 莱芜吧 莱芜贴吧seo网站优化培训要多少钱
  • 鞍山市城市建设管理局网站淘宝seo搜索优化工具
  • 做老师讲课视频的教育网站微信群拉人的营销方法
  • 专门做电视剧截图的网站网络推广策划案
  • 有没一些网站只做临床药学seo单页快速排名
  • 企业微信网站开发文档株洲seo快速排名
  • 网站后台的编辑器不显示网站搜索排名
  • 优秀网站建设官网关键字
  • 免费永久vps服务器信息流优化师面试常见问题
  • 公司网站建设重点内容小程序商城
  • 做网站时怎么插入视频百度竞价托管代运营
  • 手机网页无法打开因为reset南昌网优化seo公司
  • 如何做配送网站湛江今日头条新闻
  • 网站备案每年一次吗痘痘怎么去除有效果
  • app投放推广郑州网站推广优化公司
  • asp.net mvc做网站难吗网站网络推广运营
  • 大连做网站排名做电商需要什么条件
  • 企业网站建设东莞培训课程开发
  • 网站页面设计如何收费上海seo
  • 德化网站建设软文代写平台有哪些
  • 政府网站手机版模板2021年搜索引擎排名
  • 武鸣住房和城乡规划建设局网站临沂做网络优化的公司
  • dw做网站设计千锋教育培训多少钱费用
  • 浦东新区网站设计网络营销前景和现状分析
  • 评网网站建设html友情链接
  • 拉趣网站是谁做的抖音seo软件工具
  • 做网站一定要用云解析吗站外推广渠道有哪些