LZW压缩算法

作者:追风剑情 发布于:2022-1-20 15:21 分类:C#

using System; using System.Text; using System.Collections; using System.Collections.Generic; using System.IO; namespace LZWTest { class Program { static void Main(string[] a...

阅读全文>>

标签: C#

评论(0) 浏览(2772)

亮度&对比度&饱和度

作者:追风剑情 发布于:2022-1-7 17:45 分类:Shader

Shader "Custom/Unlit/Texture" { Properties{ _MainTex("Base (RGB)", 2D) = "white" {} //亮度值 _Brightness("Brightness", float) = 20 //对比度 _Contrast("Contr...

阅读全文>>

标签: Shader

评论(0) 浏览(2776)

游戏版本号检测

作者:追风剑情 发布于:2022-1-7 12:05 分类:Unity3d

一、在游戏代码中记录版本号,方便获取 using System; using System.IO; using UnityEngine; using UnityEditor; /// <summary> /// 自动在代码中记录 verion、bundleVersionCode /// 参考 https://blog.csdn.net/zxsean/article/d...

阅读全文>>

标签: Unity3d

评论(0) 浏览(2955)

游戏定时器

作者:追风剑情 发布于:2022-1-6 16:10 分类:Unity3d

using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; /// <summary> /// 游戏定时器 /// </summary> public class GameTimer : MonoBehaviour { public static Gam...

阅读全文>>

标签: Unity3d

评论(0) 浏览(2579)

Tree Editor (树编辑器)

作者:追风剑情 发布于:2022-1-4 15:25 分类:Unity3d

官方文档 Tree Editor (树编辑器) 构建第一棵树 一、创建树干 1、GameObject->3D Object->Tree 此时树包含两个节点: Tree Root Note、Branch Group 二、创建树枝 1、选中 Branch Group 点击 Add Branch Group 按钮,增加树枝 选中二级 Branch Group,并调整 ...

阅读全文>>

标签: Unity3d

评论(0) 浏览(3658)

模型淡入淡出

作者:追风剑情 发布于:2021-12-29 18:40 分类:Shader

Shader Shader "Custom/HalfMask" { Properties { _MainTex ("Texture", 2D) = "white" {} _Color ("Color", Color) = (1, 1, 0, 0) _Height("Height", range(0, 1)) = ...

阅读全文>>

标签: Shader

评论(0) 浏览(2832)

导航箭头

作者:追风剑情 发布于:2021-12-21 15:12 分类:Unity3d

一、路径指向箭头 1、创建shader //导航箭头 Shader "Custom/NavPathArrow" { Properties { _MainTex ("Texture", 2D) = "white" {} _ScrollYSpeed("Y Scroll Speed", Range(-20, 20)) = 2 ...

阅读全文>>

评论(0) 浏览(8743)

Windows10投屏

作者:追风剑情 发布于:2021-12-15 23:47 分类:其他

一、设置->系统

阅读全文>>

评论(0) 浏览(2524)

事件系统(UnityEngine.EventSystems)

作者:追风剑情 发布于:2021-12-11 19:02 分类:Unity3d

https://docs.unity3d.com/Packages/com.unity.ugui@1.0/api/UnityEngine.EventSystems.html 注意:非UGUI元素要响应事件,需要在 Camera 上添加 PhysicsRaycaster 组件。 using UnityEngine; using UnityEngine.Events; usi...

阅读全文>>

标签: Unity3d

评论(0) 浏览(2174)

UGUI—布局组(LayoutGroup)

作者:追风剑情 发布于:2021-12-8 10:50 分类:Unity3d

一、水平居中布局 using System.Collections; using System.Collections.Generic; using UnityEngine; /// <summary> /// 水平居中布局 /// </summary> public class UIHorizontalLayoutGroup : MonoBehavi...

阅读全文>>

标签: Unity3d

评论(0) 浏览(2586)

游戏AI状态机

作者:追风剑情 发布于:2021-11-29 15:46 分类:Unity3d

一、工程截图 AIState.cs using System; /// <summary> /// AI状态基类 /// </summary> public class AIState { //状态ID public virtual int StateId { get { return -1; } set ...

阅读全文>>

标签: Unity3d

评论(0) 浏览(2771)

UGUI—头顶飘字

作者:追风剑情 发布于:2021-11-29 15:26 分类:Unity3d

一、工程截图 二、代码 using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; /// <summary> /// 头顶浮动文本 /// </summary> public class UIHeadFloatText :...

阅读全文>>

标签: Unity3d

评论(0) 浏览(2787)

Windows10设置共享文件夹

作者:追风剑情 发布于:2021-11-13 19:15 分类:其他

一、启用 "网络发现" 和 “文件和打印机共享” 二、在 “组策略” 中启用Guest账户 在运行中输入 "gpedit.msc" 打开组策略 三、为Guest(来宾用户)设置密码 [右键此电脑]->管理->本地用户和组->用户->[右键Guest] 1、设置一个密...

阅读全文>>

评论(0) 浏览(2552)

高等数学——微积分基本公式

作者:追风剑情 发布于:2021-10-28 20:32 分类:Algorithms

在引进定积分的概念时,曾经讨论过变速直线运动的路程。若质点运动的速度为v(t),则质点从时刻T1到T2所经过的路程为 另一方面,如果知道质点的运动规律(即位置函数)为 s=s(t) ,则质点从T1到T2所经过的路程为 从而有 由导数定义和 s`(t)=v(t),即 这就是微积分基...

阅读全文>>

标签: Algorithms

评论(0) 浏览(10021)

UGUI—文字弹跳效果

作者:追风剑情 发布于:2021-10-21 11:14 分类:Unity3d

示例:文字弹跳效果 工程截图 using System.Collections; using System.Collections.Generic; using UnityEngine; /// <summary> /// 文字弹跳效果 /// </summary> public class UITextWaveEffect ...

阅读全文>>

标签: Unity3d

评论(0) 浏览(2553)

AES加密解密

作者:追风剑情 发布于:2021-10-20 11:36 分类:C#

using System; using System.Text; using System.Security.Cryptography; /// <summary> /// AES加密/解密 /// </summary> public sealed class AESCrypto { //一个256位的默认key private const...

阅读全文>>

标签: C#

评论(0) 浏览(2471)

UGUI—InputField

作者:追风剑情 发布于:2021-10-12 15:01 分类:Unity3d

示例 1: 密码输入框 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; /// <summary> /// 密码输入框 /// </summary> public class PasswordInp...

阅读全文>>

标签: Unity3d

评论(0) 浏览(2949)

UGUI—对话框(DialogBox)

作者:追风剑情 发布于:2021-9-27 15:57 分类:Unity3d

示例:对话框 工程截图 代码 using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; /// <summary> /// 对话框UI ///...

阅读全文>>

标签: Unity3d

评论(0) 浏览(2589)

C#类型基础

作者:追风剑情 发布于:2021-9-23 9:45 分类:C#

所有类型都从 System.Object 派生。 Object类提供的方法 方法 说明 Equals 如果两个对象具有相同的值,就返回true Ge...

阅读全文>>

标签: C#

评论(0) 浏览(2227)

高等数学——定积分

作者:追风剑情 发布于:2021-9-19 13:42 分类:Algorithms

引例:曲边梯形 由曲线y=f(x),直线x=a,x=b以及x轴所围成的图形AabB称为曲边梯形。 定积分可用来求曲边梯形的面积,而在不同的场景下曲边梯形的面积又有不同的含义。例如: 1、将f(x)看作变速曲线,那么曲边梯形的面积就等于变速直线运动的路程。 2、将f(x)看作变力曲线,那么曲边梯形的面积就等于变力沿直线所做的功。 ...

阅读全文>>

标签: Algorithms

评论(0) 浏览(4228)

Unity 2D Animation

作者:追风剑情 发布于:2021-9-18 14:27 分类:Unity3d

Introduction to 2D Animation Unity 2D 工具包 一、准备和导入PSB文件 1、将动画角色的不同部分放在不同的图层 (Photoshop) 预览 2、保存为大型文档格式(*.PSB) 3、将PSB文件导入Unity ...

阅读全文>>

标签: Unity3d

评论(0) 浏览(3135)

基元类型&引用类型&值类型

作者:追风剑情 发布于:2021-9-17 13:42 分类:C#

一、基元类型 编译器直接支持的数据类型称为基元类型(primitive type)。基元类型直接映射到Framework类库(FCL)中存在的类型。例如,C#的int直接映射到System.Int32类型。 C#基元类型与对应的FCL类型 C#基元类型 ...

阅读全文>>

标签: C#

评论(0) 浏览(2588)

Powered by emlog  蜀ICP备18021003号-1   sitemap

川公网安备 51019002001593号