GithubHelp home page GithubHelp logo

qq362946 / fantasy Goto Github PK

View Code? Open in Web Editor NEW
251.0 5.0 50.0 52.65 MB

C # Game Framework, but not limited to games. Can be used for non game business development

Home Page: https://www.fantsida.com/fantasy

License: MIT License

C# 99.62% ShaderLab 0.30% Smalltalk 0.03% Lua 0.04% Shell 0.01% Batchfile 0.01%
fantasy game gameframework network unity unity2d unity3d net7 netcore gameserver

fantasy's People

Contributors

alextangxiao avatar qq362946 avatar roubincode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fantasy's Issues

导协议时,复杂的列表不能导出

/// 商店列表请求
message H_C2G_HallShopRequest // IRequest,H_G2C_HallShopResponse
{

}
/// 单个商品
message HallShop {
string Name = 1;
int64 Cost = 2;
}
/// 商品列表返回
message H_G2C_HallShopResponse // IResponse
{
repested HallShop List = 1;
}

image

打包Release失败,因为缺少两个提示禁用CS8618,CS8632

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
  <DefineConstants>TRACE;FANTASY_NET</DefineConstants>
  <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
  <NoWarn>1701;1702;IL2121;CS8603;IL2121;CS8625;IL2121;CS8618;CS8622;CS8632;CS8602;CS8603;CS8600;CS8625;CS8600;;CS8604;CS8601;SYSLIB0023</NoWarn>
</PropertyGroup>

ExcelTemplate.txt 模板可以扩展一下

GU @C9X8IFJBUEHQLDB}}AH

添加一个获取所有属性名的函数:

public PropertyInfo[] GetProperties()
{
    var t = typeof((ConfigName));
    return t.GetProperties();
}

方便通过属性名去获取值。

案例:
多语言文档遍历数据到字典的子字典。

var localizationList = LocalizationData.Instance.List;
_phrases = new Dictionary<string, Dictionary<string, string>>(0);
// 获得类的所有属性名
var lang = LocalizationData.Instance.GetProperties();
for (var i = 2; i < lang.Length; i++)
{
    var p = new Dictionary<string, string>();
    for (var j = 0; j < localizationList.Count; j++)
    {
        var local = localizationList[j];
        // 通过属性名去获取对于的值
        var localProperty = local.GetType().GetProperty(lang[i].Name);
        if (localProperty == null) return;
        var value = localProperty.GetValue(local, null);
        p.Add(localizationList[j].Key, value.ToString());
    }
    _phrases.Add(lang[i].Name.Insert(2, "-").ToLower(), p);
}

Fantasy.Net包的库应该去掉EPPlus库,换成微软库

去掉
		<PackageReference Include="EPPlus" Version="6.2.10" />
换成
		<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
		<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="7.0.0" />
		<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />

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.