import {TimerService} from "../Time/TimerService";
import { TimesTamper } from "../Time/TimesTamper";
import { GlobalTip } from "../utils/GlobalTip";
import {WECHATEVENT} from "../WXSDK/WECHATEVENT";
import {AgencyBaseControl} from "./AgencyBaseControl";
import {GameState} from "../utils/GameState";
import LevelCFG from "../CFG/LevelCFG";
import { PlayerAccount, AccountUser } from "../WXSDK/PlayerAccount";
import { NetworkManager, PROTOCOLS } from "../WXSDK/NetworkManager";
import {UserInfoEvent} from "../Data/UserInfoEvent";


export class AgencyUserMessage extends AgencyBaseControl
{
    static key:string = "AgencyUserMessage";

    private roleisinit:boolean = false;

    constructor() { super(); }
    
    protected initSelf():void
    {
       
    }   

    /**加金币 */
    public GoldUp( _num:number ):void
    {
        this.RoleData.Money += _num;
    }

    /**************************** */
    private createInput(): void {
        var inputText:Laya.Input = new Laya.Input();

        inputText.size(350, 100);
        inputText.x = Laya.stage.width - inputText.width >> 1;
        inputText.y = Laya.stage.height - inputText.height >> 1;

        inputText.text = "这段文本不可编辑，但可复制";
        inputText.editable = false;

        // 设置字体样式
        inputText.bold = true;
        inputText.bgColor = "#666666";
        inputText.color = "#ffffff";
        inputText.fontSize = 20;

        Laya.stage.addChild(inputText);
    }
    /******************************** */

    public init():void
    {
        this.RoleData.init();
        this.roleisinit = true;
    }

    /************************ */
    private createText():Laya.Text {
        var txt:Laya.Text = new Laya.Text();

        txt.text =
            "Layabox是HTML5引擎技术提供商与优秀的游戏发行商，面向AS/JS/TS开发者提供HTML5开发技术方案！\n" +
            "Layabox是HTML5引擎技术提供商与优秀的游戏发行商，面向AS/JS/TS开发者提供HTML5开发技术方案！\n" +
            "Layabox是HTML5引擎技术提供商与优秀的游戏发行商，面向AS/JS/TS开发者提供HTML5开发技术方案！";

        txt.borderColor = "#FFFF00";

        txt.size(300, 50);
        txt.fontSize = 20;
        txt.color = "#ffffff";

        Laya.stage.addChild(txt);

        return txt;
    }
    /**************************** */

    /**升级 */
    public LevelUp():void
    {
        this.RoleData.LevelUp();
    }

    
}