EngineAPI.cs 876 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Copyright (c) 2012-2016 Daniele Bartolini and individual contributors.
  3. * License: https://github.com/taylor001/crown/blob/master/LICENSE
  4. */
  5. using System;
  6. namespace Crown
  7. {
  8. public static class EngineAPI
  9. {
  10. public static string Compile(string type, string name, string platform)
  11. {
  12. return string.Format(@"{{""type"":""compile"","
  13. + @"""resource_type"":""{0}"","
  14. + @"""resource_name"":""{1}"","
  15. + @"""platform"":""{2}""}}"
  16. , type
  17. , name
  18. , platform
  19. );
  20. }
  21. public static string Reload(string type, string name)
  22. {
  23. return string.Format(@"{{""type"":""reload"","
  24. + @"""resource_type"":""{0}"","
  25. + @"""resource_name"":""{1}""}}"
  26. , type
  27. , name
  28. );
  29. }
  30. public static string Pause()
  31. {
  32. return @"{""type"":""pause""}";
  33. }
  34. public static string Unpause()
  35. {
  36. return @"{""type"":""unpause""}";
  37. }
  38. }
  39. }