• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
白染
博客园    首页    新随笔    联系   管理    订阅  订阅
2018年9月8日
animation 老动画
摘要: 关于设置跳跃: 阅读全文
posted @ 2018-09-08 16:14 白染 阅读(265) 评论(0) 推荐(0)
animator 新动画
摘要: 2.int类型 阅读全文
posted @ 2018-09-08 16:13 白染 阅读(317) 评论(0) 推荐(0)
添加音效
摘要: 定义成方法:using System.Collections; using System.Collections.Generic; using UnityEngine; public class AudioManger : MonoBehaviour { AudioSource au; public AudioClip[] clip = new AudioClip[3]; ... 阅读全文
posted @ 2018-09-08 16:04 白染 阅读(157) 评论(0) 推荐(0)
太空大战背景移动的几种方式
摘要: 1. 2. 3.材质移动 4.用MoveTowards 阅读全文
posted @ 2018-09-08 16:03 白染 阅读(149) 评论(0) 推荐(0)
在外面设置按键控制移动:
摘要: using System.Collections; using System.Collections.Generic; using UnityEngine; public class playcontrol : MonoBehaviour { public KeyCode upkey;//外面去指定键 public KeyCode downkey;//外面去指定键 ... 阅读全文
posted @ 2018-09-08 15:48 白染 阅读(136) 评论(0) 推荐(0)
DoTween
摘要: dotween最原始的用法 using System.Collections; using System.Collections.Generic; using UnityEngine; using DG.Tweening; public class DotweenText : MonoBehaviour { public GameObject cube; public Rect... 阅读全文
posted @ 2018-09-08 15:45 白染 阅读(309) 评论(0) 推荐(0)
AI案列 三条路
摘要: 在生成点生成带有颜色的小球,小球走对应颜色的路 先做好三个小球,做成预制体 对应颜色的小球,除了自身颜色,其他颜色不要选 新建脚本: 阅读全文
posted @ 2018-09-08 15:43 白染 阅读(155) 评论(0) 推荐(0)
寻路——AI
摘要: 小球找到目标位置, 必要时候进行跳跃 进行跳跃时,需要在cube上加上 Off Mesh Link 组件,并添加起跳位置和目标位置 在static位置选Navigation static 编写脚本,挂在要运动的物体上 阅读全文
posted @ 2018-09-08 15:23 白染 阅读(131) 评论(0) 推荐(0)
炮塔发射子弹
摘要: using System.Collections; using System.Collections.Generic; using UnityEngine; public class BuffShoot : MonoBehaviour { public GameObject Bu;//发射的子弹 public Transform tr;//发射子弹的位置 float t... 阅读全文
posted @ 2018-09-08 15:05 白染 阅读(195) 评论(0) 推荐(0)
小球跳跃游戏
摘要: using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class SphereControll : MonoBehaviour { bool b = false; public float sphereSpeed=10... 阅读全文
posted @ 2018-09-08 15:03 白染 阅读(313) 评论(0) 推荐(0)
UI界面之淡入淡出
摘要: 2. 3. 阅读全文
posted @ 2018-09-08 14:59 白染 阅读(187) 评论(0) 推荐(0)
iTween
摘要: using System.Collections; using System.Collections.Generic; using UnityEngine; public class ItweenText : MonoBehaviour { public GameObject obj; float time = 0; public iTween.EaseType typ... 阅读全文
posted @ 2018-09-08 14:55 白染 阅读(260) 评论(0) 推荐(0)
编写脚本,开始场景有两个球体,两者之间距离为10,当距离大于10时,两个球相向运动,两个球接触后反向运动,反复运动
摘要: using System.Collections; using System.Collections.Generic; using UnityEngine; public class fanfuyundong09 : MonoBehaviour { public GameObject sphere;//定义另一个球 GameObject obj; float speed... 阅读全文
posted @ 2018-09-08 14:52 白染 阅读(289) 评论(0) 推荐(0)
点击地面时,若鼠标点击的偶数次使得Cube向点击点移动,并且点击奇数次Cube变色
摘要: using System.Collections; using System.Collections.Generic; using UnityEngine; public class ray10 : MonoBehaviour { int num = 0; Vector3 vec; GameObject obj; bool b = false; Colo... 阅读全文
posted @ 2018-09-08 14:48 白染 阅读(302) 评论(0) 推荐(0)
消消乐——三消
摘要: 此代码还有点问题,如果点击的两个cube相隔两个以外,game界面会卡死,,,,等我修改后再来更新 阅读全文
posted @ 2018-09-08 14:46 白染 阅读(399) 评论(0) 推荐(0)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3