Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using Microsoft.Xna.Framework.Graphics;
- using Microsoft.Xna.Framework;
- namespace Stake_it_Out
- {
- public class TreeRegion
- {
- Viewport viewport;
- Vector2 startingGridPosition;
- Game1 gameObject;
- int numberTreesX, regionX, regionY;
- float x,y;
- List<Vector2> treedList;
- //Constructor
- public TreeRegion(Vector2 myStartingPosition,int myX, int myY, Viewport viewport)
- {
- gameObject = new Game1();
- treedList = new List<Vector2>();
- regionX = myX;
- regionY = myY;
- numberTreesX = (regionX / 2);
- startingGridPosition = myStartingPosition;
- x = startingGridPosition.X;
- y = startingGridPosition.Y;
- Vector2 tree = new Vector2(x, y);
- treedList.Add(tree);
- x += 60;
- this.viewport = viewport;
- }
- //Create them
- public void createTreess()
- {
- for (int b=0; b <= regionY; b++)
- {
- for (int a = 0; a <= numberTreesX; a++)
- {
- Vector2 tree = new Vector2(x,y);
- treedList.Add(tree);
- x=+60;
- }
- x-=(30*(numberTreesX*2));
- y += 60;
- }
- }
- //Skew the bitches
- public void skewTrees()
- {
- }
- //Communicate with Tiles
- public void sendResults()
- {
- for (int a = 0; a < treedList.Count; a++)
- {
- int xInt = (int)treedList[a].X;
- int yInt = (int)treedList[a].Y;
- gameObject.tileArray[xInt, yInt].treed = true;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement