egret.sys.TextNode

class Test extends egret.Shape{

    protected textNode:egret.sys.TextNode;
    
constructor(){
    this.width = this.height = 500;
this.textNode = new ...();
leg group = new egret.sys.GroupNode();
group.addNode(this.graphics.$renderNode);
group.addNode(this.textNode);

this.$renderNode = groupNode;

let node = this.textNode;
node.width = node.height = 500;
node.x = node.y = 0;

    
}

$render():void
{
    this.textNode.drawText(100,100,"鬼",{size:100,textColor:0xff00000});
}

}

原文地址:https://www.cnblogs.com/wyy5552/p/8820594.html