Giter Club home page Giter Club logo

-ihaiu.gameframelayav2_fgui's Introduction

ihaiu.GameFrameLayaV2

Laya游戏框架基于Laya2.6版本

目录结构

client 客户端目录

​ |-- Game 游戏项目

​ |--Game-FGUI 游戏FairyGUI项目

​ |--Tool-ExportCode 生成FairyGUI代码工具目录

FairyGUI

工具导出环境搭建
1. 安装dotnet

https://dotnet.microsoft.com/

2.配置导出路径

​ client\Game-FGUI\Tool-ExportCode\CopyClientSetting.json

{
  "enableoverwrites": [
  	{
  		"src":"../../../_gen/FairyGUICode/TS/Generates", 
		  "dst":"../../Game/src/FGUI/Generates"
  	}
  ],
  "disableoverwrites": [
  	{
      "src":"../../../_gen/FairyGUICode/TS/Extends", 
      "dst":"../../Game/src/FGUI/Extends"
    }
  ]
}
3.执行导出

client\Game-FGUI\Tool-ExportCode\生成FGUI代码.bat

项目配置依赖文件

Game/bin/index.js 下添加代码

loadLib("libs/game/GameCommonLib.js");
// fgui
loadLib("libs/fairygui/rawinflate.min.js");
loadLib("libs/fairygui/fairygui.js");
项目配置测试代码
    
	// 设置FGUI
	async initFguiSetting()
	{

		GuiSetting.init();

		
		let packageConfig: GuiResPackageConfig = await GuiSetting.asset.loadFguiByPackagenameAsync(GuiPackageNames.GameLaunch);
		GuiSetting.addPackage(packageConfig.packagePath);
		
		// 初始化转圈
		fgui.UIConfig.globalModalWaiting = fgui.UIPackage.getItemURL(packageConfig.packageName, "GlobalModalWaiting");
		fgui.UIConfig.windowModalWaiting = fgui.UIPackage.getItemURL(packageConfig.packageName, "WindowModalWaiting");

		var enterLoginLoader =  EnterLoginLoader.createInstance();


		fgui.GRoot.inst.addChild(enterLoginLoader);
		
	}

-ihaiu.gameframelayav2_fgui's People

Contributors

ihaiucom avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.