位置: 编程技术 - 正文
推荐整理分享学习Space shoot(学习雷锋好榜样),希望有所帮助,仅作参考,欢迎阅读内容。
文章相关热门搜索词:学习画动漫人物,学习画动漫人物,学习雷锋好榜样,学习雷锋好榜样歌词,学习通,学习英语,学习英语,学习雷锋好榜样,内容如对您有帮助,希望把文章链接给更多的朋友!
2.2、在编辑GameObject时,如果显示提示太大,可以找到Gizmos,来调节3D Gizmos的大小。
声明:此篇文档时来自于【狗刨学习网】社区-unity极致学院,是网友自行发布的Unity3D学习文章,如果有什么内容侵犯了你的相关权益,请与官方沟通,我们会即时处理。
3、灯光设置3.1、一般需要3个平行光,(Main light,Fill light和Rim light),效果如下。[①只有Main light ②main fill ③ main fill rim] 3.2、为什么背景调成了纯黑,还是能看到飞机呢,因为默认渲染不是纯黑。可以调节。4、背景设置1.1、先添加一个Quad,添加一张图片,拉伸后,设置Shader为unlit->Texture,这样不用为这张图片加灯光,也能显示正常效果。1.2、透明图片,Shader设置为Particles->Addtive。5、角色控制教程中是电脑按键控制,我改成了移动设备的触摸移动。[code]csharpcode:using UnityEngine;using System.Collections;[System.Serializable]public class Done_Boundary{//系列化的类public float xMin, xMax, zMin, zMax;}public class Done_PlayerController : MonoBehaviour{public float speed;//移动速度public float tilt;//倾斜的调整public Done_Boundary boundary;//盒子,子弹或者其他怪物碰到就会消失public GameObject shot;//子弹public Transform shotSpawn;public float fireRate;//子弹攻击间隔private float nextFire;void Update() {if (Time.time > nextFire) {nextFire = Time.time fireRate;Instantiate(shot, shotSpawn.position, shotSpawn.rotation);audio.Play();}}void FixedUpdate(){//float moveHorizontal = Input.GetAxis ("Horizontal");//float moveVertical = Input.GetAxis ("Vertical");if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Moved) {//GetTouch用于移动设备Vector2 touchDeltaPosition = Input.GetTouch(0).deltaPosition;transform.Translate(Mathf.Clamp(touchDeltaPosition.x * speed, boundary.xMin, boundary.xMax),0,Mathf.Clamp(touchDeltaPosition.y * speed, boundary.zMin, boundary.zMax));//下面代码可以改为方向键来控制方向/* Vector3 movement = new Vector3(touchDeltaPosition.x * speed, 0,touchDeltaPosition.y * speed);rigidbody.velocity = movement * speed;rigidbody.position = new Vector3(Mathf.Clamp(rigidbody.position.x, boundary.xMin, boundary.xMax),0.0f,Mathf.Clamp(rigidbody.position.z, boundary.zMin, boundary.zMax));rigidbody.rotation = Quaternion.Euler(0.0f, 0.0f, rigidbody.velocity.x * -tilt);*/}}}unity调用Android的jar包 简介有一些手机功能,Unity没有提供相应的接口,例如震动,例如不锁屏,例如GPS,例如...有太多的特殊功能Unity都没有提供接口,这时候,我们就需要
Unity之如何从AssetBundles加载资源 加载和卸载资源包(AssetBundle)中的对象使用下载的数据构建资源包(AssetBundle)对象后,可以使用三种不同的方法加载其中包含的对象:AssetBundle.Load会将其
C#中OnGUI的使用 spanstyle=font-size:px;spanstyle=font-family:Menlo;color:rgb(0,,);public/spanspanstyle=font-family:Menlo;color:rgb(,,);/spanspanstyle=font-family:Menlo;color:rgb(,,);string/spansp
标签: 学习雷锋好榜样
本文链接地址:https://www.jiuchutong.com/biancheng/382596.html 转载请保留说明!友情链接: 武汉网站建设