自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(22)
  • 资源 (1)
  • 收藏
  • 关注

原创 圆与圆的顺(逆)时针切线向量(方向)

using System.Collections;using System.Collections.Generic;using UnityEngine;public class Circular : MonoBehaviour{ public GameObject TangentPrefab; private void Start() { Creat(); } void Creat() { for (int i

2021-06-15 17:12:13 2288

原创 Unity 读取 XML

using System.IO;using System.Xml;public abstract class XMLReaderBase<T>where T : new(){ protected string m_Path; protected string m_RootNodeName; protected XmlNodeList m_NodeList; protected T m_Result; public XMLReaderBas

2021-04-29 11:59:51 181

原创 unity 查找子物体

using UnityEngine;public static class UnityTools{ public static Transform GetChildTransform(Transform TF, string childName) { Transform x = TF.Find(childName);//查找名字为childName的子物体 if (x != null) { return x;

2021-04-16 17:36:40 515

原创 Unity单例基类

using UnityEngine;public class MonoSingleton<T> : MonoBehaviour where T: MonoBehaviour{ static T m_instance; public static T Instance { get { if (m_instance == null) { m_instance = .

2021-04-16 17:34:33 182

原创 计时器

using System;using UnityEngine;public class TimeManager : MonoSingleton<TimeManager>{ private float m_Timer; public void Init() { } private Action<int> m_TimeCountAction; public void RegisterTimeCountEvent(Action<int

2021-04-16 17:32:41 89

原创 Rigibody Animator 控制角色移动 上台阶

public class RigibodyMoveTest :MonoBehaviour{ private Rigidbody m_Rigidbody; private float m_InputH; private float m_InputV; private Animator m_Animator; pr...

2019-01-24 16:22:43 1042

原创 设置 unity shader 半透明

1 设置unity shader

2018-11-28 12:09:05 1079

原创 Unity 镜面反射

一、公式 specuColor = Kd*_LightColor0*pow(max(R·V 0), _Shininess); Kd–环境光颜色、顶点颜色、点光源的距离衰减 _LightColor0–光源颜色 R·V–反射光向量 · 观察向量 二、逐顶点着色(古罗着色)Shader "Custom/MySpecular_Vertex"{ Properties {

2017-09-11 17:04:23 1829

原创 Unity 漫反射

diffuse=LightColor*Kd*max(N·L,0) 漫反射颜色=入射光(光源)颜色漫反射系数(0~1)入射光与法线夹角的余弦值(0~1)Shader "Custom/SimpleDiffuse"{ Properties { _MainTex("Texture", 2D) = "white" {} _DiffuseFactorRang

2017-09-10 22:18:25 584

原创 unity shader学习 简单的顶点-片段 shader

Shader "Custom/Simple vert fragment Shader" //shader的名字及路径{ Properties //属性定义 { _MainTex("Texture", 2D) = "white" {} //主纹理 } SubShader //子着色器(必须有一个) { Pass //Pass

2017-09-08 20:41:40 325

原创 Socket 通信流程

客户端 (1)创建socketSocket tcpClient = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);

2017-09-05 17:05:45 1391

原创 c# 栈

public class MyStack<T> { private T[] _stack; private int _count; private int _capacity; private int _top; public int Count { get { return

2017-09-04 23:40:38 305

原创 c# 环形队列

核心思想:利用求余,让索引循环 class CircularQueue<T> { private T[] _queue; private int _head; private int _tail; private int _count; private int _capacity; publi

2017-09-04 18:22:49 947

原创 c# 二分查找

/// <summary> /// 二分查找法 /// </summary> /// <param name="array">有序数组</param> /// <param name="key">查找的值</param> /// <returns>数组中值的索引</returns> public stat

2017-09-04 13:36:53 417

原创 c# 选择排序

public void SelectionSort(int[] array) { int min; for (int i = 0; i < array.Length-1; i++) { min = i;//初始要排序的值的索引为最小值索引 for (

2017-09-04 13:31:15 261

原创 c# 冒泡排序

public void BubbleSort(int[] array) { for (int i = 0; i < array.Length - 1; i++) { for (int j = 0; j < array.Length - 1 - i; j++) {

2017-09-04 12:49:33 202

原创 c# 插入排序

public void InsertSortMin(int[] array) { for (int i = 1; i < array.Length; i++)// { int temp = array[i];//记录进行排序的值,并空出i的位置 for (int j =

2017-09-04 12:30:54 343

原创 c# 快速排序

public void QuickSort(int[] array, int head, int last) { int left = head;//左侧游标 int right = last;//右侧游标 if (left >= right) return;//排序终止条件 int ke

2017-09-04 12:08:38 278

原创 C# 单链表的实现

/// /// 节点类 /// public class Node { private T _data; private Node _next; public T Data { get { return _data; } set { _data =

2017-09-03 23:41:35 477 1

原创 Android Studio SDK Manager 无法更新

Android Studio SDK Manager 无法更新

2017-07-10 19:14:53 468

转载 SystemInfo类-Unity(转载)

原地址:http://www.cnblogs.com/Platform/p/5584207.html 作者:茫茫江浸月SystemInfo类中的属性都是只读属性,存储着运行平台的一些信息,主要是显卡和设备信息,如:设备的名称、设备的类型、显卡的类型,显卡的名称、显卡供应商(制造商)、系统内存大小、显存大小、支持的渲染目标数量等等。using UnityEngine;using System.Co

2017-05-24 20:11:41 655

原创 Unity Shader 属性及标签

一、渲染流水线应用阶段、几何阶段、光栅化阶段 1、应用阶段(cpu实现) (1)把数据加载到显存中 例如:顶点的位置信息、法线方向、顶点颜色、纹理坐标 (2)设置渲染状态 (3)调用DrawCall 2、几何阶段(gpu实现) (1)顶点着色器:实现顶点的空间变换、顶点着色等 <完全可编程> (2)曲面着色器:可选着色器,用于细分图元 (3)几何着色器:可选着色器,被用于执行图

2017-05-24 20:02:53 2253 1

旧粒子系统转换成新粒子系统.zip

将旧版粒子系统 转换成 ParticleSystem

2021-06-24

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除