Пример #1
0
 public void Start()
 {
     ScriptManager.Services.GetService <ProjectSettings>().ShowColliders = false;
     Cursor = new GameObject();
     Cursor.AddComponent(new AnimatedSprite());
     Cursor.GetComponent <AnimatedSprite>().animation.SpriteSheet = cursorTexture.ToTexture2D();
     Cursor.GetComponent <Transform>().Width  = 32;
     Cursor.GetComponent <Transform>().Height = 42;
     cursorLayer = new Layer("CursorLayer");
     Cursor.name = "cursor";
     ScriptManager.DefaultLayout.Add(cursorLayer);
     Cursor.MoveToLayer(cursorLayer);
     cursorLayer.Parallax = new Vector2(0, 0);
 }