kingBook

导航

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

2019年6月20日 #

GameObject:activeInHierarchy、activeSelf Behaviour:enabled

摘要: GameObject: activeInHierarchy 定义 GameObject 在 Scene 中是否处于活动状态,会影响所有子级的activeInHierarchy activeSelf 这是使用 GameObject.SetActive 设置的,当父级在Scene处于活动状态不会影响此值 阅读全文

posted @ 2019-06-20 11:52 kingBook 阅读(335) 评论(0) 推荐(0) 编辑

2019年6月19日 #

unity Time.deltaTime

摘要: 完成上一帧所用的时间(以秒为单位)(只读)。 从 MonoBehaviour 的 FixedUpdate 内部调用时, 返回固定帧率增量时间。 如果您在每一帧中添加或减去一个值,则您可能应该乘以 Time.deltaTime。 与 Time.deltaTime 相乘的基本含义是: 我需要让该对象每秒 阅读全文

posted @ 2019-06-19 11:15 kingBook 阅读(169) 评论(0) 推荐(0) 编辑

2019年6月14日 #

unity 可获取的路径

摘要: ```C# System.Environment.CurrentDirectory //获取到本地工程的绝对路径 Application.dataPath //Assets资源文件夹的绝对路径 Application.persistentDataPath //持久性的数据存储路径,在不同平台路径不同,但都存在,绝对路径 Application.streamin... 阅读全文

posted @ 2019-06-14 15:25 kingBook 阅读(4861) 评论(0) 推荐(0) 编辑

2019年6月13日 #

拉丁字母发音表

摘要: ![](https://img2018.cnblogs.com/blog/714380/201906/714380-20190613212305522-832670075.jpg) 阅读全文

posted @ 2019-06-13 21:23 kingBook 阅读(6981) 评论(0) 推荐(0) 编辑

2019年6月10日 #

unity 获取DontDestroyOnLoad的游戏对象

摘要: ```C# private GameObject[] getDontDestroyOnLoadGameObjects(){ var allGameObjects=new List(); allGameObjects.AddRange(FindObjectsOfType()); //移除所有场景包含的对象 for(var i=0;i=0){ if(allGameObjects[k].tr... 阅读全文

posted @ 2019-06-10 22:15 kingBook 阅读(1948) 评论(0) 推荐(0) 编辑

2019年5月29日 #

scheduleOnce时出错,CCScheduler#scheduleSelector. Selector already scheduled. Updating interval from: 0 to 0"

摘要: startDisplayTimer(){ this.scheduleOnce(this.displayNumber,1); } displayNumber(){ this.startDisplayTimer(); } //test this.startDisplayTimer(); 由于在sched 阅读全文

posted @ 2019-05-29 22:41 kingBook 阅读(1604) 评论(0) 推荐(0) 编辑

正比适配,留黑边

摘要: 如果designW=960,designH=640,那么sprite可显示的高最好也是960,sprite可显示的宽就视屏幕的宽而定 阅读全文

posted @ 2019-05-29 15:52 kingBook 阅读(126) 评论(0) 推荐(0) 编辑

2019年5月27日 #

泛型单例

