kingBook

导航

上一页 1 ··· 5 6 7 8 9 10 11 12 13 下一页

2019年3月20日 #

ccc切割刚体

摘要: ```javascript // http://www.emanueleferonato.com/2011/08/05/slicing splitting and cutting objects with box2d part 4 using real graphics/ const EPSILON 阅读全文

posted @ 2019-03-20 11:33 kingBook 阅读(477) 评论(0) 推荐(0)

2019年3月15日 #

Unity 获取指定资源目录下的所有文件

摘要: string path="Assets";//Assets/Scenes if(Directory.Exists(path)){ DirectoryInfo directoryInfo=new DirectoryInfo(folderPath); FileInfo[] fileInfos=direc 阅读全文

posted @ 2019-03-15 10:45 kingBook 阅读(4912) 评论(0) 推荐(0)

2019年2月1日 #

保存xml报错 'UTF_8' is not a supported encoding name

摘要: ArgumentException: 'UTF_8' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.Reg 阅读全文

posted @ 2019-02-01 16:04 kingBook 阅读(702) 评论(0) 推荐(0)

C# 获取当前方法的名称空间、类名和方法名称

摘要: ```C# var className=System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name; ``` ```C# public string GetMethodInfo() { string str = ""; //取得当前方法命名空间 str += "命名空间名:" + Sys... 阅读全文

posted @ 2019-02-01 13:56 kingBook 阅读(6995) 评论(1) 推荐(2)

2019年1月31日 #

C# 数值的隐式转换

摘要: "隐式数值转换表" 阅读全文

posted @ 2019-01-31 16:22 kingBook 阅读(290) 评论(0) 推荐(0)

2019年1月29日 #

C# using 三种使用方式

摘要: 1.using指令。 using 命名空间名字。 例如: 这样可以在程序中直接用命令空间中的类型,而不必指定类型的详细命名空间,类似于Java的import,这个功能也是最常用的,几乎每个cs的程序都会用到。 例如:using System; 一般都会出现在 .cs中。 2.using别名。 usi 阅读全文

posted @ 2019-01-29 11:34 kingBook 阅读(15246) 评论(0) 推荐(1)

2019年1月25日 #

C# 数据类型的默认值

