![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
设计模式
crazy_yun
错了?那再来一次吧!
展开
-
Ts - 泛型单例模式的一种实现
ts语言使用泛型实现单例模式,使用游戏开发中常见管理器势力原创 2022-07-27 01:42:44 · 1078 阅读 · 0 评论 -
工厂方法模式
/** 工厂方法模式中的产品基类 */export default class ProductBase { constructor() {}}/** 具体的产品A */export class ProductA extends ProductBase { constructor() { super(); console.log("[ProductA].constructor(): "); }}/** 具体的产品B */export cl.原创 2021-12-15 19:03:16 · 1056 阅读 · 0 评论