🧐

Lua_条件分支

print("**********条件分支语句************") a = 9 --if 条件 then.....end --单分支 if a > 5 then print("123") end --双分支 -- if 条件 then.....else.....end if a < 5

小鸟游星野 Published on 2025-03-14

Lua_运算符

print("**********运算符************") print("**********算数运算符************") -- + - * / % ^ -- 没有自增自减 ++ -- -- 没有复合运算符 += -= /= *= %= --字符串 可以进行 算数运算符操作 会自

小鸟游星野 Published on 2025-03-14

Lua_String方法

print("**********字符串************") str = "双引号字符串" str2 = '单引号字符串' --获取字符串的长度 print("**********字符串长度************") s = "aBcdEfG字符串" --一个汉字占3个长度 --英文字符

小鸟游星野 Published on 2025-03-14

Lua简单变量类型

print("**********变量************") --lua当中的简单变量类型 -- nil number string boolean --lua中所有的变量申明 都不需要申明变量类型 他会自动的判断类型 --类似C# 里面的 var --lua中的一个变量 可以随便赋值 ——自

小鸟游星野 Published on 2025-03-14

Unity_AB包资源管理器

using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; //知识点 //字典 //协程 //AB包相关API //委托 //lambda表达式

小鸟游星野 Published on 2025-03-14

Unity_基于观察者模式的事件中心模块

using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; public abstract class ObjBase { } publ

小鸟游星野 Published on 2025-03-13

Unity_实现最简单的缓存池模块

using System.Collections; using System.Collections.Generic; using UnityEngine; public class MyPoolObjectPos { private GameObject objFather; pr

小鸟游星野 Published on 2025-03-11

Unity_公共Mono模块

using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; //该公共mono模块用来解决别的不继承mono类的对象使用

小鸟游星野 Published on 2025-03-10

Unity中的“饿汉”和“懒汉”单例模式

这个懒字体现在:这种单例模式只会在第一次使用时才创建事例,而不是应用程序启动时就创建。一种“敌不动我不动”,“催一下动一下”的感觉 它的好处也在于此,因为只有当我们代码中需要用到某个单例模式对象时才会去实例化分配内存。

小鸟游星野 Published on 2025-03-08

Csharp多线程

using System; using System.Threading; namespace Lesson18_多线程 { class Program { static bool isRuning = true; static object ob

小鸟游星野 Published on 2025-03-08
Previous Next