Exemplo n.º 1
0
 void CreateDinosaurList()
 {
     dinosaurList = new UIList();
     dinosaurList.ItemColor = goldColor;
     dinosaurList.Position = new Vector2(-0.25f, listHeight);
     dinosaurList.Scale = listScale;
     DinosaurDatablock[] datablocks = ResourceManager.Inst.GetDinosaurDatablocks();
     for (int i = 0; i < datablocks.Length; i++)
         dinosaurList.Items.Add(datablocks[i].Name);
     dinosaurList.SetColor(new Vector4(0.15f, 0.15f, 0.15f, 1.0f));
     this.controls.Add(dinosaurList);
 }
Exemplo n.º 2
0
        public PlayerScreen()
            : base()
        {
            this.scene = new Scene();
            compass = new UICompass();
            compass.Scale = new Vector2(0.35f, 0.05f);
            compass.Position = new Vector2(0, -0.85f);

            crosshair = new UIButton(ResourceManager.Inst.GetTexture("UI/Game/crossHair.dds"), Vector4.One, string.Empty);
            crosshair.Position = Vector2.Zero;
            crosshair.Scale = Vector2.One * 0.035f;

            scoreLabel = new UIButton(null, Vector4.One, "Score:");
            scoreLabel.Position = new Vector2(0.7f, 0.85f);

            journalStatus = new UIButton(null, Vector4.One, "Journal Updated!");
            journalStatus.Position = new Vector2(-0.7f, 0.85f);
            journalStatus.SetVisible(false);

            interactStatus = new UIButton(null, Vector4.One, "Examine Object");
            interactStatus.Position = new Vector2(-0.7f, -0.85f);
            interactStatus.SetVisible(false);

            interactButton = new UIButton(ResourceManager.Inst.GetTexture("UI/Game/interact.dds"), Vector4.One, string.Empty);
            interactButton.Position = crosshair.Position;
            interactButton.Scale = crosshair.Scale * 1.15f;
            interactButton.SetVisible(false);

            list = new UIList();
            list.ItemColor = new Vector4(0.15f, 0.15f, 0.15f, 1.0f);
            list.Position = new Vector2(0.5f, 0);
            list.Scale = new Vector2(0.25f, 0.5f);
            string[] testStrings = new string[]
            {
                "Hello", "A Carton of Cigarettes", "Oh boy", "I hope this works", "25 or 6 to 4", "Rawr", "Christ",
                "El Captain", "John Wayne", "Walter White", "Stanford Cow", "Dr. Evil", "Tom Hanks", "Lindsey Lohan",
                "Raptor Jesus", "Timothy Leary", "Bauldur", "Frank Lloyd Wright", "Pink Floyd", "The Beatles", "JoCo",
                "Is this twenty yet??",
            };
            list.Items.AddRange(testStrings);
            list.SetColor(new Vector4(0.15f, 0.15f, 0.15f, 1.0f));
            //this.controls.Add(list);

            this.controls.Add(crosshair);
            this.controls.Add(journalStatus);
            this.controls.Add(compass);
            this.controls.Add(interactStatus);
            this.controls.Add(interactButton);
            this.controls.Add(scoreLabel);
        }
Exemplo n.º 3
0
 void CreateInventoryList()
 {
     inventoryList = new UIList();
     inventoryList.ItemColor = goldColor;
     inventoryList.Position = new Vector2(0.75f, listHeight);
     inventoryList.Scale = listScale;
     string[] testStrings = new string[]
     {
         "GPS", "Double Ammo", "Medicine Pack", "Scent Stopper", "Flashlight"
     };
     inventoryList.Items.AddRange(testStrings);
     inventoryList.SetColor(new Vector4(0.15f, 0.15f, 0.15f, 1.0f));
     this.controls.Add(inventoryList);
 }
Exemplo n.º 4
0
 void CreateWeaponList()
 {
     weaponList = new UIList();
     weaponList.ItemColor = goldColor;
     weaponList.Position = new Vector2(0.25f, listHeight);
     weaponList.Scale = listScale;
     string[] testStrings = new string[]
     {
         "Tactical Knife", "Pistol", "Shotgun", "SMG", "Rifle", "Sniper Rifle"
     };
     weaponList.Items.AddRange(testStrings);
     weaponList.SetColor(new Vector4(0.15f, 0.15f, 0.15f, 1.0f));
     this.controls.Add(weaponList);
 }
