public Hud(GameObject parent) : base(parent) { crossHair = new GuiElement(this); crossHair.setSizePix(new Vector2(100, 100)); crossHair.setMaterial("crosshair.xmf"); fpsCounter = new HudNumber(this); fpsCounter.Position = new Vector2(0, -0.8f); fpsCounter.setSizePix(new Vector2(80, 160)); fpsCounter.digits = 3; }
public Hud(GameObject parent) : base(parent) { crossHair = new GuiElement(this); crossHair.setSizeRel(new Vector2(100, 100)); crossHair.setMaterial("crosshair.xmf"); if (Settings.Instance.game.debugMode) { fpsCounter = new HudNumber(this); fpsCounter.Position = new Vector2(0, -0.8f); fpsCounter.setSizeRel(new Vector2(80, 160)); fpsCounter.digits = 3; } }
public Hud(GameObject parent) : base(parent) { crossHair = new GuiElement(this); crossHair.setSizeRel(new Vector2(100, 100)); crossHair.setMaterial("crosshair.xmf"); if (Settings.Instance.game.debugMode) { fpsCounter = new HudNumber(this); fpsCounter.Position = new Vector2(0, -0.8f); fpsCounter.setSizeRel(new Vector2(80, 160)); fpsCounter.digits = 3; } }
public Menu(GameObject parent) : base(parent) { GuiElement backGround = new GuiElement(this); backGround.setMaterial("hud\\background.xmf"); cursor = new GuiElement(this); cursor.setSizeRel(new Vector2(100, 100)); cursor.setMaterial("hud\\cursor.xmf"); ButtonList bList = new ButtonList(backGround); bList.setSizeRel(new Vector2(200, 700)); bList.Position = new Vector2(-0.85f, 0f); Button button = new Button(bList); button.setSizeRel(new Vector2(200, 100)); button.setMaterial("hud\\resume_button.xmf"); button.HandlerClick = Resume; Button button2 = new Button(bList); button2.setSizeRel(new Vector2(200, 100)); button2.setMaterial("hud\\exit_button.xmf"); button2.HandlerClick = Exit; Button button3 = new Button(bList); button3.setSizeRel(new Vector2(200, 100)); //button3.setMaterial("hud\\resume_button.xmf"); Button button4 = new Button(bList); button4.setSizeRel(new Vector2(200, 100)); //button4.setMaterial("hud\\resume_button.xmf"); Button button5 = new Button(bList); button5.setSizeRel(new Vector2(200, 100)); //button5.setMaterial("hud\\resume_button.xmf"); }
//Vector3 rawRotation;//, rotation; public Tool(Player parent, GameInput gameInput) { Parent = parent; this.gameInput = gameInput; raycastCallback = new RaycastCallback(mRaycastCallback); slot = getSlot(); icon = new GuiElement(this.parent.hud); icon.setSizeRel(new Vector2(256, 128)); iconPos = new Vector2(-0.8f, 0.8f - slot * iconDist); smoothIconPos = iconPos; icon.Position = smoothIconPos; icon.setMaterial("hud\\blank_icon.xmf"); createWeaponModel(); }
public Menu(GameObject parent) : base(parent) { GuiElement backGround = new GuiElement(this); backGround.setMaterial("hud\\background.xmf"); cursor = new GuiElement(this); cursor.setSizePix(new Vector2(100, 100)); cursor.setMaterial("hud\\cursor.xmf"); ButtonList bList = new ButtonList(backGround); bList.setSizePix(new Vector2(200, 700)); bList.Position = new Vector2(-0.85f, 0f); Button button = new Button(bList); button.setSizePix(new Vector2(200, 100)); button.setMaterial("hud\\resume_button.xmf"); button.HandlerClick = Resume; Button button2 = new Button(bList); button2.setSizePix(new Vector2(200, 100)); button2.setMaterial("hud\\exit_button.xmf"); button2.HandlerClick = Exit; Button button3 = new Button(bList); button3.setSizePix(new Vector2(200, 100)); //button3.setMaterial("hud\\resume_button.xmf"); Button button4 = new Button(bList); button4.setSizePix(new Vector2(200, 100)); //button4.setMaterial("hud\\resume_button.xmf"); Button button5 = new Button(bList); button5.setSizePix(new Vector2(200, 100)); //button5.setMaterial("hud\\resume_button.xmf"); }