• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
~Joke_crazy
爱生活,爱拉芳!
   首页    新随笔       管理     
上一页 1 2 3 4 5 下一页
2019年3月5日
资源更新
摘要: using System; using System.Collections.Generic; using System.Collections; using System.IO; using System.Net; using System.Threading; using UnityEngine 阅读全文
posted @ 2019-03-05 18:02 ~Joke_crazy 阅读(141) 评论(0) 推荐(0)
UIManager
摘要: 创建UIManager,管理所有UI面板 准备工作: 1. 创建Canvas并设置Tag为Main Canvas 2. 在Canvas下新建五个层级节点,因为UGUI显示层级越往下越靠前 using System; using System.Collections.Generic; using Un 阅读全文
posted @ 2019-03-05 17:44 ~Joke_crazy 阅读(509) 评论(0) 推荐(0)
2019年2月16日
向量旋转
摘要: 已知两边求夹角 float angle = Quaternion.LookRotation(vector, Vector3.up).eulerAngles; 已知斜边与夹角求临边 vector.x = vector.x * Mathf.Cos(Mathf.Deg2Rad * angle); 向量以Y 阅读全文
posted @ 2019-02-16 16:31 ~Joke_crazy 阅读(376) 评论(0) 推荐(0)
2019年1月30日
UGUI血条跟随
摘要: 定义常量 public class Content { //当前UI分辨率 public const float UI_Width = 1366f; public const float UI_Height = 768f; //手机屏幕大小的二分之一 public static float scre 阅读全文
posted @ 2019-01-30 16:12 ~Joke_crazy 阅读(595) 评论(0) 推荐(0)
2019年1月21日
unity组件路径自动生成
摘要: unity 有时候找路径太麻烦 写了一个自动生成脚本的工具 using System.Collections.Generic; using System.IO; using System.Text; using UnityEditor; using UnityEngine; public class 阅读全文
posted @ 2019-01-21 16:47 ~Joke_crazy 阅读(413) 评论(0) 推荐(0)
2018年12月28日
双摄像机使用
摘要: 如果Camera1和Camera2拍摄的物体各自在摄像机视野内,如果在同一个屏幕上把2件物体都显示出来? 1,Camera1的Depth设置为-1 2,Camera2的Depth设置为0,同时Clear Flags设置为Depth only 阅读全文
posted @ 2018-12-28 11:24 ~Joke_crazy 阅读(198) 评论(0) 推荐(0)
2018年12月3日
Unity 属性雷达图
摘要: using System.Collections.Generic; using UnityEngine; [RequireComponent(typeof(MeshFilter), typeof(MeshRenderer))] public class Radar : MonoBehaviour { 阅读全文
posted @ 2018-12-03 18:26 ~Joke_crazy 阅读(1158) 评论(0) 推荐(0)
unity UGUI UI跟随
摘要: 实现2dUI跟随游戏中角色的移动(应用于玩家名称,血条,称号) using UnityEngine; public class UI_Follow : MonoBehaviour { public Camera m_camera; public Transform m_target; public 阅读全文
posted @ 2018-12-03 11:07 ~Joke_crazy 阅读(2694) 评论(0) 推荐(0)
2018年11月23日
Unity中实现人物平滑转身
摘要: using UnityEngine; public class PlayerController : MonoBehaviour { public float turnspeed = 10; float ver = 0; float hor = 0; void Update() { hor = In 阅读全文
posted @ 2018-11-23 14:19 ~Joke_crazy 阅读(1740) 评论(0) 推荐(0)
2018年11月12日
游戏摇杆
摘要: using System; using UnityEngine; using UnityEngine.EventSystems; public class JoyStick : MonoBehaviour { enum JoyStickState { None, OnEnter, OnStay, O 阅读全文
posted @ 2018-11-12 16:23 ~Joke_crazy 阅读(292) 评论(0) 推荐(0)
上一页 1 2 3 4 5 下一页
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3