(C # & Unity) scripting language ES

Source: Internet
Author: User
Tags closure

Pure C # Writing, interpretation of execution, syntax similar to JS, dynamic type, support closure, support hot update, more streamlined than LUA, but less efficient, no BUG found, the actual game running stable, no memory leaks

Github:https://github.com/easily/easyscript

Test code:

Func calc () {print (2 + 3) Print (2-3) Print (2 * 3) Print (2/3)}func Ctrl () {N= 1if(N > 0) {print ("" N > 0 "")    } Else{print ("" N < 0 "")} arr= [A]     for(i = 0, Arr.count) {print (Arr[i])} foreach (Iincharr) {print (i)}} Func closure () {n= 100F=func () {n= n + 1returnN} for(i = 0, 10{print (f ())}}func main () {print ("" Hello world! "") Calc () Ctrl () Closure ()}main ( )

Output:

Hello world!5-160.6666667> 0123123101102103104105106107108109110

The pure logic run efficiency is C # 1/50, the mathematical operation is 1/150,

So it's best to use it in areas where efficiency is not high and continue to optimize performance.

Currently used in the actual production environment, our game skill system are written in ES script, are written by the planning, grammar is relatively simple, can quickly learn

Compiling the principle of things not good, a lot of functions are hard to heap out, but the function is perfect, but also in the compilation of the principle of knowledge, hope that later can be more optimized

If a small partner want to use, hope to find the problem can contact me in time, thank you

(C # & Unity) scripting language ES

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.