【无标题】

【无标题】,第1张

Markdown学习 1、设定标题

需要几级标题,就打印几个#号,然后点击空格,再打印上具体的名称。

2、字体

hello world! // 两边都加**号,字体就变成了粗体

hello world! // 两边都加*号,字体就变成了斜体

hello world! // 两边都加***号,字体就变成了斜体加粗

hello world! // 两边都加~~号,字体居中划线

3、引用

选择java,走上人生巅峰 // 一个>再加一个空格,引用功能

4、分割线

三个—,或者三个***,即可以打印出分割线

5、图片

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-EKB6n6h9-1652188267483)(C:\Users\13917630495\Desktop\car1.jpg)]

*** 作的命令是,英语符号:![],中括号里面是图片名称,名字任意起,再加上()即可

网络图片命令:

如果()里面的是,网络地址的链接,则同样有效果。

6、超链接

点击跳转到百度

英文命令:,中括号里面写点击按钮的名称,小括号里写链接网址

7、列表
  1. a
  2. b
  3. c

有序列表,英文命令,直接写序号,写完后,直接按Enter键,即可以自动,添加下一个序号。

  • a
  • b
  • c

无序列表,英文命令:-加空格,写完一行时,直接空格即可。

8、表格
  1. 可以直接右键,插入表格

  2. 名字性别生日
    张三1992.06.19
9、代码

应用命令:通过三个点,不是波浪线,tab键上面的点,选择想要的代码类型

import { _decorator, Component, Node, find, instantiate, Prefab } from 'cc';
import { ResMgr } from './ResMgr';

export class UIMgr extends Component {
    public static Instance: UIMgr = null as unknown as UIMgr;

    private canvas: Node = null as unknown as Node;
    private uiMap: any = {};

    onLoad(): void {
        if(UIMgr.Instance === null) {
            UIMgr.Instance = this;
        }
        else {
            this.destroy();
            return;
        }

        // 挂我们的UI视图的一个根节点;
        this.canvas = find("Canvas") as Node;

        // 特殊的挂载点, ....
        // end 
    }

    public ShowUIPrefab(uiPrefab: Prefab, parent?: Node): Node {
        var uiView: Node = instantiate(uiPrefab) as Node;
        parent = (!parent)? this.canvas : parent;
        parent.addChild(uiView);

        //往根节点上挂下UI视图脚本;
        console.log(uiPrefab, uiPrefab.data.name);
        uiView.addComponent(uiPrefab.data.name + "_Ctrl");
        this.uiMap[uiPrefab.data.name] = uiView;

        return uiView;
    }

    // 显示一个UI到我们的视图上面;
    public ShowUIView(viewName: string, parent?: Node): Component {
        // 实例化UI视图出来; 
        var uiPrefab = ResMgr.Instance.getAsset("GUI", viewName);
        if(!uiPrefab) {
            console.log("cannot find ui Prefab: ", viewName);
            return null as unknown as Component;
        }

        var uiView: Node = instantiate(uiPrefab) as Node;
        parent = (!parent)? this.canvas : parent;
        parent.addChild(uiView);
        this.uiMap[viewName] = uiView;
        // console.log(uiView);

        //往根节点上挂下UI视图脚本;
        return uiView.addComponent(uiPrefab.data.name + "_Ctrl");
    }

    public RemoveUI(ui_name: string) {
        if (this.uiMap[ui_name]) {
            this.uiMap[ui_name].destroy();
            this.uiMap[ui_name] = null;
        }
    }

    public ClearAll() {
        for (var key in this.uiMap) {
            if (this.uiMap[key]) {
                this.uiMap[key].destroy();
                this.uiMap[key] = null;
            }
        }
    }
}


package test1;

public class User {
	public String name; 
	public int age; 
	public boolean equals(Object obj) {
		if (this == obj) //能调用这个equals的是User类型 
			return true; //这里的this就是User类型 
		if (obj instanceof User) { 
			User u = (User) obj; //向下转型为User型 
			return (this.age == u.age && this.name.equals(u.name)); 
			} else {
				return false; 
				}
		} 
		
}

10、查看源码

直接点击左下方的图标即可查看源码

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/905487.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-15
下一篇2022-05-15

发表评论

登录后才能评论

评论列表(0条)

    保存