kingBook

导航

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

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 阅读(310) 评论(0) 推荐(0)

2020年11月21日 #

Win10 声音设置

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

posted @ 2020-11-21 20:12 kingBook 阅读(177) 评论(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 阅读(290) 评论(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 阅读(487) 评论(0) 推荐(0)

2020年11月13日 #

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

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

posted @ 2020-11-13 10:42 kingBook 阅读(1122) 评论(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 阅读(202) 评论(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 阅读(295) 评论(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 阅读(628) 评论(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 阅读(594) 评论(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 阅读(175) 评论(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 阅读(2556) 评论(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 阅读(805) 评论(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 阅读(797) 评论(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 阅读(7283) 评论(1) 推荐(1)

2020年8月23日 #

组合数

摘要: https://baike.baidu.com/item/%E7%BB%84%E5%90%88%E6%95%B0/2153250?fr=aladdin \(C_n^0=1\)=\(C(n,0)\)=\(\tbinom{n}{0}\)=$1$ \(C_n^m\)=\(C(n,m)\)=\(\tbino 阅读全文

posted @ 2020-08-23 22:34 kingBook 阅读(79) 评论(0) 推荐(0)

2020年8月19日 #

CocosCreator 根据碰撞法线计算是否在空中

摘要: const{ccclass,property}=cc._decorator; @ccclass export default class Player extends cc.Component{ private _rigidBody:cc.RigidBody; private _onGroundB2 阅读全文

posted @ 2020-08-19 14:23 kingBook 阅读(310) 评论(0) 推荐(0)

2020年8月17日 #

CocosCreator 加载Bundle里的Prefab

摘要: // "_bundleLevel"是配置好的Bundle // "prefabs/PanelInfo"是"_bundleLevel/prefabs/PanelInfo"下的预制件 cc.assetManager.loadBundle("_bundleLevel",(err:Error,bundle: 阅读全文

posted @ 2020-08-17 15:11 kingBook 阅读(1127) 评论(0) 推荐(0)

2020年8月14日 #

Canvas 绘画

摘要: https://www.runoob.com/html/html5-canvas.html 在线测试: https://www.runoob.com/try/try.php?filename=tryhtml5_canvas_tut_path 阅读全文

posted @ 2020-08-14 19:01 kingBook 阅读(107) 评论(0) 推荐(0)

CocosCreator 要用3D节点实现skewX

摘要: //已知skewX let k = Math.abs(Math.tan(skewX * Math.PI / 180)); let angle = Math.acos((Math.sqrt(4 + k * k) - k) / 2) * 180 / Math.PI; let scale = 2 / (M 阅读全文

posted @ 2020-08-14 16:51 kingBook 阅读(781) 评论(0) 推荐(0)

2020年8月13日 #

Unity Mesh(网格)

摘要: Mesh: vertices: normals: uv: tangents: boneWeights : colors/colors32: //顶点位置数组 public Vector3[] vertices ; //两种方法更改 //public void SetVertices (List<Ve 阅读全文

posted @ 2020-08-13 14:50 kingBook 阅读(1655) 评论(0) 推荐(0)

凹多边形三角剖分

摘要: https://www.cnblogs.com/lan-yt/p/9200621.html Unity中实现模型的切割——EzySlice: https://liuhaowen.blog.csdn.net/article/details/109740462 模型切割插件: https://githu 阅读全文

posted @ 2020-08-13 14:00 kingBook 阅读(419) 评论(0) 推荐(0)

2020年8月12日 #

UnityHub 登录失败

摘要: https://blog.csdn.net/Gao_sun/article/details/106998639 1.取消ssl验证:npm config set strict-ssl false(我在这步就解决了问题) 2.如果第一步不行,将npm源更换为国内镜像: npm config set r 阅读全文

posted @ 2020-08-12 21:16 kingBook 阅读(1143) 评论(0) 推荐(0)

2020年8月11日 #

CocosCreator 多个对象权重计算

摘要: //权重对象列表 var weightObjects=[ {weight:100}, {weight:80}, {weight:500} ]; //总权重 var sumWeight=0; for(var i=0;i<weightObjects.length;i++){ sumWeight+=wei 阅读全文

posted @ 2020-08-11 12:14 kingBook 阅读(323) 评论(0) 推荐(0)

2020年8月8日 #

Windows搭建Apache服务器

摘要: 1.下载Apache https://www.apachelounge.com/download/ 解压之后: 2.只用到Apache24文件夹,将它拷贝到你的自定义目录,并修改配置。 如:D:\Apache24,用文本编辑器打开 Apache24\conf\httpd.conf 配置文件。 3.运 阅读全文

posted @ 2020-08-08 17:05 kingBook 阅读(580) 评论(0) 推荐(0)

2020年8月7日 #

CocosCreator 提前计算刚体位置

摘要: b2Body.prototype.ApplyLinearImpulseToCenter = function (impulse, wake) { if (wake void 0) { wake = true; } if (this.m_type !== exports.b2BodyType.b2_d 阅读全文

posted @ 2020-08-07 16:51 kingBook 阅读(468) 评论(0) 推荐(0)

CocosCreator 抛物计算

摘要: https://www.cnblogs.com/lamyoung/p/12105393.html 阅读全文

posted @ 2020-08-07 14:49 kingBook 阅读(233) 评论(0) 推荐(0)

三角函数

摘要: https://baike.baidu.com/item/%E4%B8%89%E8%A7%92%E5%87%BD%E6%95%B0%E5%85%AC%E5%BC%8F/4374733 https://zhuanlan.zhihu.com/p/390928056 $\frac{sin \alpha}{ 阅读全文

posted @ 2020-08-07 14:41 kingBook 阅读(99) 评论(0) 推荐(0)

git pull 与 git fetch

摘要: git pull: 官方说明:https://git-scm.com/docs/git-pull git pull 作用是将远程仓库中的更改合并到当前分支中 格式: git pull [<options>] [<repository> [<refspec>…​]] 默认模式下,相当于 git fet 阅读全文

posted @ 2020-08-07 10:32 kingBook 阅读(231) 评论(0) 推荐(0)

2020年8月6日 #

CocosCreator 在编辑器中隐藏父类的属性

摘要: const{ccclass,property}=cc._decorator; @ccclass export default class CustomJoint extends cc.Joint{ @property({override:true,visible:false}) connectedB 阅读全文

posted @ 2020-08-06 10:52 kingBook 阅读(328) 评论(0) 推荐(0)

2020年8月5日 #

CocosCreator 初始化物理引擎

摘要: ####注意:初始物理引擎的代码必须在onLoad()函数。 const {ccclass, property} = cc._decorator; @ccclass export default class InitPhysics extends cc.Component { onLoad(){ l 阅读全文

posted @ 2020-08-05 16:52 kingBook 阅读(256) 评论(0) 推荐(0)

CocosCreator Touch转世界坐标

摘要: 当场景中存在相机时,Touch的世界坐标会受到相机影响。 当相机位置处于(0,0)时或没有相机时,Touch.getLocation()得到的值就是世界坐标, 当存在相机和相机位置发生位移时,如在(100,100)的位置,此时Touch的世界坐标就受到影响。 let camera=cc.Camera 阅读全文

posted @ 2020-08-05 14:24 kingBook 阅读(1053) 评论(0) 推荐(0)

2020年8月4日 #

CocosCreator 全局Touch事件

摘要: ####全局的Touch事件 const{ccclass}=cc._decorator; @ccclass export default class GlobalTouchInput extends cc.Component{ private _eventManager=cc["internal"] 阅读全文

posted @ 2020-08-04 14:33 kingBook 阅读(1624) 评论(0) 推荐(0)

CocosCreator Texture2d.initWithData方法

摘要: var imgWidth = 200; var imgHeight = 200; var count = imgWidth * imgHeight * 4; var imgData =new Uint8Array(count); for (var j = 0; j < count; j += 4) 阅读全文

posted @ 2020-08-04 11:49 kingBook 阅读(1116) 评论(0) 推荐(0)

2020年7月29日 #

CocosCreator 刚体与多边形碰撞器的单向碰撞(向上跳穿过时忽略碰撞)

摘要: const{ccclass,property}=cc._decorator; @ccclass export default class Player extends cc.Component{ private _rigidBody:cc.RigidBody; private _disabledB2 阅读全文

posted @ 2020-07-29 14:19 kingBook 阅读(902) 评论(0) 推荐(0)

2020年7月24日 #

TypeScript 数组遍历方法:map

摘要: map() 方法创建一个新数组,其结果是该数组中的每个元素是调用一次提供的函数后的返回值。 const array1 = [1, 4, 9, 16]; // pass a function to map const map1 = array1.map(x => x * 2); console.log 阅读全文

posted @ 2020-07-24 16:59 kingBook 阅读(4862) 评论(0) 推荐(0)

TypeScript 函数重载

摘要: export default class Test extends cc.Component{ //#region 声明 public foo():void; public foo(a:string,b:string):string; public foo(a:number,b:number):nu 阅读全文

posted @ 2020-07-24 14:32 kingBook 阅读(459) 评论(0) 推荐(0)

TypeScript 判断类型

摘要: //1. typeof typeof padding "number"; typeof padding "string"; typeof obj "object"; //2. instanceof if(padder instanceof SpaceRepeatingPadder){ //do so 阅读全文

posted @ 2020-07-24 09:46 kingBook 阅读(3285) 评论(0) 推荐(0)

2020年7月23日 #

Cocos Creator Editor 读取和保存.meta

摘要: var fs=require('fs'); //读取.meta //result.path 如:E:\projects\ccc_test\assets\arrow.plist let plistMetaPath=result.path+".meta" let plistMetaStrings=fs. 阅读全文

posted @ 2020-07-23 00:36 kingBook 阅读(704) 评论(0) 推荐(0)

2020年7月22日 #

JavaScript 工具

摘要: JS压缩工具: https://tool.oschina.net/jscompress/ 阅读全文

posted @ 2020-07-22 00:41 kingBook 阅读(170) 评论(0) 推荐(0)

2020年7月20日 #

CocosCreator 物理引擎中的碰撞平面的法线

摘要: CocosCreator使用的是box2d.js物理引擎,碰撞平面法线方向必须取反 private onBeginContact(contact:cc.PhysicsContact,selfCollider:cc.PhysicsCollider,otherCollider:cc.PhysicsCol 阅读全文

posted @ 2020-07-20 14:28 kingBook 阅读(848) 评论(0) 推荐(0)

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