摘要: using System.Collections; using System.Collections.Generic; using UnityEngine; public abstract class BaseApp<T>:MonoBehaviour where T:class,new(){ pro 阅读全文

posted @ 2019-05-27 12:15 kingBook 阅读(290) 评论(0) 推荐(0) 编辑

2019年5月24日 #

泛型

摘要: ```C# private void Start() { SpriteRenderer renderer=createObjAddComponent("testObj"); Debug.Log(renderer);//output: testObj (UnityEngine.SpriteRenderer) } private T createObjAddComponent(string na... 阅读全文

posted @ 2019-05-24 17:06 kingBook 阅读(79) 评论(0) 推荐(0) 编辑

2019年5月23日 #

UGUI Canvas(二)

摘要: public bool pixelPerfect; 强制Canvas中的元素与像素对齐,仅适用于rendermode=Screen Space。 启用PixelPerfect可以使元素看起来更清晰并防止模糊。但是,如果许多元素被缩放或旋转,或者使用细微的动画位置或缩放,那么禁用PixelPerfec 阅读全文

posted @ 2019-05-23 11:32 kingBook 阅读(68) 评论(0) 推荐(0) 编辑

2019年5月22日 #

停车小游戏

摘要: ``` //lunRotation轮子的方向[-45,45] //把车轮向量分解成两个分量:X轴方向的为推力(前进力),影响汽车的位移 //Y轴方向的为旋转力,影响汽车的角度 onward = speed * Math.cos(lunRotation*Math.PI/180);//汽车位移,x轴方向的分力 var yy:Number = speed * Math.sin(lunRotation*M... 阅读全文

posted @ 2019-05-22 17:15 kingBook 阅读(114) 评论(0) 推荐(0) 编辑

2019年5月21日 #

解决文件超过大小限制(50M)不能推送到远程仓库

摘要: 方法一:使用Git LFS 先安装 Git LFS 的客户端 git lfs install 跟踪一下你要push的大文件的文件或指定文件类型 git lfs track "BUFoundation" git lfs track "*.fla" git lfs track "views.fla" 以 阅读全文

posted @ 2019-05-21 15:14 kingBook 阅读(1590) 评论(0) 推荐(0) 编辑

2019年5月19日 #

2.5 等比数列的前n项和

摘要: 一般地,对于等比数列 $$a_1,a_2,a_3,\ldots,a_n,\ldots,$$ 它的前$n$项和是 $$S_n=a_1+a_2+a_3+\ldots+a_n.$$ 根据等比数列的通项公式,上式可写成 $$S_n=a_1+a_1q+a_1q^2+\ldots+a_1q^{n-1}.\ \ 阅读全文

posted @ 2019-05-19 01:41 kingBook 阅读(1748) 评论(0) 推荐(0) 编辑

2019年5月16日 #

2.4 等比数列

摘要: 公比是$q$的等比数列${a_n}$的通项公式: $\ \ \ \ a_n=a_1q^{n 1}$ 阅读全文

posted @ 2019-05-16 00:18 kingBook 阅读(152) 评论(0) 推荐(0) 编辑

2019年5月6日 #

2.3 等差数列的前n项和

摘要: 一般地,我们称 $$a_1+a_2+a_3+\ldots+a_n$$ 为数列$\{a_n\}$的前n项和,用$S_n$表示,即 $$S_n=a_1+a_2+a_3+\ldots+a_n.$$ 由高斯算法的启示,对于公差为$d$的等差数列,我们用两种方式表示$S_n$: $$S_n=a_1+(a_1+ 阅读全文

posted @ 2019-05-06 21:17 kingBook 阅读(1610) 评论(0) 推荐(0) 编辑

2019年5月5日 #

2.2 等差数列

摘要: 如果等差数列$\{a_n\}$的首项是$a_1$,公差是$d$,根据等差数列的定义,可以得到 $a_2 a_1=d,\ a_3 a_2=d,\ a_4 a_3=d,\ \ldots$ 所以 $a_2=a_1+d,$ $a_3=a_2+d=(a_1+d)+d=a_1+2d,$ $a_4=a_3+d=( 阅读全文

posted @ 2019-05-05 23:34 kingBook 阅读(105) 评论(0) 推荐(0) 编辑

2019年4月25日 #

1.1.1 三角形正弦定理

摘要: 正弦定理(law of sines) 在一个三角形中,各边和它所对角的正弦的比相等, 即 $ \frac{a}{sin A} = \frac{b}{sin B} = \frac{c}{sinC}$ 阅读全文

posted @ 2019-04-25 22:26 kingBook 阅读(607) 评论(0) 推荐(0) 编辑

2019年4月16日 #

调整颜色

摘要: fl包:链接:http://pan.baidu.com/s/1mihxOgw 密码:kxn1 阅读全文

posted @ 2019-04-16 14:21 kingBook 阅读(108) 评论(0) 推荐(0) 编辑

2019年4月15日 #

去括号法则

摘要: 括号前面是加号时,去掉括号,括号内的算式不变。 括号前面是减号时,去掉括号,括号内加号变减号,减号变加号。 $a b= ( a+b)$ $a b= 1\times ( a+b)$ 阅读全文

posted @ 2019-04-15 21:29 kingBook 阅读(1383) 评论(0) 推荐(0) 编辑

2019年4月14日 #

直线与方程

摘要: 斜率: $k=tan\ a$ 经过两点的直线的斜率公式: $k=\frac{y_2 y_1}{x_2 x_1}$ 两直线平行判定: $l_1//l_2\Longleftrightarrow\ k_1\ =k_2$ 两直线垂直判定: 由 $tan\ a_2=tan(90^\circ+a_1)= \fr 阅读全文

posted @ 2019-04-14 01:12 kingBook 阅读(525) 评论(0) 推荐(0) 编辑

2019年4月12日 #

向量积(外积、叉积、矢积、叉乘)

摘要: 向量积,数学中又称外积、叉积,物理中称矢积、叉乘. 它的运算结果是一个向量而不是一个标量. 并且两个向量的叉积与这两个向量和垂直. 向量积可以被定义为: $|\vec{a} \times \vec{b}|=|\vec{a}| \cdot|\vec{b}| \cdot \sin \theta$ 其中$ 阅读全文

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

向量的点积(标量积、内积)

摘要: #####几何意义: 1.计算两个向量之间的夹角 2.计算一个向量在另一个向量上的投影 #####代数定义: $\vec{a} \bullet \vec{b}=x_{1} x_{2}+y_{1} y_{2}$ #####几何定义 $\vec{a} \bullet \vec{b}=|\vec{a}| 阅读全文

posted @ 2019-04-12 16:03 kingBook 阅读(2603) 评论(0) 推荐(0) 编辑

2019年4月11日 #

BitmapData.threshold()方法

摘要: ![](https://img2018.cnblogs.com/blog/714380/201904/714380-20190411100843888-1410146598.png) ```ActionScript import flash.display.Bitmap; import flash.display.BitmapData; import flash.geom.Rectangle; ... 阅读全文

posted @ 2019-04-11 10:08 kingBook 阅读(252) 评论(0) 推荐(0) 编辑

2019年4月3日 #

Unity 自定义导入时切割Sprite

摘要: using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; using System.IO; using System.Xml; using UnityEditor 阅读全文

posted @ 2019-04-03 11:26 kingBook 阅读(1169) 评论(0) 推荐(0) 编辑

2019年3月26日 #

匀变速直线运动的速度与位移的关系

摘要: ![](https://img2018.cnblogs.com/blog/714380/201903/714380-20190326200614026-1730379055.png) 阅读全文

posted @ 2019-03-26 20:05 kingBook 阅读(366) 评论(0) 推荐(0) 编辑

2019年3月20日 #

1.1.2 三角形余弦定理

摘要: 含义: 对于任意三角形,任何一边的平方等于其他两边平方的和减去这两边与它们夹角的余弦的积的两倍。 几何意义: $c^2=(b \cdot sin \theta)^2 + (a-b \cdot cos \theta)^2$ $\ \ \ =(b \cdot sin \theta)^2 + a^2 + 阅读全文

posted @ 2019-03-20 17:26 kingBook 阅读(1205) 评论(0) 推荐(0) 编辑

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 阅读(470) 评论(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 阅读(4879) 评论(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 阅读(675) 评论(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 阅读(6966) 评论(1) 推荐(2) 编辑

2019年1月31日 #

C# 数值的隐式转换

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

posted @ 2019-01-31 16:22 kingBook 阅读(284) 评论(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 阅读(15210) 评论(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 阅读(1386) 评论(0) 推荐(0) 编辑

2019年1月23日 #

Unity for VsCode

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

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

2019年1月22日 #

C# Lambda

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

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

2019年1月16日 #

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

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

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

2019年1月11日 #

C#保留小数

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

posted @ 2019-01-11 17:42 kingBook 阅读(472) 评论(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 阅读(135) 评论(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 阅读(723) 评论(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 阅读(163) 评论(0) 推荐(0) 编辑

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