redlkop

导航

2017年10月24日 #

C#算法与数据结构之线性结构

摘要: 线性结构是什么? 线性结构是一种数据结构,它有一对一的关系,就像一个长对,一个接一个,特点是,除第一个元素和最后一个元素外,其它元素前后只有一个元素。 简单示例1: 输出为:456 3 789 2 线性表实现方式 顺序表:连续排放 单链表: 双向链表 循环链表 自设一个List<>: 首先创建一个接 阅读全文

posted @ 2017-10-24 18:06 redlkop 阅读(1252) 评论(0) 推荐(0) 编辑

2017年10月20日 #

编程设计模式之单例模式

摘要: 单例模式,unity中一种很常用的设计模式,从“单例”字面意思上理解为——一个类只有一个实例,即保证一个类只有一个实例的一种实现方法,官方给出的定义是定义:确保一个类只有一个实例,并提供一个全局访问点。 这里运用老师的思路自己弄的一张设计UGUI框架的图: 这里的运用就是单例模式,就像开汽车,我不必 阅读全文

posted @ 2017-10-20 02:21 redlkop 阅读(225) 评论(0) 推荐(0) 编辑

2017年10月16日 #

uintAPi 之Renderer.material

摘要: Renderer.material public Material material; Returns the first instantiated Material assigned to the renderer. Returns the first instantiated Material  阅读全文

posted @ 2017-10-16 21:21 redlkop 阅读(331) 评论(0) 推荐(0) 编辑

2017年10月14日 #

unity API 之EventSystem.current.IsPointerOverGameObject()

摘要: 命名空间 :UnityEngine.EventSystems 官方描述: public bool IsPointerOverGameObject(); public bool IsPointerOverGameObject(int pointerId); //触摸屏时需要的参数,即检测触碰的手值 I 阅读全文

posted @ 2017-10-14 22:47 redlkop 阅读(5078) 评论(0) 推荐(0) 编辑

2017年10月13日 #

unity 的一些API-01

摘要: public static float GetAxis(string axisName); 看下原话解释: Returns the value of the virtual axis identified by axisName. Returns the value of the virtual a 阅读全文

posted @ 2017-10-13 23:51 redlkop 阅读(166) 评论(0) 推荐(0) 编辑

lua-01

摘要: ctrl + shift + L =>Lua的快捷键 回调代码: function fact(n) if n == 1 then returen n else return n*fact(n-1) end function 可作为值那样传递: function test(tab,fun)for k, 阅读全文

posted @ 2017-10-13 00:31 redlkop 阅读(130) 评论(0) 推荐(0) 编辑

2017年9月28日 #

值类型和引用类型的详细讨论

摘要: 值类型:(原话定义)值类型的变量直接包含值,换言之变量引用的位置就是值在内存中实际存储的位置。 这句话也就是说,值类型的赋值是不会引用同一内存位置的,除了out和ref参数,更改原始变量不影响其它变量的值(因为变量歌有各的位置) 栈 依次向下: int number1 =42; char lette 阅读全文

posted @ 2017-09-28 21:41 redlkop 阅读(434) 评论(1) 推荐(0) 编辑