🧐

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

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

Decade Published on 2025-03-11

Unity_公共Mono模块

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

Decade Published on 2025-03-10

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

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

Decade Published on 2025-03-08

Csharp多线程

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

Decade Published on 2025-03-08

Unity_挂载类型的单例模式避免重复问题

using System; using System.Collections; using System.Collections.Generic; using UnityEngine; [DisallowMultipleComponent] public class 挂载式的单例<T> : Mon

Decade Published on 2025-03-08

Unity_不继承Mono保持单例唯一性方法

using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using System.Reflection; public abstract class NoMonoSin

Decade Published on 2025-03-08

Unity_继承mono单例类

using System.Collections; using System.Collections.Generic; using UnityEngine; public class BaseManager<T> where T:class,new() { private static

Decade Published on 2025-03-08

Csharp特性

#define Fun using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Lesson21_特

Decade Published on 2025-03-08

Csharp反射

using System; using System.Reflection; using System.Threading; namespace Lesson20_反射 { #region 知识点回顾 //编译器是一种翻译程序 //它用于将源语言程序翻译为目标语言程序

Decade Published on 2025-03-08

斐波那契数列 递归写法

//递归写法 public static int Fibonacci(int n) { //这么写得了解问题的最简形式的样子 并且函数本身的调用就是最上层分支 if (n < 2) { return n == 0

Decade Published on 2025-02-26
Previous Next