Exemplo n.º 5
0
 void CreateMapList()
 {
     mapList = new UIList();
     mapList.ItemColor = goldColor;
     mapList.Position = new Vector2(-0.75f, listHeight);
     mapList.Scale = listScale;
     string[] testStrings = new string[]
     {
         "Hello", "A Carton of Cigarettes", "Oh boy", "I hope this works", "25 or 6 to 4", "Rawr", "Christ",
         "El Captain", "John Wayne", "Walter White", "Stanford Cow", "Dr. Evil", "Tom Hanks", "Lindsey Lohan",
         "Raptor Jesus", "Timothy Leary", "Bauldur", "Frank Lloyd Wright", "Pink Floyd", "The Beatles", "JoCo",
         "Is this twenty yet??",
     };
     mapList.Items.AddRange(testStrings);
     mapList.SetColor(new Vector4(0.15f, 0.15f, 0.15f, 1.0f));
     this.controls.Add(mapList);
 }
Exemplo n.º 6
0
        public PlayerScreen()
            : base()
        {
            inst = this;

            compass = new UICompass();
            compass.Scale = new Vector2(0.35f, 0.05f);
            compass.Position = new Vector2(0, -0.85f);

            crosshair = new UIButton(ResourceManager.Inst.GetTexture("UI/Game/crossHair.dds"), Vector4.One, string.Empty);
            crosshair.Position = Vector2.Zero;
            crosshair.Scale = Vector2.One * 0.035f;

            journalStatus = new UIButton(null, Vector4.One, "Journal Updated!");
            journalStatus.Position = new Vector2(0, 0.15f);// new Vector2(-0.7f, 0.85f);
            journalStatus.SetVisible(false);

            interactStatus = new UIButton(null, Vector4.One, "Examine Object");
            interactStatus.Position = new Vector2(-0.7f, -0.85f);
            interactStatus.SetVisible(false);

            interactButton = new UIButton(ResourceManager.Inst.GetTexture("UI/Game/interact.dds"), Vector4.One, string.Empty);
            interactButton.Position = Vector2.Zero;
            interactButton.Scale = Vector2.One * 0.035f * 1.15f;
            interactButton.SetVisible(false);

            blackFade = new UIButton(null, Vector4.Zero, string.Empty);
            blackFade.Position = Vector2.Zero;
            blackFade.Scale = Vector2.One;
            blackFade.SetVisible(false);

            creditsLabel = new UIButton(null, Vector4.One, "Created by Matt Vitelli - Summer 2012");
            creditsLabel.Position = Vector2.Zero;
            creditsLabel.Scale = Vector2.One;
            creditsLabel.SetVisible(false);

            list = new UIList();
            list.ItemColor = new Vector4(0.15f, 0.15f, 0.15f, 1.0f);
            list.Position = new Vector2(0.5f, 0);
            list.Scale = new Vector2(0.25f, 0.5f);
            string[] testStrings = new string[]
            {
                "Hello", "A Carton of Cigarettes", "Oh boy", "I hope this works", "25 or 6 to 4", "Rawr", "Christ",
                "El Captain", "John Wayne", "Walter White", "Stanford Cow", "Dr. Evil", "Tom Hanks", "Lindsey Lohan",
                "Raptor Jesus", "Timothy Leary", "Bauldur", "Frank Lloyd Wright", "Pink Floyd", "The Beatles", "JoCo",
                "Is this twenty yet??",
            };
            list.Items.AddRange(testStrings);
            list.SetColor(new Vector4(0.15f, 0.15f, 0.15f, 1.0f));
            //this.controls.Add(list);

            healthBarTexture = (Texture2D)ResourceManager.Inst.GetTexture("UI/Game/healthBar.dds").GetTexture();
            healthBarTexture2 = (Texture2D)ResourceManager.Inst.GetTexture("UI/Game/healthBar2.dds").GetTexture();

            this.controls.Add(crosshair);
            this.controls.Add(journalStatus);
            this.controls.Add(compass);
            this.controls.Add(interactStatus);
            this.controls.Add(interactButton);
            this.controls.Add(blackFade);
            this.controls.Add(creditsLabel);

            this.scene = new Scene();

            compass.AddCustomMarker(scene.FindEntity("Tent").Transformation, ResourceManager.Inst.GetTexture("UI/Game/Home.dds"));
            bgSound = new Sound2D("Crickets", true, false);
            bgSound.Paused = false;
        }