摘要: using System.Collections; using System.Collections.Generic; using UnityEngine; public class Main : MonoBehaviour{ private bool boolVal; private byte b 阅读全文

posted @ 2019-01-25 17:06 kingBook 阅读(1402) 评论(0) 推荐(0)

2019年1月23日 #

Unity for VsCode

摘要: 安装以下两个插件 以下设置VsCode在换行保存时不删除tab空格 阅读全文

posted @ 2019-01-23 21:57 kingBook 阅读(1936) 评论(0) 推荐(0)

2019年1月22日 #

C# Lambda

摘要: ```C# ()=>{ return result; } (a,b)=>{ } ``` 阅读全文

posted @ 2019-01-22 12:07 kingBook 阅读(122) 评论(0) 推荐(0)

2019年1月16日 #

git push以后GitHub上文件夹灰色 不可点击

摘要: 1.删除本地文件夹里的 .git .gitignore文件 2.如果没成功,就把文件名改下,应该是有缓存,改完名后再add/commit/push 阅读全文

posted @ 2019-01-16 10:17 kingBook 阅读(1302) 评论(0) 推荐(0)

2019年1月11日 #

C#保留小数

摘要: 四舍五入保留 直接截取: 此方法在Unity下发现无法以下形式出现错误(Unity 2018.3.0f2): 阅读全文

posted @ 2019-01-11 17:42 kingBook 阅读(482) 评论(0) 推荐(0)

2019年1月4日 #

C#可变参数params

摘要: ``` C# using System.Collections; using System.Collections.Generic; using UnityEngine; public class TestParams:MonoBehaviour{ private void Start(){ test(1,2,3,4); ... 阅读全文

posted @ 2019-01-04 20:32 kingBook 阅读(139) 评论(0) 推荐(0)

2019年1月3日 #

经过多个点画曲线

摘要: ``` package app{ import flash.display.Sprite; import flash.geom.Point; import framework.game.Game; import g.objs.MyObj; / var curve:Curve=Curve.create 阅读全文

posted @ 2019-01-03 14:40 kingBook 阅读(740) 评论(0) 推荐(0)

for里的上一个/下一个下标/反转坐标的写法

摘要: const len:int=10; for(var:int=0;i<len;i++){ var previ:int=(i-1+len)%len; var nexti:int=(i+1)%len; } var arr:Array=new Array(0,1,2,3,4); var reserveArr 阅读全文

posted @ 2019-01-03 11:44 kingBook 阅读(170) 评论(0) 推荐(0)

2018年12月29日 #

git 每次push都需要输入用户和密码

摘要: 原因是使用了https/http的方式来push 1.移除原来的remote 2.创建新的remote 3.再输入git remote v ,发现remote改变了 阅读全文

posted @ 2018-12-29 09:48 kingBook 阅读(128) 评论(0) 推荐(0)

2018年10月11日 #

颜色

摘要: 相斥色:红 绿,黄 紫,橙 蓝(混在一起变黑色) 不论是普通铅笔还是彩铅或者是油画棒,它们在纸面上留下的颜色细腻与否,取决于四个方面: 第一,排线力度是否均匀,角度是否稳定; 第二,所用画笔的硬度; 第三,所用纸张表面的粗细程度; 第四,有没有对其进行二次加工,比如用纸巾、擦笔、手指、棉签、海绵、馒 阅读全文

posted @ 2018-10-11 10:24 kingBook 阅读(149) 评论(0) 推荐(0)

2018年10月10日 #

编程单词

摘要: front 前方的 rear 后方的 Find the closest spawn point.寻找最近的繁殖点 spawn point [spɔːn pɔɪnt] 重生点 relative [ˈrelətɪv] 相对的 waypoint [ˈweɪpɔɪnt] 航路点(飞行或航海每一阶段的坐标点) 阅读全文

posted @ 2018-10-10 11:39 kingBook 阅读(168) 评论(0) 推荐(0)

2018年8月30日 #

头部结构

摘要: ![](https://images2018.cnblogs.com/blog/714380/201808/714380-20180830001847786-2047546685.png) ![](https://images2018.cnblogs.com/blog/714380/201808/714380-20180830001904513-1185956633.png) 阅读全文

posted @ 2018-08-30 00:19 kingBook 阅读(194) 评论(0) 推荐(0)

2018年8月15日 #

js 获取北京时间

摘要: ```javaScript ``` 阅读全文

posted @ 2018-08-15 11:11 kingBook 阅读(9730) 评论(3) 推荐(0)

2018年8月14日 #

unity 获取网络时间

摘要: "http://cgi.im.qq.com/cgi bin/cgi_svrtime" 阅读全文

posted @ 2018-08-14 17:38 kingBook 阅读(521) 评论(0) 推荐(0)

2018年8月3日 #

焊接关节(Weld Joint)

摘要: "源码地址" ) 阅读全文

posted @ 2018-08-03 14:08 kingBook 阅读(1059) 评论(0) 推荐(0)

2018年6月5日 #

经典的随机数获取

摘要: ``` float timeValue = glfwGetTime(); float greenValue = (sin(timeValue) / 2.0f) + 0.5f; ``` 阅读全文

posted @ 2018-06-05 10:24 kingBook 阅读(485) 评论(0) 推荐(0)

2018年5月19日 #

creator.d.ts 的错误

摘要: ``` //export class PhysicsCollider{ export class PhysicsCollider extends Collider{ ==================检查代码======================= this.node.getComponent(cc.PhysicsBoxCollider); ==================检查代... 阅读全文

posted @ 2018-05-19 22:21 kingBook 阅读(364) 评论(0) 推荐(0)

2018年4月27日 #

git rebase 合并多个commit

摘要: 更多参考:https://zhuanlan.zhihu.com/p/139321091 进入 rebase: git rebase -i <commit_sha>: 如 git rebase -i 98c8935 ,列出 98c8935 之后的所有提交 git rebase -i HEAD~<id> 阅读全文

posted @ 2018-04-27 11:58 kingBook 阅读(300) 评论(0) 推荐(0)

git reset

摘要: git reset [--soft | --mixed | --hard] [HEAD] --mixed 重置 HEAD 和索引 (默认,可以不用带该参数) --soft 仅重置 HEAD --hard 重置 HEAD, 索引和工作区(注意:使用--hard时,请确保工作区已提交或备份,否则会销毁工 阅读全文

posted @ 2018-04-27 09:53 kingBook 阅读(237) 评论(0) 推荐(0)

2018年4月19日 #

NetStream 记录

摘要: bufferLength : Number [只读] 数据当前存在于缓冲区中的秒数。(已进入缓冲区的秒数) bufferTime : Number 指定在开始显示流之前需要多长时间将消息存入缓冲区。(默认0.1秒, 缓冲区大小,就是需要bufferLength要达到0.1才能播放显示) buffer 阅读全文

posted @ 2018-04-19 16:10 kingBook 阅读(170) 评论(0) 推荐(0)

2018年4月12日 #

JSFL 禁止脚本运行时间太长的警告

摘要: ``` javaScript fl.showIdleMessage(false); ``` 阅读全文

posted @ 2018-04-12 18:22 kingBook 阅读(181) 评论(0) 推荐(0)

2018年4月8日 #

Cocos Creator set get

摘要: TypeScript中的set与get private _id:number; public get id():number{ return this._id; } public set id(value:number){//set:必须无返回值类型 this._id=value; } Inspec 阅读全文

posted @ 2018-04-08 20:06 kingBook 阅读(1312) 评论(0) 推荐(0)

FlashDevelop关闭分号自动格式化

摘要: 菜单Tools Program Settings ASCompletion Helpers Characters Requiring Whitespace 清空",; + =/%|&!^" 关闭代码格式化: 菜单Tools Program Settings ASCompletion Helpers 阅读全文

posted @ 2018-04-08 10:58 kingBook 阅读(236) 评论(0) 推荐(0)

2018年3月20日 #

MarkDown语法

摘要: H1 H2 H3 H4 H5 H6 Alt-H1 Alt-H2 # H1 ## H2 ### H3 #### H4 ##### H5 ###### H6 Alt-H1 Alt-H2 baidu [baidu](https://www.baidu.com) Tables Are Cool col 3 阅读全文

posted @ 2018-03-20 18:15 kingBook 阅读(173) 评论(0) 推荐(0)

getVisibleSize,getWinSize,getFrameSize,getViewPortRect

摘要: 使用以下代码在chrome中测试得出结果 1.cc.director.getVisibleSize();//获取运行场景的可见大小 _不理解,它和我用截图工具测量的不一样啊??_ 2.cc.director.getWinSize();//获取视图的大小,以点为单位 cc.director.getWi 阅读全文

posted @ 2018-03-20 18:05 kingBook 阅读(861) 评论(0) 推荐(0)

2018年3月7日 #

VsCode 使用习惯设置(备份)

摘要: { "window.menuBarVisibility": "toggle", "workbench.statusBar.visible": true, "workbench.activityBar.visible": true, "editor.minimap.enabled": false, "editor.formatOnType": false, ... 阅读全文

posted @ 2018-03-07 15:30 kingBook 阅读(1566) 评论(0) 推荐(0)

2018年2月24日 #

unity WegGL 调用js

摘要: test.jslib文件,必须放到Assets/Plugins下,这里是:Assets/Plugins/WebGL callJSTest.cs文件,绑定到任意GameObject中。 源码地址:https://github.com/kingBook/unityWebGLCallJS 阅读全文

posted @ 2018-02-24 09:52 kingBook 阅读(5250) 评论(0) 推荐(0)

2018年2月7日 #

CocosCreator 自定义TypeScript在VsCode的提示数据

摘要: 在assets文件夹外新建xx.d.ts文件如:global.d.ts global.d.ts 就可以提示了 阅读全文

posted @ 2018-02-07 10:14 kingBook 阅读(986) 评论(0) 推荐(0)

2018年2月6日 #

unity Flash Animation Toolset插件使用

摘要: 插件网站:http://matov.me/flash-animation-toolset/ 1.在unity上打开资源商店,Window -> Asset Store -> 搜索Flash Animation Toolset,下载并导入unity。 2.在Flash中打开要转换的fla文件,将要转换 阅读全文

posted @ 2018-02-06 16:46 kingBook 阅读(2913) 评论(0) 推荐(0)

2018年1月30日 #

ref与out

摘要: 注意点: ref和out都是按地址传递,使用后都将改变原来参数的数值 方法定义和调用方法都必须显式使用 ref/out 关键字 ref: 作为ref参数传递的变量在方法调用中传递之前必须初始化 out: 作为 out 参数传递的变量在方法调用中传递之前不必初始化 被调用的方法需要在返回之前赋一个值 阅读全文

posted @ 2018-01-30 10:33 kingBook 阅读(179) 评论(0) 推荐(0)

2018年1月11日 #

重写基类方法,快速实现基类纯虚方法

摘要: 基类定义纯虚方法: 在子类的.h文件中,基类名上右键-快速操作和重构-实现基"xxx"的纯虚方法 阅读全文

posted @ 2018-01-11 16:32 kingBook 阅读(691) 评论(0) 推荐(0)

2017年12月26日 #

git tag

摘要: 更多参考:Git - 打标签 (git-scm.com) 命令行: git tag -a v3.0 -m "这是4.0版本" git push origin v3.0 # git tag -a 标签名称 -m "说明" # git push origin 标签名称 # 附注标签 git tag -a 阅读全文

posted @ 2017-12-26 14:37 kingBook 阅读(12721) 评论(0) 推荐(1)

2017年11月24日 #

物理

摘要: 1 N=1 kg·m/s² F=ma G=mg G:重力,单位为牛顿(N);m:质量,单位为(kg);g:重力与质量的比值约是9.8N/kg。 F=GMm/r2 ∵F=ma=mg ∴mg=GMm/r2 ∴g=GM/r2 g==GM/r2 g:重力加速度(m/s2);G:重力 G=F=mg; v2=2 阅读全文

posted @ 2017-11-24 09:32 kingBook 阅读(250) 评论(0) 推荐(0)

2017年11月10日 #

vscode-nextgenas编译配置

摘要: 文档:https://github.com/BowlerHatLLC/vscode-nextgenas/wiki/asconfig.json asconfig.json swf-version与target-player的关系:https://blog.zengrong.net/post/1486. 阅读全文

posted @ 2017-11-10 14:52 kingBook 阅读(526) 评论(0) 推荐(0)

上一页 1 ··· 5 6 7 8 9 10 11 12 13 下一页