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

网站背景怎么换微信登录网页版登录入口

网站背景怎么换,微信登录网页版登录入口,车身做网站宣传图,模拟建筑通过网盘分享的文件#xff1a;CubeMoveMusic.unitypackage 链接: https://pan.baidu.com/s/1Rq-HH4H9qzVNtpQ84WXyUA?pwda7xn 提取码: a7xn 运行游戏点击空格动态创建拉伸的方块#xff0c;由Speed控制速度#xff0c;新方向是随机上下左右生成。 using System.Collect…通过网盘分享的文件CubeMoveMusic.unitypackage 链接: https://pan.baidu.com/s/1Rq-HH4H9qzVNtpQ84WXyUA?pwda7xn 提取码: a7xn  运行游戏点击空格动态创建拉伸的方块由Speed控制速度新方向是随机上下左右生成。  using System.Collections; using System.Collections.Generic; using UnityEngine;public class CubeMoveGameCamera : MonoBehaviour {private Vector3 constDir;public GeneMap geneMap;void Start(){constDir transform.position - geneMap.defaultPos;}// Update is called once per framevoid Update(){transform.position constDir geneMap.GetPos();} }生成移动方块以及单方向拉伸方块脚本 using System.Collections; using System.Collections.Generic; using UnityEngine;public class GeneMap : MonoBehaviour {public enum Side{Top, Bottom, Left, Right}public GameObject cubePrefab;private GameObject movingCubeGo;private Transform movingCubeTrans;private Side moveSide;public Vector3 defaultPos;public float speed 1f;private Matrix4x4 rotationMatrix4x4;private void Start(){rotationMatrix4x4 Matrix4x4.TRS(Vector3.zero, cubePrefab.transform.localRotation, Vector3.one);}Side MirrorSide(Side side){if (side Side.Top){return Side.Bottom;}if (side Side.Bottom){return Side.Top;}if (side Side.Left){return Side.Right;}if (side Side.Right){return Side.Left;}Debug.LogError(?);return Side.Top;}public bool IsMoving(){return movingCubeGo ! null;}public Vector3 GetPos(){Vector3 pos defaultPos;if (IsMoving()){//利用上一个移动物体的方向通过不同方向的移动物体局部大小得到偏移量而0.5f是下一个新物体一半的偏移Vector3 oldOffset Vector3.zero;switch (moveSide){case Side.Top:oldOffset new Vector3(0, 0, movingCubeTrans.localScale.z - 0.5f);break;case Side.Bottom:oldOffset new Vector3(0, 0, -movingCubeTrans.localScale.z 0.5f);break;case Side.Left:oldOffset new Vector3(-movingCubeTrans.localScale.x 0.5f, 0, 0);break;case Side.Right://例如上一个物体是右方向则使用局部大小x作为偏移量数值并且需要-0.5f来让新物体的整体恰好在前一个延伸物体的内部。oldOffset new Vector3(movingCubeTrans.localScale.x - 0.5f, 0, 0);break;default:break;}pos movingCubeTrans.position rotationMatrix4x4.MultiplyPoint(oldOffset);}return pos;}private void Update(){if (movingCubeGo ! null){if (moveSide Side.Top || moveSide Side.Bottom){movingCubeTrans.localScale new Vector3(1, 1, movingCubeTrans.localScale.z speed * Time.deltaTime);}else{movingCubeTrans.localScale new Vector3(movingCubeTrans.localScale.x speed * Time.deltaTime, 1, 1);}}if (Input.GetKeyDown(KeyCode.Space)){Vector3 pos GetPos();movingCubeGo GameObject.Instantiate(cubePrefab);movingCubeTrans movingCubeGo.transform;Listint sideList new Listint();for (int i 0; i 4; i){if (i ! (int)moveSide i ! (int)MirrorSide(moveSide)){sideList.Add(i);}}int randomIndex Random.Range(0, sideList.Count);moveSide (Side)sideList[randomIndex];//1、新物体在进行朝着新方向移动时需要对子物体Cube调整局部位置目的锚点轴心偏移实现单方向延伸//2、newOffset用于将新移动物体偏移到新移动方向的上一个物体边缘位置点Vector3 newOffset Vector3.zero;Vector3 newLocalScale Vector3.one;Transform childTrans movingCubeTrans.Find(Cube);childTrans.GetComponentMeshRenderer().material.SetColor(_Color, new Color(Random.Range(0, 256) / 255f, Random.Range(0, 256) / 255f, Random.Range(0, 256) / 255f, 1));switch (moveSide){case Side.Top:childTrans.localPosition new Vector3(0, 0, 0.5f);newOffset new Vector3(0, 0, 0.5f);newLocalScale new Vector3(1, 1, 0);break;case Side.Bottom:childTrans.localPosition new Vector3(0, 0, -0.5f);newOffset new Vector3(0, 0, -0.5f);newLocalScale new Vector3(1, 1, 0);break;case Side.Left:childTrans.localPosition new Vector3(-0.5f, 0, 0);newOffset new Vector3(-0.5f, 0, 0);newLocalScale new Vector3(0, 1, 1);break;case Side.Right://例如右方向的Cube子物体需要偏移(0.5f,0,0)保证锚点是在物体左侧childTrans.localPosition new Vector3(0.5f, 0, 0);//右方向的新物体起点要在上一个物体的右侧边缘点作为起点故x轴0.5fnewOffset new Vector3(0.5f, 0, 0);//右方向的新物体大小X轴要从0开始newLocalScale new Vector3(0, 1, 1);break;default:break;}movingCubeTrans.position pos rotationMatrix4x4.MultiplyPoint(newOffset);movingCubeTrans.localScale newLocalScale;}} }
http://www.hkea.cn/news/14259206/

相关文章:

  • 网站模板怎么做北京网站搭建报价
  • 深圳建站公司告诉你十个建站步骤贵阳seo推广
  • 福建省龙岩市新罗区建设局网站南戴河区网站建设哪家好
  • 怎么说服企业做网站建立的短语
  • 有没有专门做ppt的网站吗织梦论坛
  • 手机app制作网站企业建设网站方案
  • 汕头建站外贸门户网站
  • 网站自动采集指标中建西部建设北方有限公司网站
  • 北京南站在哪个街道互联网运营管理
  • 同仁行业网站建设报价自己做的网站地址手机怎么打不开
  • 交易网站建设需要学什么长春免费网站建站模板
  • 营销型网站规划建设的七大要素杭州哪家公司可以做网站
  • 企业网站推广哪些效果比较好顺义做网站同学
  • 如何建设好英文网站seo兼职
  • 祥云建站平台无为县住房建设局网站首页
  • 黑龙江省垦区建设协会网站产品页面设计模板
  • 面试学校网站开发模板类网站建设
  • 网站子目录设计一级域名如何分发二级域名
  • 浙江网站怎么做推广做外贸seo优化的上市公司
  • 建设银行银监会官方网站企业所得税是什么意思
  • 解析网站怎么做怎么在百度上打广告
  • 特殊信息收费的网站有哪些pc做网站服务器
  • 甘肃做网站哪个平台好电子商务网站优化
  • 陶瓷网站制作可以建设一个网站
  • 手机建行网站阿里网站备案
  • 网站建设挣钱可信网站
  • 网站如何做优化推广社交网站盈利吗
  • 深圳网站建设是什么wordpress 在safari运动很慢
  • 成都网站制作沈阳提供网站制作公司地址
  • 城市门户网站哈尔滨专业的制作网页