[add] Lobby 按鈕功能
This commit is contained in:
		
							
								
								
									
										29
									
								
								assets/Script/Common/MainControl/MainControl.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								assets/Script/Common/MainControl/MainControl.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
			
		||||
import CSMessage from "../Message/CSMessage";
 | 
			
		||||
 | 
			
		||||
const { ccclass, property } = cc._decorator;
 | 
			
		||||
 | 
			
		||||
@ccclass
 | 
			
		||||
export class MainControl extends cc.Component {
 | 
			
		||||
    //#region property
 | 
			
		||||
 | 
			
		||||
    @property({ displayName: "訊息窗位置", type: cc.Node })
 | 
			
		||||
    public MessageContent: cc.Node = null;
 | 
			
		||||
 | 
			
		||||
    @property({ displayName: "MessageNormal", type: cc.Prefab })
 | 
			
		||||
    public SourceMessage: cc.Prefab = null;
 | 
			
		||||
 | 
			
		||||
    //#endregion
 | 
			
		||||
 | 
			
		||||
    //#region 初始化
 | 
			
		||||
 | 
			
		||||
    onLoad(): void {
 | 
			
		||||
        // MainControl._instance = this;
 | 
			
		||||
        this._initialEngine();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private _initialEngine(): void {
 | 
			
		||||
        CSMessage.Initialize(this.SourceMessage, this.MessageContent);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    //#endregion
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										9
									
								
								assets/Script/Common/MainControl/MainControl.ts.meta
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								assets/Script/Common/MainControl/MainControl.ts.meta
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
{
 | 
			
		||||
  "ver": "1.0.8",
 | 
			
		||||
  "uuid": "ec0e4b2c-5018-4f84-9062-70403d8383e1",
 | 
			
		||||
  "isPlugin": false,
 | 
			
		||||
  "loadPluginInWeb": true,
 | 
			
		||||
  "loadPluginInNative": true,
 | 
			
		||||
  "loadPluginInEditor": false,
 | 
			
		||||
  "subMetas": {}
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user