//--------------------------------------------------------------------------------------------------------------------------------------------------- // // Copyright (C)2007 DarkWynter Studios. All rights reserved. // //--------------------------------------------------------------------------------------------------------------------------------------------------- // {Contact : darkwynter.com for licensing information //--------------------------------------------------------------------------------------------------------------------------------------------------- namespace DarkWynter.Engine.GameObjects { #region Using Statements using System; using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Storage; using System.Xml; using System.Diagnostics; using System.Threading; using System.Collections; using DarkWynter.Engine; using DarkWynter.Engine.Globals; using DarkWynter.Engine.ObjectLib; using DarkWynter.Engine.GameObjects; using DarkWynter.Engine.Controllers; using DarkWynter.Engine.UserInterface; using DarkWynter.Stream; using DarkWynter.Engine.Init; using Xclna.Xna.Animation; using DarkWynter.Engine.EventControl; #endregion /// /// Child class of player which handles human interactions with the game /// public class Human : Player { #region init variables //public HeadsUpDisplay deadHUD = new HeadsUpDisplay();//HUDs which can be removed private Viewport viewport; private Enums_Engine.HUDGPUDebugScreen debugScreen = Enums_Engine.HUDGPUDebugScreen.NONE; private Stopwatch ReadTimer = new Stopwatch(); private Stopwatch VisTimer = new Stopwatch(); private Stopwatch ReadCodeTimer = new Stopwatch(); private Stopwatch MoveCodeTimer = new Stopwatch(); Stopwatch imageStopWatch = new Stopwatch(); bool healthWarningShown = false; private bool wasMovedAlready = false; //bool codeVis1 = false; private string codeToBeDisplayed; private float GameWindowWidth = Statics_Stream.RenderSettings.GAME_WINDOW_WIDTH; private float GameWindowHeight = Statics_Stream.RenderSettings.GAME_WINDOW_HEIGHT; private float sizeRatioH; private float sizeRatioW; private float scaleX, scaleY; private float STOPPING_POINT = 0; private const double MAGIC_HEALTH_NUMBER = 1.475; private const int MARGIN_WIDTH = 15; private const int SCROLL = 20; private int dhudKilledByIndex; private int HUDMapIndex; private int thoughtEIndex; private int sanityIndex; private int sanityEmptyIndex; private int timerIndex; private int timerTextIndex; private int sanityTextIndex; private int dialogueBoxIndex; private int speakerTextIndex; private int dialogueTextIndex; private int hudDPadGlyph; private int codeBackgroundIndex; private int codeScrollIndex; private int eleIconIndex; private int eleNameIndex; private int setLag = 10000; // 10 seconds private int PFGM = 3; private int usableCodeScrollHeight = 0; private int codeCounter = 0; private int coins = Statics_Engine.PlayerSettings.coinsCollected; private int displayLimit = 1000; private int successImageIndex; private int debugPosition; private Vector2 CENTER_LOCATION = new Vector2(Statics_Stream.RenderSettings.GAME_WINDOW_WIDTH / 4, Statics_Stream.RenderSettings.GAME_WINDOW_HEIGHT / 4); private Vector2 CODE_VIS_LOCATION = new Vector2(0, 0); private Vector2 TIMER_TEXT_OFFSET = new Vector2(25, 10); private Vector2 SANITY_TEXT_OFFSET = new Vector2(50, 10); private Vector2 THOUGHT_TEXT_OFFSET = new Vector2(5, 10); private Vector2 DIALOGUE_LOCATION = new Vector2(20, 500); private Vector2 SPEAKER_OFFSET = new Vector2(25, 10); private Vector2 TEXT_OFFSET = new Vector2(20, 50); private Vector2 SANITY_LOCATION = new Vector2(0, 0); private Vector2 HUDMAP_LOCATION = new Vector2(0, 0); private Vector2 TIMER_LOCATION = new Vector2(0, 0); private Vector2 ELE_ICON_LOCATION = new Vector2(0, 0); private Vector2 ELE_NAME_LOCATION = new Vector2(0, 0); private Vector2 SCROLL_BAR_LOCATION = new Vector2(0, 0); private Vector2 SUCCESS_IMAGE_LOCATION = new Vector2(0, 0); private Texture2D sanityBarTexture; private Texture2D sanityBarEmptyTexture; private Texture2D HUDMapTexture; private Texture2D thoughtBarEmptyTexture; private Texture2D timerTexture; private Texture2D dialogueBoxTexture; private Texture2D codeBackgroundTexture; private Texture2D eleIconTexture; private Texture2D codeScrollTexture; private Texture2D successTexture; private ArrayList visList = new ArrayList(); //public static HeadsUpDisplay Dialogue = new HeadsUpDisplay(0); public int mapIndex; public int MapXOffset = 212; public int MapYOffset = 10; public Texture2D MapStart; public Vector2 MAP_IMAGE_LOCATION = new Vector2(0, 0); //This code is for use with the Stack images, I've copies most things directly from the Map settings, so positions will need adjustment. //Because I can't currently run the game I'm not sure exactly where things will need to be, but I can fix that as soon as everything //is back up and running. --Katie public int stackIndex; public int StackXOffset = 212; public int StackYOffset = 10; public Texture2D StackStart; public Vector2 STACK_IMAGE_LOCATION = new Vector2(0, 0); private int debugCoins; #region old textures //private Texture2D earthHUDTexture; //private Texture2D fireHUDTexture; //private Texture2D airHUDTexture; //private Texture2D waterHUDTexture; //private Texture2D terrainModHUDTexture; //private Texture2D borderTexture_top; //private Texture2D borderTexture_side; //private Texture2D hudMannaGainTexture; //private Texture2D hudDamageTexture; //private Texture2D hudKeyTexture; //private Texture2D hudLeftBackgroundTexture; //private Texture2D hudRightBackgroundTexture; #endregion #endregion public Human() : base() { } /// /// Constructor /// public Human(Load gameObjectLoader) : base(gameObjectLoader) { mass.objectType = Enums_Engine.ObjectType.PLAYER; mass.gameObjectPointer = this; } #region old constructor //public Human(int playerNumber) // : base(playerNumber) //{ // rumbleEventList.Clear(); // mass.objectType = Enums_Engine.ObjectType.PLAYER; // mass.gameObjectPointer = this; //} #endregion /// /// Load Human information from XML /// /// ObjectLibrary /// True if load was successful public override bool Load(ObjectLibrary objectLibrary) { // playerInfo = XML.playerInfo[0]; if (!base.Load(objectLibrary)) { return false; } //StopRumble(); //rumbleEventList.Clear(); CreateHUD(Statics_Stream.RenderSettings.cameraList[0].viewport, objectLibrary); imageStopWatch.Reset(); codeToBeDisplayed = Statics_Engine.GameSettings.ParsesandCompilesCode; BreakCode(); return true; } /// /// Update player behavior /// public override void Update(ref ObjectLibrary objectLibrary) { #region timing int seconds = ((int)Statics_Engine.LevelSettings.gameTimer.Elapsed.TotalSeconds) % 60; int minutes = ((int)Statics_Engine.LevelSettings.gameTimer.Elapsed.TotalSeconds) / 60; string formatedSeconds = seconds.ToString(); if (seconds < 10) { formatedSeconds = "0" + seconds.ToString(); } string timing = minutes.ToString() + ":" + formatedSeconds; DarkWynterEngine.HUD.UpdateTextVis(timerTextIndex, timing, true, Color.DarkGreen); #endregion DarkWynterEngine.HUD.UpdateTextVis(sanityTextIndex, health.ToString(), true, Color.Purple); DarkWynterEngine.HUD.UpdateImageSource(sanityEmptyIndex, new Rectangle(0, 0, sanityBarEmptyTexture.Width, (int)(MAGIC_HEALTH_NUMBER * ((80 - (int)((Statics_Engine.PlayerSettings.coinsCollected) * 10)) * ((int)sanityBarEmptyTexture.Height / 80))))); //the math should be just (int)((100 - (int)health) * ((int)sanityBarEmpty.Height / 100)); DarkWynterEngine.HUD.UpdateTextVis(debugCoins, "Thought position : " + Statics_Engine.PlayerSettings.whereAreYou, true, Color.Red); // if the coin count changes if (Statics_Engine.PlayerSettings.coinsCollected != coins) { //start the timer and post the message to the screen if (!imageStopWatch.IsRunning) { coins = Statics_Engine.PlayerSettings.coinsCollected; imageStopWatch.Reset(); imageStopWatch.Start(); DarkWynterEngine.HUD.UpdateImageDisplay(successImageIndex, successTexture, SUCCESS_IMAGE_LOCATION, successTexture.Width, successTexture.Height, Color.White, true); } } if (imageStopWatch.ElapsedMilliseconds >= displayLimit) { DarkWynterEngine.HUD.UpdateImageVis(successImageIndex, false, Color.TransparentWhite); imageStopWatch.Stop(); imageStopWatch.Reset(); } #region Not finished/working Code ////Update the thought bar //HUD.UpdateImageSource(thoughtEIndex, // new Rectangle(0, 0, // thoughtBarEmpty.Width, // (int)(MAGIC_HEALTH_NUMBER * ((totalThoughts - escapedThoughts)/100 * ((int)thoughtBarEmpty.Height / 100))))); //if (hudDPadGlyph == -1 && objectLibrary.gpuObjectLists.Count != 0) //{ // hudDPadGlyph = HUD.AddImageDisplay(objectLibrary.gpuObjectLists[0].variables[0]._read, // new Vector2(0, 0), // objectLibrary.gpuObjectLists[0].variables[0]._read.Width, // objectLibrary.gpuObjectLists[0].variables[0]._read.Height, // Color.White, // false); //} #endregion //if (Statics_Game.GameSettings.isProblemFinished && !codeVis1) //{ // // DisplayDialog(Statics_Engine.PlayerSettings.studentName,Statics_Engine.PlayerSettings.studentMessage, Color.Blue, 2000, ReadTimer, ref healthWarningShown); // RunCodeVisualization(); //} #region debug stuff // Debug walking // Dialogue.DisplayDialog("Testing for terrain mod", this.mass.currentPosition.ToString(), Color.Blue, 20000000); //Dialogue.DisplayDialog("pos", this.mass.currentPosition.ToString(), Color.Blue, 20000000); //DarkWynterEngine.HUD.UpdateTextVis(debugCoins, "LVN : " + Statics_Engine.PlayerSettings.lastVisitedNode, true, Color.Red); // DarkWynterEngine.HUD.UpdateTextVis(debugPosition, "Position : " + mass.currentPosition.ToString(), true, Color.Red); //debug health bars //if (health > 10) //{ // healthWarningShown = false; // health -= 6; //} //if (health <= 10) //{ // DisplayDialog("Cera", "You're about to die...", Color.Red, 2000, ReadTimer, ref healthWarningShown); //} if (debugScreen != Statics_Engine.HumanSettings.debugScreen && objectLibrary.gpuObjectLists.Count != 0) { debugScreen = Statics_Engine.HumanSettings.debugScreen; SetDebugScreen(objectLibrary); } #endregion base.Update(ref objectLibrary); //UpdateIndicators(); //UpdateKillInfo(); //if (stopRumble) //{ // StopRumble(); //} } /// /// Toggle First Person View /// public override void FPVToggle() { fpvEnabled = !fpvEnabled; } /// /// Update the HUD /// /// private void UpdateHUD(ObjectLibrary objectLibrary) { } #region G2L Visualization Methods /// /// Get the code from the student and run it on the screen so they can follow what it actually does /// Going to be hacky and buggy for the time being /// //public void RunCodeVisualization() //{ // usableCodeScrollHeight = codeScrollTexture.Height - PFGM; // STOPPING_POINT = CODE_VIS_LOCATION.Y + visList.Count * usableCodeScrollHeight; // // if we aren't finished, run the code // if (SCROLL_BAR_LOCATION.Y != STOPPING_POINT) // { // // after 5 seconds, move the scroll bar down to the next line of code // if (ReadCodeTimer.ElapsedMilliseconds >= 1000) // { // SCROLL_BAR_LOCATION.Y += usableCodeScrollHeight; // HUD.UpdateImageDisplay(codeScrollIndex, codeScrollTexture, // SCROLL_BAR_LOCATION, codeScrollTexture.Width, usableCodeScrollHeight, Color.White, true); // ReadCodeTimer.Reset(); // ReadCodeTimer.Start(); // } // // reset // else if (SCROLL_BAR_LOCATION.Y > CODE_VIS_LOCATION.Y + visList.Count * usableCodeScrollHeight) // { // ReadCodeTimer.Stop(); // ReadCodeTimer.Reset(); // codeVis1 = true; // } // // setup // else if (!ReadCodeTimer.IsRunning) // { // codeScrollIndex = HUD.AddImageDisplay(codeScrollTexture, CODE_VIS_LOCATION, codeScrollTexture.Width, usableCodeScrollHeight, Color.White, true); // HUD.UpdateImageDisplay(codeBackgroundIndex, codeBackgroundTexture, // CODE_VIS_LOCATION, codeBackgroundTexture.Width, codeBackgroundTexture.Height, Color.White, true); // VisTimer.Start(); // // display the user code // HUD.AddTextDisplay(codeToBeDisplayed, CODE_VIS_LOCATION, Color.White); // // display the scroll bar over (illusion) the code // //HUD.AddImageDisplay(codeScrollTexture, CODE_VIS_LOCATION, codeScrollTexture.Width, codeScrollTexture.Height, Color.White, true); // ReadCodeTimer.Reset(); // ReadCodeTimer.Start(); // } // } // // if finished, drop the vis // else // { // ReadCodeTimer.Stop(); // ReadCodeTimer.Reset(); // codeVis1 = false; // HUD.UpdateImageDisplay(codeScrollIndex, codeScrollTexture, // SCROLL_BAR_LOCATION, codeScrollTexture.Width, codeScrollTexture.Height, Color.White, false); // HUD.UpdateImageDisplay(codeBackgroundIndex, codeBackgroundTexture, // CODE_VIS_LOCATION, codeBackgroundTexture.Width, codeBackgroundTexture.Height, Color.White, false); // HUD.UpdateTextVisible(5, false); // } //} /// /// Break the code into a list for ease of use /// private void BreakCode() { string brokenCode = codeToBeDisplayed; while (!brokenCode.Equals(null)) { int test = brokenCode.IndexOf('\n', 0, brokenCode.Length); if (test == 0) { brokenCode = brokenCode.Remove(0, 1); } else if (test != -1) { visList.Add(brokenCode.Substring(0, test)); brokenCode = brokenCode.Remove(0, test); } else { visList.Add(brokenCode); break; } } } #endregion /// /// Generate the HUD /// /// Viewport to associate with the HUD /// ObjectLibrary public void CreateHUD(Viewport viewport, ObjectLibrary objectLibrary) { viewport = AssignHUDTextures(viewport); DarkWynterEngine.HUD = new HeadsUpDisplay(playerIndex); // coins = Statics_Engine.PlayerSettings.coinsCollected; debugCoins = DarkWynterEngine.HUD.AddTextDisplay("Thought position : " + Statics_Engine.PlayerSettings.whereAreYou, new Vector2(400, 400), Color.White); // debugPosition = DarkWynterEngine.HUD.AddTextDisplay("Position : " + mass.currentPosition.ToString(), new Vector2(400, 400), Color.Red); timerTextIndex = DarkWynterEngine.HUD.AddTextDisplay(" ", TIMER_LOCATION + TIMER_TEXT_OFFSET, Color.DarkGreen); sanityTextIndex = DarkWynterEngine.HUD.AddTextDisplay(" ", SANITY_LOCATION + SANITY_TEXT_OFFSET, Color.Purple); dialogueBoxIndex = DarkWynterEngine.HUD.AddImageDisplay(dialogueBoxTexture, DIALOGUE_LOCATION, dialogueBoxTexture.Width, dialogueBoxTexture.Height, Color.White, false); speakerTextIndex = DarkWynterEngine.HUD.AddTextDisplay("", DIALOGUE_LOCATION + SPEAKER_OFFSET, Color.White); DarkWynterEngine.HUD.UpdateTextVisible(speakerTextIndex, false); dialogueTextIndex = DarkWynterEngine.HUD.AddTextDisplay("", DIALOGUE_LOCATION + TEXT_OFFSET, Color.White); DarkWynterEngine.HUD.UpdateTextVisible(dialogueTextIndex, false); sanityIndex = DarkWynterEngine.HUD.AddImageDisplay(sanityBarTexture, SANITY_LOCATION, sanityBarTexture.Width, sanityBarTexture.Height, Color.Purple, true); sanityEmptyIndex = DarkWynterEngine.HUD.AddImageDisplay(sanityBarEmptyTexture, SANITY_LOCATION, sanityBarEmptyTexture.Width, sanityBarEmptyTexture.Height, Color.White, true); //HUDMapIndex = HUD.AddImageDisplay(HUDMapTexture, //HUDMAP_LOCATION, HUDMapTexture.Width, HUDMapTexture.Height, Color.White, true); timerIndex = DarkWynterEngine.HUD.AddImageDisplay(timerTexture, TIMER_LOCATION, timerTexture.Width, timerTexture.Height, Color.White, true); codeBackgroundIndex = DarkWynterEngine.HUD.AddImageDisplay(codeBackgroundTexture, CODE_VIS_LOCATION, codeBackgroundTexture.Width, codeBackgroundTexture.Height, Color.White, false); eleIconIndex = DarkWynterEngine.HUD.AddImageDisplay(eleIconTexture, ELE_ICON_LOCATION, eleIconTexture.Width, eleIconTexture.Height, Color.White, true); successImageIndex = DarkWynterEngine.HUD.AddImageDisplay(successTexture, SUCCESS_IMAGE_LOCATION, successTexture.Width, successTexture.Height, Color.TransparentWhite, false); mapIndex = DarkWynterEngine.HUD.AddImageDisplay(MapStart, MAP_IMAGE_LOCATION, MapStart.Width, MapStart.Height, Color.White, true); UpdateHUD(objectLibrary); } /// /// /// /// /// private Viewport AssignHUDTextures(Viewport viewport) { //init our teckschores sanityBarTexture = Statics_Engine.SystemSettings.content.Load("Content/_textures/Thought"); sanityBarEmptyTexture = Statics_Engine.SystemSettings.content.Load("Content/_textures/ThoughtE"); //HUDMapTexture = Statics_Engine.SystemSettings.content.Load("Content/_textures/MapHUD/map"); timerTexture = Statics_Engine.SystemSettings.content.Load("Content/_textures/Timer"); dialogueBoxTexture = Statics_Engine.SystemSettings.content.Load("Content/_textures/dialogueBox"); codeBackgroundTexture = Statics_Engine.SystemSettings.content.Load("Content/_textures/transBlack"); codeScrollTexture = Statics_Engine.SystemSettings.content.Load("Content/_textures/scrollBar"); eleIconTexture = Statics_Engine.SystemSettings.content.Load("Content/_textures/EleIcon"); MapStart = Statics_Engine.SystemSettings.content.Load("Content/_textures/MapHUD/map"); successTexture = Statics_Engine.SystemSettings.content.Load("Content/_textures/success"); // init our locations ELE_ICON_LOCATION = new Vector2(0 + MARGIN_WIDTH, 0 + MARGIN_WIDTH * 2); SANITY_LOCATION = new Vector2(0 + MARGIN_WIDTH + eleIconTexture.Width, 0 + MARGIN_WIDTH); ELE_NAME_LOCATION = new Vector2(MARGIN_WIDTH + 0, sanityBarTexture.Height + MARGIN_WIDTH); //HUDMAP_LOCATION = new Vector2(viewport.Width - HUDMapTexture.Width - MARGIN_WIDTH, 0 + MARGIN_WIDTH); TIMER_LOCATION = new Vector2((viewport.Width / 2) - (int)(timerTexture.Width / 2), MARGIN_WIDTH); CODE_VIS_LOCATION = new Vector2(0 + MARGIN_WIDTH, viewport.Height / 4 + MARGIN_WIDTH); SCROLL_BAR_LOCATION = new Vector2(0 + MARGIN_WIDTH, (viewport.Height / 4 + MARGIN_WIDTH)); SUCCESS_IMAGE_LOCATION = new Vector2(Statics_Stream.RenderSettings.cameraList[0].viewport.Width / 2, Statics_Stream.RenderSettings.cameraList[0].viewport.Height / 2); MAP_IMAGE_LOCATION = new Vector2(Statics_Stream.RenderSettings.cameraList[0].viewport.Width - MapXOffset, MapYOffset); STACK_IMAGE_LOCATION = new Vector2(Statics_Stream.RenderSettings.cameraList[0].viewport.Width - StackXOffset, StackYOffset); return viewport; } /// /// Debugging stuff /// /// private void SetDebugScreen(ObjectLibrary objectLibrary) { switch (debugScreen) { case Enums_Engine.HUDGPUDebugScreen.NONE: { DarkWynterEngine.HUD.UpdateImageVis(hudDPadGlyph, false, Color.White); break; } case Enums_Engine.HUDGPUDebugScreen.LOCATION_MAP: { DarkWynterEngine.HUD.UpdateImageDisplay(hudDPadGlyph, objectLibrary.gpuObjectLists[0].locationMap._read, new Vector2(0, 0), objectLibrary.gpuObjectLists[0].locationMap._read.Width, objectLibrary.gpuObjectLists[0].locationMap._read.Height, Color.White, true); break; } case Enums_Engine.HUDGPUDebugScreen.TOTAL_FORCE: { DarkWynterEngine.HUD.UpdateImageDisplay(hudDPadGlyph, objectLibrary.gpuObjectLists[0].variables[0]._read, new Vector2(0, 0), objectLibrary.gpuObjectLists[0].variables[0]._read.Width, objectLibrary.gpuObjectLists[0].variables[0]._read.Height, Color.White, true); break; } case Enums_Engine.HUDGPUDebugScreen.ACCELERATION: { DarkWynterEngine.HUD.UpdateImageDisplay(hudDPadGlyph, objectLibrary.gpuObjectLists[0].variables[1]._read, new Vector2(0, 0), objectLibrary.gpuObjectLists[0].variables[1]._read.Width, objectLibrary.gpuObjectLists[0].variables[1]._read.Height, Color.White, true); break; } case Enums_Engine.HUDGPUDebugScreen.VELOCITY: { DarkWynterEngine.HUD.UpdateImageDisplay(hudDPadGlyph, objectLibrary.gpuObjectLists[0].variables[2]._read, new Vector2(0, 0), objectLibrary.gpuObjectLists[0].variables[2]._read.Width, objectLibrary.gpuObjectLists[0].variables[2]._read.Height, Color.White, true); break; } case Enums_Engine.HUDGPUDebugScreen.ROTATION: { DarkWynterEngine.HUD.UpdateImageDisplay(hudDPadGlyph, objectLibrary.gpuObjectLists[0].variables[3]._read, new Vector2(0, 0), objectLibrary.gpuObjectLists[0].variables[3]._read.Width, objectLibrary.gpuObjectLists[0].variables[3]._read.Height, Color.White, true); break; } case Enums_Engine.HUDGPUDebugScreen.CURRENT_POSITION: { DarkWynterEngine.HUD.UpdateImageDisplay(hudDPadGlyph, objectLibrary.gpuObjectLists[0].variables[4]._read, new Vector2(0, 0), objectLibrary.gpuObjectLists[0].variables[4]._read.Width, objectLibrary.gpuObjectLists[0].variables[4]._read.Height, Color.White, true); break; } case Enums_Engine.HUDGPUDebugScreen.DUMMY: { DarkWynterEngine.HUD.UpdateImageDisplay(hudDPadGlyph, objectLibrary.gpuObjectLists[0].variables[5]._read, new Vector2(0, 0), objectLibrary.gpuObjectLists[0].variables[5]._read.Width, objectLibrary.gpuObjectLists[0].variables[5]._read.Height, Color.White, true); break; } case Enums_Engine.HUDGPUDebugScreen.RADIUS: { DarkWynterEngine.HUD.UpdateImageDisplay(hudDPadGlyph, objectLibrary.gpuObjectLists[0].variables[6]._read, new Vector2(0, 0), objectLibrary.gpuObjectLists[0].variables[6]._read.Width, objectLibrary.gpuObjectLists[0].variables[6]._read.Height, Color.White, true); break; } case Enums_Engine.HUDGPUDebugScreen.SCALE: { DarkWynterEngine.HUD.UpdateImageDisplay(hudDPadGlyph, objectLibrary.gpuObjectLists[0].variables[7]._read, new Vector2(0, 0), objectLibrary.gpuObjectLists[0].variables[7]._read.Width, objectLibrary.gpuObjectLists[0].variables[7]._read.Height, Color.White, true); break; } case Enums_Engine.HUDGPUDebugScreen.MASS: { DarkWynterEngine.HUD.UpdateImageDisplay(hudDPadGlyph, objectLibrary.gpuObjectLists[0].variables[8]._read, new Vector2(0, 0), objectLibrary.gpuObjectLists[0].variables[8]._read.Width, objectLibrary.gpuObjectLists[0].variables[8]._read.Height, Color.White, true); break; } } } } } ///// ///// Displays how the current player died ///// //public void UpdateKillInfo() //{ // if (killInfo != "") // { // DarkWynterEngine.HUD.UpdateText(this.dhudKilledByIndex, killInfo); // } // else if (killingParticle != null) // { // string killerString; // if (killedBy == playerIndex) // { // DarkWynterEngine.HUD.UpdateText(this.dhudKilledByIndex, "Suicidal tendencies..."); // } // else // { // switch (killedBy) // { // case 0: // killerString = "Player 1"; // break; // case 1: // killerString = "Player 2"; // break; // case 2: // killerString = "Player 3"; // break; // case 3: // killerString = "Player 4"; // break; // default: // killerString = "Bot " + (killedBy - 3); // break; // } // switch (killingParticle.particleType) // { // case Enums_Engine.ParticleType.Air: // DarkWynterEngine.HUD.UpdateText(this.dhudKilledByIndex, "Blown away by " + killerString); // break; // case Enums_Engine.ParticleType.Earth: // if (killingParticle.mass.energy > 0.3f) // { // DarkWynterEngine.HUD.UpdateText(this.dhudKilledByIndex, "Molted by " + killerString); // } // else // { // DarkWynterEngine.HUD.UpdateText(this.dhudKilledByIndex, "Buried by " + killerString); // } // break; // case Enums_Engine.ParticleType.Water: // if (killingParticle.mass.energy > 0.3f) // { // DarkWynterEngine.HUD.UpdateText(this.dhudKilledByIndex, "Boiled by " + killerString); // } // else if (killingParticle.mass.energy < -0.3f) // { // DarkWynterEngine.HUD.UpdateText(this.dhudKilledByIndex, "Frozen by " + killerString); // } // else // { // DarkWynterEngine.HUD.UpdateText(this.dhudKilledByIndex, "Drowned by " + killerString); // } // break; // } // } // } //}