kingBook

导航

上一页 1 2 3 4 5 6 7 8 ··· 13 下一页

2021年4月1日 #

Unity 旋转欧拉角X时,重力加速度模拟

摘要: 如图,要求角色捉住杆不停旋转,当旋转至脚朝上时,受到重力速度要求逐渐减速旋转,反之加速旋转。 // 125f 为没有重力时旋转速度 float angleVelocity=125f; // 加重力 // ((transform.up.y+1f)/2f) 范围区间[0,1]脚朝上最小,脚朝下最大; / 阅读全文

posted @ 2021-04-01 16:21 kingBook 阅读(195) 评论(0) 推荐(0) 编辑

2021年3月16日 #

Git 使用git-lfs时pull或reset后文件内容不正确

摘要: 使用git-lfs时pull或reset后文件内容如下: version https://git-lfs.github.com/spec/v1 oid sha256:xxxxxxxxxxxxxxxxxxxxxx size xxxxxxxxxx 使用以下命令恢复: git lfs pull origi 阅读全文

posted @ 2021-03-16 10:33 kingBook 阅读(1230) 评论(0) 推荐(0) 编辑

2021年2月22日 #

unity 凸包算法

摘要: https://www.pianshen.com/article/763090525/ https://blog.csdn.net/qq_29242649/article/details/105772034 一: using System.Collections; using System.Coll 阅读全文

posted @ 2021-02-22 15:32 kingBook 阅读(218) 评论(0) 推荐(0) 编辑

C# List

