Exemple #1
0
 public GameMenu(string n, List<Buttons.Button> butts)
 {
     themePlaying = false;
     buttons = butts;
     name = n;
     texture = Game1.ASM.GetTextureAsset(name);
 }
Exemple #2
0
 public Button(Vector2 p, string n)
 {
     name = n;
     position = p;
     flagged = false ;
     texture = Game1.ASM.GetTextureAsset(name);
     hitBox = new Rectangle((int)position.X, (int)position.Y, texture.sprite.Width, texture.sprite.Height);
 }
Exemple #3
0
 public World(string n, int row, int col, int cS, string texture)
 {
     updateQueue = new Queue<Objects.GameObject>();
     random = new Random(0);
     themePlaying = false;
     chunkR = row;
     chunkC = col;
     chunkMap = new Chunk[row, col];
     name = n;
     chunkSize = cS;
     background = Game1.ASM.GetTextureAsset(texture);
 }
 public GameObject(string _name, string _type, Vector2 _position)
 {
     drawn = false;
     updated = false;
     hotKeys = new List<Keys>();
     target = new Point((int)_position.X, (int)_position.Y);
     selected = false;
     position = _position;
     type = _type;
     name = _name;
     texture = Game1.ASM.GetTextureAsset(name);
     hitBox = new Rectangle((int)position.X, (int)position.Y, texture.sprite.Width, texture.sprite.Height);
 }
 public HeadsUpDisplay()
 {
     loadQueueRects = new List<Rectangle>();
     selectedObjects = new List<Objects.GameObject>();
     stretchBuffer = 10;
     stretchSize = 50;
     overlay = Game1.ASM.GetTextureAsset("HUDOverlay");
     loadBox = Game1.ASM.GetTextureAsset("LoadBox");
     loadBar = Game1.ASM.GetTextureAsset("LoadBar");
     overlayRect = new Rectangle(0, 900, 1920, 180);
     selectRect = new Rectangle(0, 900, 630, 180);
     loadRect = new Rectangle(730, 910, 300, 150);
     loadBarRect = new Rectangle(830, 940, 0, 12);
     hotkeyRect = new Rectangle(1130, 910, 300, 300);
     loadQueueRects.Add(new Rectangle(730, 910, 75, 75));
     loadQueueRects.Add(new Rectangle(730, 985, 75, 75));
     loadQueueRects.Add(new Rectangle(805, 985, 75, 75));
     loadQueueRects.Add(new Rectangle(880, 985, 75, 75));
     loadQueueRects.Add(new Rectangle(955, 985, 75, 75));
     selectedCapacity = ((selectRect.Width - (2 * stretchBuffer)) / stretchSize) * ((selectRect.Height - (2 * stretchBuffer)) / stretchSize);
     selectedCount = 0;
 }