Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void AdditionalInitialize()
- {
- foreach (string filename in Directory.GetFiles("../textures/"))
- {
- ResourceCache.PrecacheResource<TextureResource>(filename);
- }
- RenderInterface.Initialize();
- RenderInterface.CurrentTexture = ResourceCache.GetResource<TextureResource>("../textures/3.jpg");
- for (int i = 1; i < 9; i++)
- {
- for (int j = 0; j < 2; j++)
- {
- Card card = new Card(this);
- card.Texture = ResourceCache.GetResource<TextureResource>(String.Format("../textures/{0}.jpg", i));
- Cards.Add(card);
- }
- }
- Cards = Cards.OrderBy(n => Guid.NewGuid()).ToList<Card>();
- int index = 0;
- for (int i = -2; i < 2; i++)
- {
- for (int j = -2; j < 2; j++)
- {
- Card card = Cards[index];
- card.Position = new Vector3(i * 3f, j * 3f, 0f);
- index++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement