简体   繁体   English

C#脚本接口

[英]C# scripting interface

I'm aware this has been asked a lot o times. 我知道这已经被问了很多遍了。 However, I'm having a small dilemma. 但是,我遇到了一个小难题。 I'm currently developing a server for a game my friend is developing. 我目前正在为我的朋友正在开发的游戏开发服务器。 The objects in it are executed through scripts (I didn't want to "hardcore" them), so I used the CodeDomProvider and made an abstract class that includes all the necessary methods. 其中的对象是通过脚本执行的(我不想对它们进行“硬核化”),因此我使用了CodeDomProvider并制作了一个包含所有必需方法的抽象类。 However, I hate having to import all the needed stuff every time and wanted to ask if there's a different approach (that's not C#). 但是,我讨厌每次都必须导入所有必需的内容,并且想问一下是否有其他方法(不是C#)。

I really like Lua, however the interface for Lua is old (2008). 我真的很喜欢Lua,但是Lua的界面很旧(2008)。 I have found NLua, though, what do you think about it? 我找到了NLua,但是您对此有何看法? Is there another interface for Lua that's updated, or, is there another scripting language and interface you'd recommend and how to use them? 是否有用于Lua的另一个接口已更新,或者您是否建议使用另一种脚本语言和接口以及如何使用它们?

Thanks. 谢谢。

You can even use: 您甚至可以使用:

How about Python ? Python怎么样? It can be easily integrated with C# and it's and object-oriented programming language. 它可以轻松地与C#及其面向对象的编程语言集成。

However, scripting languages offer you the simplest syntax. 但是,脚本语言为您提供了最简单的语法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM