{"id":269874,"date":"2015-12-08T13:09:02","date_gmt":"2015-12-08T10:09:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=269874"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=269874","title":{"rendered":"\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 Unity: Urho3D + C# + Xamarin"},"content":{"rendered":"<p>       \u041f\u0440\u043e Urho3D \u0443\u0436\u0435 <a href=\"http:\/\/habrahabr.ru\/post\/265611\/\">\u043f\u0438\u0441\u0430\u043b\u0438<\/a> \u043d\u0430 \u0445\u0430\u0431\u0440\u0435, \u044d\u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 3D \u0434\u0432\u0438\u0436\u043e\u043a \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u0421++ \u0441 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u043c \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c 3rd parties: Box2D, Bullet, kNet \u0438 \u0442.\u043f. \u0423 \u0434\u0432\u0438\u0436\u043a\u0430 \u0435\u0441\u0442\u044c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 (\u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u043d\u0435\u043c \u0436\u0435), \u043d\u043e \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043e\u043d \u0434\u0430\u043b\u0435\u043a\u043e \u043e\u0442 Unity, \u0437\u0430\u0442\u043e \u0435\u0441\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u043b\u044e\u0441\u044b (\u043e \u043d\u0438\u0445 \u0434\u0430\u043b\u0435\u0435). \u0414\u0432\u0438\u0436\u043e\u043a \u0438\u043c\u0435\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u044b\u0439 API, \u0447\u0442\u043e \u0441\u0442\u0430\u043b\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0432\u0437\u0433\u043b\u044f\u0434\u0430 Xamarin \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 (\u0421++ API to C#) \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0431\u0430\u0439\u043d\u0434\u0438\u043d\u0433\u043e\u0432 \u043f\u043e\u0432\u0435\u0440\u0445 API \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 C#. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0434\u0432\u0438\u0436\u043e\u043a (<a href=\"http:\/\/developer.xamarin.com\/guides\/cross-platform\/urho\/\">UrhoSharp<\/a>) \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u043f\u043b\u044e\u0441\u0430\u043c\u0438 (\u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0442\u0435\u043c \u0436\u0435 Unity):<\/p>\n<ul>\n<li>\u041f\u043e\u043b\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 Mono 4.2.x, C# 6.0 \u0441 Xamarin Studio \/ Visual Studio \u2014 \u0433\u0440\u0443\u0431\u043e \u0433\u043e\u0432\u043e\u0440\u044f \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0434\u043b\u044f Visual Studio<\/li>\n<li>\u041f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043e\u0434<\/li>\n<li>\u041d\u0430\u043b\u0438\u0447\u0438\u0435 C# (Xamarin) \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043d\u0435\u0438\u0433\u0440\u043e\u0432\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/li>\n<li>\u0412\u0441\u0435 \u043f\u043b\u044e\u0448\u043a\u0438 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u043a\u0430, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0432 \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u0441\u043f\u0438\u0441\u043a\u0435 <a href=\"http:\/\/urho3d.github.io\/\">\u0442\u0443\u0442<\/a>.<\/li>\n<li>\u0420\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 Nuget \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0430\u0441\u0441\u0435\u0442\u044b \u0438 native \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0433\u043e \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u044b\u043c<\/li>\n<li>\u041e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0432\u0435\u0440\u0445\u0435\u0434 \u043e\u0442 .NET\/Mono<\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/830\/b6e\/00c\/830b6e00cf14404a8b558cc9e5fb9881.png\"\/><br \/>  <a name=\"habracut\"><\/a><\/p>\n<h2>\u042d\u0439, \u043f\u0441\u0441\u2026 \u043d\u0435 \u0445\u043e\u0447\u0435\u0448\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432?<\/h2>\n<p>  \u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 Urho3D \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Emscripten \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u0432 WebGL, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043c\u043e\u0436\u043d\u043e \u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0434\u0430\u0436\u0435 \u0447\u0435\u0440\u0435\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440, \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043e\u043d\u0438 \u043d\u0435 \u0448\u0438\u0431\u043a\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e. \u041b\u0443\u0447\u0448\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0442\u0435 \u0436\u0435 \u0441\u0430\u043c\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043d\u0430 C# \u0441\u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0432 \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0435\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0430 \u0432\u0441\u0435\u0445 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445: Windows, Mac, iOS \u0438 Android. \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u043e\u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432:<\/p>\n<p>  \u041b\u0430\u043d\u0434\u0448\u0430\u0444\u0442 (\u043a\u0430\u0440\u0442\u0430 \u0432\u044b\u0441\u043e\u0442) \u0438 \u0432\u043e\u0434\u0430:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/e3e\/8f1\/80d\/e3e8f180d8b54f0989d9448c98eacd5b.png\"\/><\/p>\n<p>  \u0421\u043a\u0435\u043b\u0435\u0442\u043d\u0430\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/940\/0ed\/9d0\/9400ed9d08aa40239bca9ebed58ce058.png\"\/><\/p>\n<p>  \u0424\u0438\u0437\u0438\u043a\u0430 3D (Bullet)<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/33d\/ac8\/e3a\/33dac8e3a8414a7a927dac01e4ab1097.png\"\/><\/p>\n<p>  \u0424\u0438\u0437\u0438\u043a\u0430 2D (Box2D)<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/d77\/060\/698\/d770606980874fb6a15484d04bea6dd6.gif\"\/><\/p>\n<p>  \u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u043b\u043f\u043e\u0439 (\u043f\u043e\u0438\u0441\u043a \u043f\u0443\u0442\u0438 \u0434\u043b\u044f \u0442\u043e\u043b\u043f\u044b):<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/9b8\/864\/05d\/9b886405d78f4d0bbf8d994f4f098cfa.png\"\/><\/p>\n<p>  \u0412\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043d\u0438\u0435 \u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043e\u0431\u044b\u0447\u043d\u044b\u0435 Xamarin(Forms) \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/1ed\/3f5\/228\/1ed3f5228b8d4b52a0f6433036f6a62c.png\"\/><\/p>\n<p>  \u0418 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435 (\u043e\u043a\u043e\u043b\u043e 40 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043e\u0442 Xamarin) \u2013 <a href=\"https:\/\/github.com\/xamarin\/urho-samples\/tree\/master\/SamplyGame\">\u043a\u043e\u043f\u0438\u044e \u0438\u0433\u0440\u044b ShootySkies.<\/a><\/p>\n<h2>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432:<\/h2>\n<p>  Urho3D \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f\u0438\u0447\u043d\u0443\u044e \u043d\u043e\u0434\u043e-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443. C# API \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 C++ \u043a\u043e\u0434 \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0430\u0445\u0430\u0440\u0430: \u0441\u0432\u043e\u0439\u0441\u0442\u0432, \u0441\u043e\u0431\u044b\u0442\u0438\u0439, async\/await. \u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0430\u044f 3\u0414 \u0441\u0446\u0435\u043d\u0430:<\/p>\n<pre><code>public class HabraSample : Application {     protected override void Start()     {         \/\/ 3D scene with Octree         var scene = new Scene(Context);         scene.CreateComponent&lt;Octree&gt;();          \/\/ Box         var boxNode = scene.CreateChild();         boxNode.Position = new Vector3(x: 0, y: 0, z: 5);         boxNode.SetScale(2f);         boxNode.Rotation = new Quaternion(x: 60, y: 0, z: 30);         var boxModelComponent = boxNode.CreateComponent&lt;StaticModel&gt;();         boxModelComponent.SetMaterial(ResourceCache.GetMaterial(&quot;Materials\/BoxMaterial.xml&quot;));         boxModelComponent.Model = ResourceCache.GetModel(&quot;Models\/BoxModel.mdl&quot;);          \/\/ Light         Node lightNode = scene.CreateChild(name: &quot;light&quot;);         var lightComponent = lightNode.CreateComponent&lt;Light&gt;();         lightComponent.LightType = LightType.Point;         lightComponent.Range = 50;          \/\/ Camera         Node cameraNode = scene.CreateChild(name: &quot;camera&quot;);         Camera cameraComponent = cameraNode.CreateComponent&lt;Camera&gt;();          \/\/ Viewport         Renderer.SetViewport(0, new Viewport(Context, scene, cameraComponent, null));     } } <\/code><\/pre>\n<p>  \u0418\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 CocosSharp \u0431\u044b\u043b\u0438 <s>\u043d\u0430\u0433\u043b\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u044b<\/s> \u043e\u0442\u0434\u043e\u043b\u0436\u0435\u043d\u044b Actions \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u0432 \u0441\u0442\u0438\u043b\u0435 \u00ab\u043f\u043e\u0432\u0435\u0440\u043d\u0438 \u043e\u0431\u044a\u0435\u043a\u0442 \u043d\u0430 \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432 \u0437\u0430 \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434, \u0437\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0432\u0438\u043d\u044c \u0435\u0433\u043e \u0442\u0443\u0434\u0430-\u0442\u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u00bb. \u0412\u044b\u0433\u043b\u044f\u0434\u0435\u0442 \u044d\u0442\u043e \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a:<\/p>\n<pre><code>\/\/ \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043c\u0430\u0441\u0448\u0442\u0430\u0431 \u0434\u043e 0.5 \u0437\u0430 1 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u0438\u0433\u0440\u043e\u0432\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 await boxNode.RunActionsAsync(new ScaleTo(duration: 1f, scale: 0.5f)); \/\/ \u043f\u0435\u0440\u0435\u0434\u0432\u0438\u043d\u0443\u0442\u044c \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0437\u0430 2 \u0441\u0435\u043a\u0443\u043d\u0434\u044b await boxNode.RunActionsAsync(new MoveBy(duration: 2f, position: new Vector3(x: 5, y: 0, z: 0))); \/\/ \u043f\u0435\u0440\u0435\u043a\u0440\u0430\u0441\u0438\u0442\u044c \u0432 \u0436\u0435\u043b\u0442\u044b\u0439 await boxNode.RunActionsAsync(new TintTo(duration: 1f, red: 1, green: 1, blue: 0)); <\/code><\/pre>\n<p>  \u042d\u0442\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0438 \u043e\u0431\u0440\u043e\u043c\u043b\u044f\u0442\u044c \u0432 <a href=\"http:\/\/easings.net\/\">easing functions<\/a>.<br \/>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430:<\/p>\n<pre><code>boxNode.SetScale(0); \/\/ \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u043c\u0430\u0441\u0448\u0442\u0430\u0431 \u0434\u043b\u044f \u044f\u0449\u0438\u043a\u0430 await boxNode.RunActionsAsync(new EaseBounceOut(new ScaleTo(duration: 1f, scale: 1))); await boxNode.RunActionsAsync(new RepeatForever( \tnew RotateBy(duration: 1, deltaAngleX: 90, deltaAngleY: 0, deltaAngleZ: 0))); <\/code><\/pre>\n<p>  \u0427\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u00ab\u0443\u0432\u0435\u0447\u0438\u0442\u044c \u043c\u0430\u0441\u0448\u0442\u0430\u0431 \u0441 0 \u0434\u043e 1 \u0437\u0430 1 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f EaseBounceOut easing. \u0417\u0430\u0442\u0435\u043c \u043d\u0430\u0447\u043d\u0435\u043c \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0435 \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043f\u043e \u043e\u0441\u0438 \u0425 90 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432 \u0437\u0430 1 \u0441\u0435\u043a\u0443\u043d\u0434\u0443.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/8fb\/5a6\/71d\/8fb5a671d3c7480492d50ca4f265c02d.gif\"\/><\/p>\n<h2>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f C# \u0434\u043b\u044f C++ \u043a\u043e\u0434\u0430<\/h2>\n<p>  \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0435\u043f\u0440\u043e\u0441\u0442 \u0438, \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441, \u044f \u043c\u043e\u0433\u0443 \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u044c \u0435\u0433\u043e \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435. \u041f\u043e\u043a\u0430 \u043c\u043e\u0433\u0443 \u043b\u0438\u0448\u044c \u0432 \u043e\u0431\u0449\u0438\u0445 \u0441\u043b\u043e\u0432\u0430\u0445 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c:<\/p>\n<ul>\n<li>\u041a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0433\u043e C++ \u043a\u043e\u0434\u0430 \u0432 PCH \u0444\u0430\u0439\u043b (AllUrho.cpp)<\/li>\n<li>\u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043f\u0440\u043e\u043f\u0440\u0438\u0435\u0442\u0430\u0440\u043d\u043e\u0439 \u043b\u0438\u0431\u043a\u0438 (\u0432\u0440\u0430\u043f\u043f\u0435\u0440 \u043d\u0430\u0434 Clang AST), \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u043a\u0430\u0440\u043c\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e\u0442 PCH \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0435\u0440\u0435\u0432\u043e \u043a\u043b\u0430\u0441\u0441\u043e\u0432\/\u0447\u043b\u0435\u043d\u043e\u0432 (AST) \u0421++ \u043a\u043e\u0434\u0430 \u0432 \u0432\u0438\u0434\u0435 managed \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432.<\/li>\n<li>\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c DllImport \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432\u0441\u0435\u0445 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 (\u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u043b\u043a\u0438\u0445 \u043d\u044e\u0430\u043d\u0441\u043e\u0432). \u041d\u043e \u0432 \u0446\u0435\u043b\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 (\u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439, \u0442.\u043a. \u043f\u0438\u0441\u0430\u043b\u0441\u044f \u0432 \u0441\u0442\u0438\u043b\u0435 \u00ab\u0431\u044b\u0441\u0442\u0440\u043e-\u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d\u00bb).<\/li>\n<\/ul>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435 \u043e\u043a\u043e\u043b\u043e 100% \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e C++ API.<\/p>\n<p>  \u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 <a href=\"https:\/\/github.com\/xamarin\/urho-samples\">github<\/a>.               <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/272637\/\"> http:\/\/habrahabr.ru\/post\/272637\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u041f\u0440\u043e Urho3D \u0443\u0436\u0435 <a href=\"http:\/\/habrahabr.ru\/post\/265611\/\">\u043f\u0438\u0441\u0430\u043b\u0438<\/a> \u043d\u0430 \u0445\u0430\u0431\u0440\u0435, \u044d\u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 3D \u0434\u0432\u0438\u0436\u043e\u043a \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u0421++ \u0441 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u043c \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c 3rd parties: Box2D, Bullet, kNet \u0438 \u0442.\u043f. \u0423 \u0434\u0432\u0438\u0436\u043a\u0430 \u0435\u0441\u0442\u044c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 (\u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u043d\u0435\u043c \u0436\u0435), \u043d\u043e \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043e\u043d \u0434\u0430\u043b\u0435\u043a\u043e \u043e\u0442 Unity, \u0437\u0430\u0442\u043e \u0435\u0441\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u043b\u044e\u0441\u044b (\u043e \u043d\u0438\u0445 \u0434\u0430\u043b\u0435\u0435). \u0414\u0432\u0438\u0436\u043e\u043a \u0438\u043c\u0435\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u044b\u0439 API, \u0447\u0442\u043e \u0441\u0442\u0430\u043b\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0432\u0437\u0433\u043b\u044f\u0434\u0430 Xamarin \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 (\u0421++ API to C#) \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0431\u0430\u0439\u043d\u0434\u0438\u043d\u0433\u043e\u0432 \u043f\u043e\u0432\u0435\u0440\u0445 API \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 C#. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0434\u0432\u0438\u0436\u043e\u043a (<a href=\"http:\/\/developer.xamarin.com\/guides\/cross-platform\/urho\/\">UrhoSharp<\/a>) \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u043f\u043b\u044e\u0441\u0430\u043c\u0438 (\u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0442\u0435\u043c \u0436\u0435 Unity):<\/p>\n<ul>\n<li>\u041f\u043e\u043b\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 Mono 4.2.x, C# 6.0 \u0441 Xamarin Studio \/ Visual Studio \u2014 \u0433\u0440\u0443\u0431\u043e \u0433\u043e\u0432\u043e\u0440\u044f \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0434\u043b\u044f Visual Studio<\/li>\n<li>\u041f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043e\u0434<\/li>\n<li>\u041d\u0430\u043b\u0438\u0447\u0438\u0435 C# (Xamarin) \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043d\u0435\u0438\u0433\u0440\u043e\u0432\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/li>\n<li>\u0412\u0441\u0435 \u043f\u043b\u044e\u0448\u043a\u0438 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u043a\u0430, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0432 \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u0441\u043f\u0438\u0441\u043a\u0435 <a href=\"http:\/\/urho3d.github.io\/\">\u0442\u0443\u0442<\/a>.<\/li>\n<li>\u0420\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 Nuget \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0430\u0441\u0441\u0435\u0442\u044b \u0438 native \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0433\u043e \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u044b\u043c<\/li>\n<li>\u041e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0432\u0435\u0440\u0445\u0435\u0434 \u043e\u0442 .NET\/Mono<\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/830\/b6e\/00c\/830b6e00cf14404a8b558cc9e5fb9881.png\"\/>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-269874","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/269874","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=269874"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/269874\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=269874"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=269874"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=269874"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}