5
Scripting with NLua and Xamarin domingo, 14 de abril de 13

NLua with Xamarin

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: NLua with Xamarin

Scripting with NLua and Xamarin

domingo, 14 de abril de 13

Page 2: NLua with Xamarin

Why scripting?

• Isolate behaviors/complex logic• Change behavior without rebuild• Allow customization/extension

domingo, 14 de abril de 13

Page 3: NLua with Xamarin

[Preserve]

public  class  Scriptable  {          public  Scriptable  (string  param)          {  //  ...  }          public  void  DoSomething  ()          {                  Console.WriteLine  ("Do  Something");          }}

01

02

03

04

05

06

07

08

09

10

11

12

13

14

15

16

domingo, 14 de abril de 13

Page 4: NLua with Xamarin

         public  void  ViewDidLoad  (string  param)          {                          var  lua  =  new  Lua  ();                  lua.DoString  ("a  =  10");                  lua.DoFile  (luaFile);          }          //  ...  }          lua.Dispose  ();          //  ...  }}

local  s  =  Scriptable  ("Do  Something")s:DoSomething  ()

domingo, 14 de abril de 13

Page 5: NLua with Xamarin

Thank you

• http://github.com/nlua/nlua• http://nlua.org• http://lua.org

domingo, 14 de abril de 13