摘要: List.Sort List<int> list=new List<int>{2,3,5,1,4}; list.Sort((int a,int b)=>{ return a-b; }); string str=""; for(int i=0;i<list.Count;i++){ str+=list[ 阅读全文

posted @ 2021-02-22 11:59 kingBook 阅读(102) 评论(0) 推荐(0) 编辑

2021年2月20日 #

unity 凸多形顶点排序

摘要: /// <summary> /// 多边形点集排序 /// </summary> /// <param name="vPoints"></param> /// <returns></returns> public List<Point> SortPolyPoints(List<Point> vPoi 阅读全文

posted @ 2021-02-20 15:52 kingBook 阅读(295) 评论(0) 推荐(0) 编辑

2021年2月19日 #

unity Plane

摘要: Plane.distance:指从原点到平面的距离。假设平面法线为(0,1,0),需要将平面向上平移0.5,distance应为-0.5。 Plane.Translate(Vector3 translation):平移方向与法线相反 阅读全文

posted @ 2021-02-19 10:33 kingBook 阅读(728) 评论(0) 推荐(0) 编辑

2021年2月4日 #

Git github多帐号配置

摘要: 设现在有两个帐号: aaa、bbb 对应的邮箱地址为: 123@qq.com、456@qq.com 对应的网页地址为: github.com/aaa、github.com/bbb 使用以下命令在.ssh文件夹下创建 key ssh-keygen -t ed25519 -C "123@qq.com" 阅读全文

posted @ 2021-02-04 18:06 kingBook 阅读(542) 评论(0) 推荐(0) 编辑

Spine

摘要: 运行库指南: http://zh.esotericsoftware.com/spine-runtime-architecture spine-unity: http://en.esotericsoftware.com/spine-unity-download/#spine-unity 阅读全文

posted @ 2021-02-04 11:40 kingBook 阅读(234) 评论(0) 推荐(0) 编辑

VsCode TypeScritp整理Import

摘要: Shift+Alt+O 阅读全文

posted @ 2021-02-04 11:01 kingBook 阅读(125) 评论(0) 推荐(0) 编辑

2021年2月1日 #

TypeScript 扩展声明文件 .d.ts

摘要: 如:扩展LayaAir的Vector3,加入一个say方法 LayaAirExtensions.d.ts declare module Laya{ interface Vector3 { say(msg:string):void; } } //或 /*declare module laya.d3.m 阅读全文

posted @ 2021-02-01 12:14 kingBook 阅读(368) 评论(0) 推荐(0) 编辑

2021年1月22日 #

UnityEditor 编辑多个场景里的对象,Revert 预制件实例

摘要: 需要把脚本放在名称为'Editor'的文件夹下 using System.Collections.Generic; using UnityEditor; using UnityEditor.SceneManagement; using UnityEngine; using UnityEngine.S 阅读全文

posted @ 2021-01-22 12:10 kingBook 阅读(421) 评论(0) 推荐(0) 编辑

2021年1月19日 #

unity 球形插值

摘要: https://www.cnblogs.com/suoluo/p/5695362.html 阅读全文

posted @ 2021-01-19 20:53 kingBook 阅读(92) 评论(0) 推荐(0) 编辑

2021年1月15日 #

ES6

摘要: https://es6.ruanyifeng.com/ 阅读全文

posted @ 2021-01-15 09:28 kingBook 阅读(30) 评论(0) 推荐(0) 编辑

2021年1月14日 #

用 console.time()和 console.timeEnd() 测试代码执行时间

摘要: console.time('time'); //开始(开始的名字要和结束的名字一致) //执行的代码 .... console.timeEnd('time'); //结束 阅读全文

posted @ 2021-01-14 13:56 kingBook 阅读(147) 评论(0) 推荐(0) 编辑

2021年1月11日 #

LayaAir2.x Quaternion

摘要: Laya.createFromYawPitchRoll(yaw: number, pitch: number, roll: number, out: Quaternion): void Laya.getYawPitchRoll(out: Vector3): void pitch: x轴的旋转角度 y 阅读全文

posted @ 2021-01-11 22:06 kingBook 阅读(270) 评论(0) 推荐(0) 编辑

2021年1月8日 #

3DMAX、C4D、Maya导出fbx到Unity设置

摘要: #####3DMAX 1.选中需要导出的模型,在Hierarchy面板Adjust Pivot中点击Affect Pivot Only。 2.接着在下方的Alignment中点击Align to World。 3.按F12弹出TransformType窗口,切换到Select And Rotate( 阅读全文

posted @ 2021-01-08 09:59 kingBook 阅读(1585) 评论(0) 推荐(0) 编辑

2021年1月7日 #

LayaAir2.x 动态创建网格(二) 多个材质贴图

摘要: export default class Test extends Laya.Script{ protected onAwake():void{ //创建3d场景 let scene = Laya.stage.addChild(new Laya.Scene3D()); //创建相机 let came 阅读全文

posted @ 2021-01-07 13:57 kingBook 阅读(313) 评论(0) 推荐(0) 编辑

2021年1月6日 #

LayaAir2.x 动态创建网格(一) 单一材质贴图

摘要: export default class Test extends Laya.Script{ protected onAwake():void{ let scene = Laya.stage.addChild(new Laya.Scene3D()); console.log(scene); let 阅读全文

posted @ 2021-01-06 15:32 kingBook 阅读(422) 评论(0) 推荐(0) 编辑

2020年12月19日 #

Unity RenderTexture 当作为 Camera.targetTexture 时,在某些安卓手机或模拟器无法显示或出现错乱

摘要: using UnityEngine; using UnityEngine.UI; public class Test:MonoBehaviour{ public RawImage rawImage; public Camera cam; private RenderTexture m_renderT 阅读全文

posted @ 2020-12-19 18:50 kingBook 阅读(1793) 评论(0) 推荐(0) 编辑

2020年12月18日 #

Unity 使用Spine

摘要: spine-unity 3.8 下载地址与 unity 版本兼容: http://zh.esotericsoftware.com/spine-unity-download/ 说明: http://zh.esotericsoftware.com/spine-unity http://zh.esoter 阅读全文

posted @ 2020-12-18 16:18 kingBook 阅读(299) 评论(0) 推荐(0) 编辑

2020年12月8日 #

temp

摘要: https://www.bilibili.com/video/BV1bk4y1675H unity虚拟相机 一键展开关闭unity的 Inspector面板上的所有组件 https://gameinstitute.qq.com/community/detail/118292 Unity 动态展开、折 阅读全文

posted @ 2020-12-08 17:04 kingBook 阅读(116) 评论(0) 推荐(0) 编辑

2020年12月4日 #

TypeScript set和get

摘要: class Person { constructor() { } private _name:string; public get name():string{ return this._name; } public set name(name:string){//不能定义返回类型,如: ":voi 阅读全文

posted @ 2020-12-04 18:01 kingBook 阅读(1199) 评论(0) 推荐(0) 编辑

unity Screen.orientation

摘要: public static ScreenOrientation orientation ; Project Settings → Player → Resolution and Presentation → Default Orientation,设置为:Auto Rotation 时,在进入应用且 阅读全文

posted @ 2020-12-04 14:57 kingBook 阅读(614) 评论(1) 推荐(0) 编辑

2020年12月3日 #

Windows7修改系统启动列表名称

摘要: Windows7修改系统启动列表名称.bat @echo off echo. echo 下面将Windows7启动时的系统列表名称做如下修改: echo. echo “Windows 7”→“Windows 7 x64 中文旗舰版” echo. echo 不修改请退出! echo. & pause 阅读全文

posted @ 2020-12-03 13:13 kingBook 阅读(348) 评论(0) 推荐(0) 编辑

Win垃圾清理.bat

摘要: Win垃圾清理.bat @echo off color 0b echo ==正在清除系统垃圾文件,请稍后...... echo ==在程序没有结束的信息时,请勿关闭本窗口 echo ==1. echo ==删除临时文件 del /f /s /q %systemdrive%\*.tmp del /f 阅读全文

posted @ 2020-12-03 13:12 kingBook 阅读(111) 评论(0) 推荐(0) 编辑

win10 添加右键获取管理员权限

摘要: win10添加右键获取管理员权限.reg Windows Registry Editor Version 5.00 ;取得文件修改权限 [HKEY_CLASSES_ROOT\*\shell\runas] @="获取管理员权限" "Icon"="C:\\Windows\\System32\\image 阅读全文

posted @ 2020-12-03 12:11 kingBook 阅读(356) 评论(0) 推荐(0) 编辑

2020年11月25日 #

Unity 线,面 相交判断

摘要: using UnityEngine; using System.Collections; using System; public class Math3d { private static Transform tempChild = null; private static Transform t 阅读全文

posted @ 2020-11-25 11:46 kingBook 阅读(289) 评论(0) 推荐(0) 编辑

2020年11月21日 #

Win10 声音设置

摘要: ![](https://img2020.cnblogs.com/blog/714380/202011/714380-20201121201144067-2077194304.png) 阅读全文

posted @ 2020-11-21 20:12 kingBook 阅读(156) 评论(0) 推荐(0) 编辑

2020年11月19日 #

Win10 Shift+右键添加在此处打开命令窗口

摘要: cmd.reg Windows Registry Editor Version 5.00 ;在文件夹内空白处右键 [HKEY_CLASSES_ROOT\Directory\Background\shell\CmdHere] @="@shell32.dll,-8506" "ico"="C:\\Wind 阅读全文

posted @ 2020-11-19 11:35 kingBook 阅读(274) 评论(0) 推荐(0) 编辑

2020年11月17日 #

Win10 默认以管理员身份运行cmd

摘要: RUNASADMIN.reg Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers] ;c:\windows 阅读全文

posted @ 2020-11-17 09:17 kingBook 阅读(469) 评论(0) 推荐(0) 编辑

2020年11月13日 #

升级Visual Studio安装已完成,出现警告

摘要: ####内容如下: 安装出现问题。 可通过以下方式排查包故障问题: 1. 使用以下搜索 URL 来搜索针对每个包故障的解决方案 2. 针对受与影响的工作负荷或组件修改选项,然后重新尝试安装 3. 从计算机上删除产品,然后再次安装 如果开发者社区上已报告了此问题,则可在此处找到解决方案或变通方法。如果 阅读全文

posted @ 2020-11-13 10:42 kingBook 阅读(906) 评论(0) 推荐(0) 编辑

2020年10月28日 #

C# 字符串格式

摘要: Debug.Log(123.ToString("000000")); //output:000123 Debug.Log(255.ToString("X")); // output: FF Debug.Log(Mathf.PI.ToString()); // output: 3.141593 Deb 阅读全文

posted @ 2020-10-28 11:24 kingBook 阅读(193) 评论(0) 推荐(0) 编辑

2020年10月22日 #

C# TimeSpan、DateTime

摘要: using System; using UnityEngine; TimeSpan timeSpan=TimeSpan.FromSeconds(10000);//10000秒 Debug.LogFormat("{0} {1} {2}",timeSpan.Hours,timeSpan.Minutes, 阅读全文

posted @ 2020-10-22 12:12 kingBook 阅读(257) 评论(0) 推荐(0) 编辑

2020年9月15日 #

CocosCreator 引擎定制Build

摘要: 安装编译依赖: # 在命令行中进入引擎路径 cd E:/engine # 安装 gulp 构建工具 npm install -g gulp # 安装依赖的模块 npm install 编译: gulp build-dev # 出现 JavaScript heap out of memory 的报错, 阅读全文

posted @ 2020-09-15 20:42 kingBook 阅读(600) 评论(0) 推荐(0) 编辑

2020年9月12日 #

Unity Camera

摘要: #####透视相机 Field of View: //设置FOV Axis=Vertical时,fieldOfView的值为45f。 m_camera.fieldOfView=45f;//m_camera.fieldOfView 永远指的都是竖直方向上展开角度(水平方向的展开角度是根据camera. 阅读全文

posted @ 2020-09-12 18:49 kingBook 阅读(430) 评论(0) 推荐(0) 编辑

2020年9月10日 #

win10

摘要: slmgr /ipk VK7JG-NPHTM-C97JM-9MPGT-3V66T slmgr /skms kms.xspace.in slmgr /ato https://www.cnblogs.com/xuexianqi/p/12342664.html J7QT3-3GCPG-9GVWT-CH2X 阅读全文

posted @ 2020-09-10 00:18 kingBook 阅读(157) 评论(0) 推荐(0) 编辑

2020年9月9日 #

Win10 Git闪退或打开Unity项目时出现对话框Unity Launch Error ,必须以管理身份启动 Unity Hub 才能打开项目,不能将资源拖入到 Unity。在 Win10 使用 LayaAir2 时chrome调试示例项目浏览器崩溃无任何报错信息

摘要: 1.Git闪退或打开Unity项目时出现对话框Unity Launch Error 替换C:\Windows\System32\drivers下的null.sys 链接:https://pan.baidu.com/s/1WKWrGb9aKHucV4Fnp88hEw 提取码:2n89 如何确定null 阅读全文

posted @ 2020-09-09 10:36 kingBook 阅读(2343) 评论(0) 推荐(0) 编辑

2020年8月26日 #

CocosCreator循环引用Bug

摘要: Level.ts import Enemy1Character from "./Enemy1Character"; const{ccclass,property}=cc._decorator; @ccclass export default class Level extends cc.Compon 阅读全文

posted @ 2020-08-26 21:39 kingBook 阅读(726) 评论(0) 推荐(0) 编辑

2020年8月25日 #

Cocos Creator Editor 执行场景脚本

摘要: package.json { "name": "scene-tools", "version": "1.0.0", "description": "scene-tools", "author": "kingBook", "main": "main.js", "main-menu": { "Tools 阅读全文

posted @ 2020-08-25 16:40 kingBook 阅读(741) 评论(0) 推荐(0) 编辑

2020年8月24日 #

矩阵运算(平移、缩放、旋转)

摘要: (x',y',z')表示新的位置, (x,y,z)表示当前位置, (dx,dy,dz)平移的量。 ######加法2D平移 \[ \begin{bmatrix} x' \\ y' \\ \end{bmatrix} = \begin{bmatrix} x \\ y \\ \end{bmatrix} + 阅读全文

posted @ 2020-08-24 22:43 kingBook 阅读(6286) 评论(1) 推荐(1) 编辑

上一页 1 2 3 4 5 6 7 8 ··· 13 下一页