private void equalsButton_Click(object sender, RoutedEventArgs e) { part2 = Convert.ToDouble(ScreenText.Text); ScreenText.Clear(); switch (select) { case '+': answer = part1 + part2; ScreenText.Text = "" + answer; break; case '-': answer = part1 - part2; ScreenText.Text = "" + answer; break; case '/': answer = part1 / part2; ScreenText.Text = "" + answer; break; case '*': answer = part1 * part2; ScreenText.Text = "" + answer; break; } }
private void OnTriggerEnter(Collider c) { if (isOpening) { return; } var inventory = c.GetComponent <PlayerInventory>(); if (inventory == null) { return; } if (inventory.HasKey(keyID)) { ScreenText.Log("Opened {0} door", Key.Name); inventory.RemoveKey(keyID); Open(); } else { ScreenText.Log("{0} key required", Key.Name); } }
public ScreenText GetLaserChargePercentText(Font font) { string str = secondaryWeapon.GetTextInfo(); ScreenText scoreText = new ScreenText(str, font, Constants.Fonts.bigFontSize, Color.White); return(scoreText); }
public RoomSettings(Engine engine) : base("Room Settings") { NewSize = new Vector3(engine.room.Width, engine.room.Depth, engine.room.Height); AddCloseButton(engine); AddText("Use these buttons to resize the map. Left click extends a border, right click retracts the border.", engine.FontMain); DisplayText = new ScreenText(this, "#", engine.FontMain); UpdateText(); AddElement(DisplayText); AddElement(new ScreenButton(this, "Update Room", engine.FontMain)); Vector2 _tl = new Vector2(Screen.boarderSize, GetTotalElementHeight()); Vector2 _sz = new Vector2(32, 32); Vector2 _left = new Vector2(32, 0); Vector2 _down = new Vector2(0, 32); ScreenPictureButton BTop = new ScreenPictureButton(this, "Up Border", engine.textureManager.Dic["uparrow"], _tl + _left, _sz); ScreenPictureButton BLeft = new ScreenPictureButton(this, "Left Border", engine.textureManager.Dic["leftarrow"], _tl + _down, _sz); ScreenPictureButton BRight = new ScreenPictureButton(this, "Right Border", engine.textureManager.Dic["rightarrow"], _tl + _down + _left * 2, _sz); ScreenPictureButton BFront = new ScreenPictureButton(this, "Down Border", engine.textureManager.Dic["downarrow"], _tl + _down + _left, _sz); this.AddElement(BTop); this.AddElement(BLeft); this.AddElement(BRight); this.AddElement(BFront); ScreenPictureButton BBack = new ScreenPictureButton(this, "ZUp", engine.textureManager.Dic["uparrow"], _tl + _left * 4, _sz); ScreenPictureButton BBottom = new ScreenPictureButton(this, "ZDown", engine.textureManager.Dic["downarrow"], _tl + _down + _left * 4, _sz); this.AddElement(BBack); this.AddElement(BBottom); AddCloseButton(engine); }
public void SpeekCurrentFieldLabel() { if (this.emu.IsConnected) { ScreenField xf = null; xf = GetCurrentField(); if (xf != null) { ScreenField xf1 = GetPreviousField(xf); if (xf1 != null && !String.IsNullOrEmpty(xf1.Text.Trim()) && xf1.Location.top == xf.Location.top) { Tolk.Speak(xf1.Text.Trim().Replace("|", "")); } else { if (!String.IsNullOrEmpty(ScreenText)) { ScreenField xf2 = GetNextUnprotectedField(xf); if (xf2 != null && xf2.Location.top == xf.Location.top) { Tolk.Speak(ScreenText.Substring(xf.Location.position + xf.Location.top + xf.Location.length, (xf2.Location.position + xf2.Location.top) - (xf.Location.position + xf.Location.top + xf.Location.length)).Replace("|", "")); } else { Tolk.Speak(ScreenText.Substring(xf.Location.position + xf.Location.top + xf.Location.length, 80 - (xf.Location.left + xf.Location.length)).Trim().Replace("|", "")); } } } } } }
/// <summary> /// Обновление положения и перерисовка /// </summary> private void UpdateAndDraw() { backGround = new Sprite(TextureEngine.spaceTexture); if (useTextures) { window.Draw(backGround); } playerShip.Update(dt, gameTimer); laserChargeText = playerShip.GetLaserChargePercentText(windowFont); DrawLaserChargeLevel(laserChargeText); if (playerShip.UsePrimaryWeapon || playerShip.UseSecondaryWeapon) { playerShip.Shoot(dictProjectiles); } foreach (Asteroid a in dictAsteroids.Values) { a.Update(dt, gameTimer); a.Draw(window, useTextures); } foreach (Shot p in dictProjectiles.Values) { p.Update(dt, gameTimer); p.Draw(window, useTextures); } foreach (Ufo p in dictUfos.Values) { p.Update(dt, gameTimer); p.Draw(window, useTextures); } playerShip.Draw(window, useTextures); UpdateScore(); window.Draw(scoreText.text); }
// Use this for initialization void Awake() { score = 0; //配列の初期化 for (int i = 0; i < board.GetLength(0); i++) { for (int j = 0; j < board.GetLength(1); j++) { board[i, j] = -1; board_num[i, j] = -1; } } //初期用配列設定 board[0, 0] = maxDiceId; board_num[0, 0] = 1; DiceBase = (GameObject)Resources.Load("Dice"); Dice = GameObject.Find("Dice"); dices.Add(Dice); //リストにオブジェクトを追加 Aqui = GameObject.Find("Aqui"); objAquiController = Aqui.GetComponent <AquiController>(); objDiceController = Dice.GetComponent <DiceController>(); if (gameType == 3) { board[0, 0] = -1; board_num[0, 0] = -1; maxDiceId = 0; dices.Clear(); Destroy(Dice); } StatusText = GameObject.Find("StatusText"); objStatusText = StatusText.GetComponent <StatusTextController>(); ScreenText = GameObject.Find("ScreenText"); objScreenText = ScreenText.GetComponent <ScreenTextController>(); gobjOGController = GameObject.Find("OnlineGameController"); //BGM if (gameType != 2) { BgmManager.Instance.Play((stage + 1).ToString()); //BGM } else { BgmManager.Instance.Play("tutorial"); //BGM } //AudioSourceコンポーネントを取得し、変数に格納 AudioSource[] audioSources = GetComponents <AudioSource>(); sound_one = audioSources[0]; sound_levelup = audioSources[1]; sound_vanish = audioSources[2]; }
public ScreenTextButton(Camera camera, Func <Vector2> positionProvider, Func <Vector2> sizeProvider, string text, Func <float> textHeightProvider = null, Func <Vector2> textPositionProvider = null, IScreenParentObject parent = null, MyTexture2D texture = null) : base(camera, positionProvider, sizeProvider, parent, texture) { SpriteFont fnt = FontManager.AntigoniMed50; Text = new ScreenText(Camera, fnt, text, textPositionProvider, textHeightProvider ?? (() => CalculateTextSize(BasicSize - new Vector2(5), fnt.MeasureString(text)).Y), this); Text.ColorChanger.ResetColor(Color.White); AddNestedObject(Text, 5); }
public ScreenTextButton(Camera camera, Vector2 position, Vector2 size, string text, IScreenParentObject parent = null, MyTexture2D texture = null) : base(camera, position, size, parent, texture) { SpriteFont fnt = FontManager.AntigoniMed50; Text = new ScreenText(Camera, fnt, text, Vector2.Zero, CalculateTextSize(BasicSize - new Vector2(5), fnt.MeasureString(text)).Y, this); Text.ColorChanger.ResetColor(Color.White); AddNestedObject(Text, 5); }
private void setActionScreenText(string message) { ScreenText screenText = actionScreen.GetComponent <ScreenText>(); if (screenText == null) { return; } screenText.SetText(message); }
override protected void OnGUIInner() { Texture texture = SpriteManager.GetIntro(); float scale = (float)Screen.height / (float)texture.height; int height = Mathf.RoundToInt(scale * texture.height); int width = Mathf.RoundToInt(scale * texture.width); int x = (Screen.width - width) / 2; GUI.DrawTexture(new Rect(x, GuiHelper.PercentH(0.1), width, height), texture); GuiHelper.ButtonWithText(0.3, 0.9, 0.3, 0.3, "Classic", SpriteManager.GetRoundButton(), GuiHelper.MicroFont, delegate(){ Minigame m = gameObject.AddComponent <Minigame>(); Destroy(this); m.PrepareRace(Game.Me.Player, ScreenAfterMinigameClassic.PrepareScreen, Mission.Classic, Game.Me.ClassicCarConfig); }); GuiHelper.ButtonWithText(0.14, 0.78, 0.15, 0.15, "?", SpriteManager.GetRoundButton(), GuiHelper.MicroFont, delegate(){ ScreenText m = gameObject.AddComponent <ScreenText>(); m.Prepare(delegate() { m.gameObject.AddComponent <ScreenSplash>(); Destroy(m); }, "Classic mode", "In classic mode you drive as far as you get. " + "Pick up oil stains to have fuel, avoid other obstacles." + "\n\nThere are google leaderboards and achievements with global scores, connect to it if you want to compare with others."); Destroy(this); }); GuiHelper.ButtonWithText(0.7, 0.9, 0.3, 0.3, "Adventure", SpriteManager.GetRoundButton(), GuiHelper.MicroFont, delegate(){ gameObject.AddComponent <ScreenAdvModeStart>(); Destroy(this); }); GuiHelper.ButtonWithText(0.85, 0.78, 0.15, 0.15, "?", SpriteManager.GetRoundButton(), GuiHelper.MicroFont, delegate(){ ScreenText m = gameObject.AddComponent <ScreenText>(); m.Prepare(delegate() { m.gameObject.AddComponent <ScreenSplash>(); Destroy(m); }, "Adventure mode", "In adventure mode you have your own car. Upgrade it with coins. " + "Make missions, collect coins in race. Drive further. " + "The farther you get the more coins there will be. " + "Pick up oil stains to have fuel, avoid other obstacles. " + "At some point shields will be available. " + "\n\nThere are google leaderboards with global scores, connect to it if you want to compare with others."); Destroy(this); }); GuiHelper.DrawText("K Bobnis: Design, Programming\nM Bartynski: Design, Concept", GuiHelper.MicroFont, 0.1, 0.1, 0.8, 0.17); if (GUI.Button(new Rect(GuiHelper.PercentW(0.79), GuiHelper.PercentH(0.21), GuiHelper.PercentW(0.2), GuiHelper.PercentH(0.2)), SpriteManager.GetSettingsIcon(), GuiHelper.CustomButton)) { gameObject.AddComponent <ScreenOptions>(); Destroy(this); } }
override protected void OnGUIInner() { GuiHelper.DrawAtTop("Settings"); float textY = 0.3f; float buttonY = 0.04f; float diff = 0.1f; GuiHelper.DrawText("Sounds", GuiHelper.SmallFontLeft, 0.1, textY, 0.8, 0.1); GuiHelper.ButtonWithText(0.8, textY + buttonY, 0.2, 0.15, (Sounds.IsMuted()?" Turn on":"Turn off"), SpriteManager.GetRoundButton(), GuiHelper.MicroFont, delegate(){ Sounds.Mute(!Sounds.IsMuted()); }); textY += diff; GuiHelper.DrawText("Fb fan page", GuiHelper.SmallFontLeft, 0.1, textY, 0.8, 0.1); GuiHelper.ButtonWithText(0.8, textY + buttonY, 0.13, 0.13, "", SpriteManager.GetFbIcon(), GuiHelper.SmallFont, delegate(){ }); textY += diff; string isNow = CarSmasherSocial.Authenticated ? "on" : "off"; string willBe = CarSmasherSocial.Authenticated ? "disconnect" : "connect"; GuiHelper.DrawText("Google games are " + isNow, GuiHelper.MicroFontLeft, 0.1, textY, 0.8, 0.1); Texture googlePlay = CarSmasherSocial.Authenticated ? SpriteManager.GetGooglePlay() : SpriteManager.GetInactiveGooglePlay(); GuiHelper.ButtonWithText(0.8, textY + buttonY - 0.015, 0.25, 0.2, willBe, googlePlay, GuiHelper.MicroFont, delegate(){ CarSmasherSocial.InitializeOrLogOut(true, null, null, this); }); textY += diff; bool vibrationsOn = Parameter.IsOn(ParameterType.VIBRATION); GuiHelper.DrawText("Vibrations", GuiHelper.SmallFontLeft, 0.1, textY, 0.8, 0.1); GuiHelper.ButtonWithText(0.8, textY + buttonY, 0.2, 0.15, "Turn " + (vibrationsOn ? "off" : "on"), SpriteManager.GetRoundButton(), GuiHelper.MicroFont, delegate() { ParameterType.VIBRATION.Switch(!vibrationsOn); }); textY += diff; bool fasterStart = Parameter.IsOn(ParameterType.FASTER_START); GuiHelper.DrawText("Faster start", GuiHelper.SmallFontLeft, 0.1, textY, 0.8, 0.1); GuiHelper.ButtonWithText(0.8, textY + buttonY, 0.2, 0.15, "Turn " + (fasterStart ? "off" : "on"), SpriteManager.GetRoundButton(), GuiHelper.MicroFont, delegate() { ParameterType.FASTER_START.Switch(!fasterStart); }); GuiHelper.ButtonWithText(0.66, textY + buttonY, 0.2, 0.1, "i", SpriteManager.GetRoundButton(), GuiHelper.MicroFont, delegate() { ScreenText st = gameObject.AddComponent <ScreenText>(); Destroy(this); st.Prepare(delegate(){ st.gameObject.AddComponent <ScreenOptions>(); Destroy(st); }, "Faster start", "If your high score is good, your car will be faster in first 300 distance to save you time." + "\n\nUse this when you want to show this game to a new person, he will have slower start"); }); }
private void OnTriggerEnter(Collider c) { var inventory = c.GetComponent <PlayerInventory>(); if (inventory == null) { return; } ScreenText.Log("Picked up {0} key", Key.Name); inventory.AddKey(keyID); UnityUtil.Destroy(gameObject); }
public SaveLoadBlockset(Engine engine, BlockPlacer parentScreen) : base("Save or Load Prompt") { DemandPriority = true; text = new ScreenText(this, "Type in the name of this set below.", engine.FontMain); AddElement(text); input = new ScreenInput(this, engine.FontMain); input.InputString = engine.room.BlockSet.Name; AddElement(input); AddElement(new ScreenButton(this, "Save", engine.FontMain)); AddElement(new ScreenButton(this, "Load", engine.FontMain)); AddCloseButton(engine); this.parentScreen = parentScreen; }
public override ICalculator numericButtonPressed(int button) { if (ScreenText.Length < maxDigitsOnScreen) { if (ScreenText.Equals("0")) { ScreenValue = button; } else { ScreenText = ScreenText + button; } } return(new ScreenViewCalculatorState(AccumulatorValue, ScreenText, calculatorOperator, maxDigitsOnScreen)); }
public VoipRanges(Client client) : base(client) { CommandRegister.RegisterCommand("voip", changeVoipRange); voipTypes.ToList().ForEach(o => voipRanges.Add(o.Value)); client.RegisterTickHandler(OnTick); voiceText = new ScreenText("Voice: ", 31, 1026, 0.25f, TextThread, System.Drawing.Color.FromArgb(255, 200, 200, 200), Font.ChaletLondon, Alignment.Left); rangeText = new ScreenText(currentVoipName, 78, 1026, 0.25f, VoipRangeTick, System.Drawing.Color.FromArgb(255, 200, 200, 200), Font.ChaletLondon, Alignment.Left); CitizenFX.Core.Native.API.NetworkSetTalkerProximity(voipTypes["Nearby"]); client.RegisterEventHandler("Session.Loaded", new Action(() => { CitizenFX.Core.Native.API.NetworkSetTalkerProximity(voipTypes["Nearby"]); CitizenFX.Core.Native.API.NetworkClearVoiceChannel(); })); }
private Avalon(uint width, uint height, string title, Color clrColor) : base(width, height, title, clrColor) { //NULL - это показатель того, что элемент внутри экрана edgeArray = edgeArray.Where(x => x != Edge.NULL).ToArray(); player = new Player(); rnd = new Random(); dictAsteroids = new Dictionary <string, Asteroid>(); dictProjectiles = new Dictionary <string, Shot>(); dictUfos = new Dictionary <string, Ufo>(); objectForDelete = new HashSet <string>(); partedAsteroids = new HashSet <Asteroid>(); scoreText = new ScreenText("Score: 0", windowFont, Constants.Fonts.bigFontSize, Color.White); }
/*= new ScreenText("0 MPH", 966, 1013, 0.4f, () => * { * SpeedIndicator.Caption = $"{Math.Floor(Cache.PlayerPed.CurrentVehicle.Speed * 2.23694)} MPH"; * * return Task.FromResult(0); * }, Color.FromArgb(255, 255, 255), Font.ChaletLondon);*/ public VehicleDisplay(Client client) : base(client) { speedIndicatedBackground = new Rect(255, 1022, 88, 32, null, Color.FromArgb(150, 0, 0, 0), true); SpeedIndicator = new ScreenText("0", 211, 1000, 0.64f, async() => { SpeedIndicator.Caption = $"{Math.Floor(Cache.PlayerPed.CurrentVehicle.Speed * 2.23694)}"; }, Color.FromArgb(255, 255, 255), Font.ChaletComprimeCologne, Alignment.Left); MPHText = new ScreenText("mph", 255, 1014, 0.4f, async() => {}, Color.FromArgb(255, 255, 255), Font.ChaletComprimeCologne, Alignment.Left); fuelIndicatorBackground = new Rect(255, 979, 88, 32, null, Color.FromArgb(150, 0, 0, 0), true); fuelIndicator = new ScreenText("0", 211, 956, 0.64f, null, Color.FromArgb(255, 255, 255), Font.ChaletComprimeCologne, Alignment.Left); fuelText = new ScreenText("fuel", 255, 970, 0.4f, async() => { }, Color.FromArgb(255, 255, 255), Font.ChaletComprimeCologne, Alignment.Left); client.RegisterTickHandler(RadarTick); /*client.RegisterEventHandler("baseevents:enteredVehicle", new Action<int, int, string>((veh, seat, name) => { * client.RegisterTickHandler(VehicleTick); * })); * client.RegisterEventHandler("baseevents:leftVehicle", new Action<int, int, string>((veh, seat, name) => { * client.DeregisterTickHandler(VehicleTick); * }));*/ compassDirection = new ScreenText("S", 28, 810, 0.9f, async() => { compassDirection.Caption = GetCardinalDirection(); }, Color.FromArgb(255, 255, 255), Font.ChaletLondon, Alignment.Left, true, true); streetDisplay = new ScreenText($"~b~{GetCrossingName(Cache.PlayerPed.Position)[0]}~w~ in ~y~{World.GetZoneLocalizedName(Cache.PlayerPed.Position)}", 85, 820, 0.29f, async() => { streetDisplay.Caption = $"~b~{GetCrossingName(Cache.PlayerPed.Position)[0]}~w~ in ~y~{World.GetZoneLocalizedName(Cache.PlayerPed.Position)}"; }, Color.FromArgb(255, 255, 255), Font.ChaletLondon, Alignment.Left, true, true); crossingDisplay = new ScreenText($"Crossing ~y~{GetCrossingName(Cache.PlayerPed.Position)[1]}", 85, 844, 0.29f, async() => { var crossingName = GetCrossingName(Cache.PlayerPed.Position)[1]; if (crossingName != "") { crossingDisplay.Caption = $"Crossing ~y~{GetCrossingName(Cache.PlayerPed.Position)[1]}"; } else { crossingDisplay.Caption = ""; } }, Color.FromArgb(255, 255, 255), Font.ChaletLondon, Alignment.Left, true, true); }
public override ICalculator invertSignButtonPressed() { log.Debug("Wcisnieto przycisk odwrocenia znaku "); String newScreenValue = "?"; if (ScreenText.StartsWith("-")) { newScreenValue = ScreenText.Substring(1); } else if (!ScreenText.Equals("0")) { newScreenValue = '-' + ScreenText; } else { newScreenValue = ScreenText; } return(new ScreenViewCalculatorState(AccumulatorValue, newScreenValue, calculatorOperator, maxDigitsOnScreen)); }
public TimeDisplay(Client client) : base(client) { timeText = new ScreenText("12:00", 166, 1026, 0.25f, async() => { var hour = TimeWeatherSync.CurrentHour; var minute = TimeWeatherSync.CurrentMinute < 10 ? $"0{TimeWeatherSync.CurrentMinute}" : TimeWeatherSync.CurrentMinute.ToString(); var timeEnding = hour < 12 ? "AM" : "PM"; timeText.Caption = $"{hour}:{minute} {timeEnding}"; }, System.Drawing.Color.FromArgb(255, 200, 200, 200), Font.ChaletLondon, Alignment.Left); client.RegisterEventHandler("baseevents:enteredVehicle", new Action <int, int, string>((veh, seat, name) => { timeText.Position = new PointF(306 * 0.6666666667f, 1019 * 0.6666666667f); })); client.RegisterEventHandler("baseevents:leftVehicle", new Action <int, int, string>((veh, seat, name) => { timeText.Position = new PointF(166 * 0.6666666667f, 1026 * 0.6666666667f); })); client.RegisterTickHandler(DrawTimeTick); }
private void OnTriggerEnter(Collider c) { if (isOpening) { return; } //new Pathea.MainPlayerCmpt playerCmpt = c.GetComponentInParent <Pathea.MainPlayerCmpt>(); // Ignore overlaps with anything other than the player if (playerCmpt == null) { return; } if (RandomDungenMgr.Instance.HasKey(keyID)) { ScreenText.Log("Opened {0} door", Key.Name); RandomDungenMgr.Instance.RemoveKey(keyID); Open(); } else { ScreenText.Log("{0} key required", Key.Name); } //origin // var inventory = c.GetComponent<PlayerInventory>(); // // if(inventory == null) // return; // // if(inventory.HasKey(keyID)) // { // ScreenText.Log("Opened {0} door", Key.Name); // // inventory.RemoveKey(keyID); // Open(); // } // else // ScreenText.Log("{0} key required", Key.Name); }
internal LightExplorer(GraphicsDevice gd, StuffKeeper sk) { mGD = gd; mSK = sk; mResX = gd.RendForm.ClientRectangle.Width; mResY = gd.RendForm.ClientRectangle.Height; mGD.eDeviceLost += OnDeviceLost; mEForm.Visible = true; mOForm.Visible = true; mEForm.eOpenGBSP += OnOpenGBSP; mFontMats = new MatLib(gd, sk); mFontMats.CreateMaterial("Text"); mFontMats.SetMaterialEffect("Text", "2D.fx"); mFontMats.SetMaterialTechnique("Text", "Text"); mFonts = sk.GetFontList(); mST = new ScreenText(gd.GD, mFontMats, mFonts[0], 1000); mSUI = new ScreenUI(gd.GD, mFontMats, 100); mTextProj = Matrix.OrthoOffCenterLH(0, mResX, mResY, 0, 0.1f, 5f); Vector4 color = Vector4.UnitY + (Vector4.UnitW * 0.15f); mSUI.AddGump("UI\\CrossHair", "CrossHair", Vector4.One, Vector2.UnitX * ((mResX / 2) - 16) + Vector2.UnitY * ((mResY / 2) - 16), Vector2.One); mST.AddString(mFonts[0], "Face Index: " + mFaceIndex, "FaceIndex", color, Vector2.UnitX * 20f + Vector2.UnitY * 400f, Vector2.One); mST.AddString(mFonts[0], "Face aimed at: " + mFaceAimedAt, "FaceAimedAt", color, Vector2.UnitX * 20f + Vector2.UnitY * 420f, Vector2.One); }
public GameOverScreen(Game game, SpriteBatch spriteBatch, SpriteFont spriteFont, Texture2D image) : base(game, spriteBatch) { _highScoreService = new PlexiIntegrationService(); GetHighScoreFromLeaderBoard(); IshighScore = false; _gameOverText = new BlinkText(spriteFont, 20); _gameOverText.SetPosition(555, 140); _gameOverText.SetSpacing(3); _pressSpaceToContinue = new BlinkText(spriteFont, 320); _pressSpaceToContinue.SetPosition(430, 670); _highScoreTableText = new ScreenText(game); _highScoreTableText.SetPosition(360, 250); _resultText = new ScreenText(game); _resultText.SetPosition(20, 130); _image = image; _imageRectangle = new Rectangle(0, 0, Game.Window.ClientBounds.Width, Game.Window.ClientBounds.Height); }
private void OnTriggerEnter(Collider c) { //origin // var inventory = c.GetComponent<PlayerInventory>(); // // if(inventory == null) // return; // // ScreenText.Log("Picked up {0} key", Key.Name); // inventory.AddKey(keyID); // UnityUtil.Destroy(gameObject); //new Pathea.MainPlayerCmpt playerCmpt = c.GetComponentInParent <Pathea.MainPlayerCmpt>(); // Ignore overlaps with anything other than the player if (playerCmpt == null) { return; } RandomDungenMgr.Instance.PickUpKey(keyID); ScreenText.Log("Picked up {0} key", Key.Name); UnityUtil.Destroy(gameObject); }
public static void Log(object obj) { ScreenText.Log(obj.ToString()); }
public static void AddText(ScreenText text) { screenTexts.Add(text); }
private void plusButton_Click(object sender, RoutedEventArgs e) { part1 = Convert.ToDouble(ScreenText.Text); select = '+'; ScreenText.Clear(); }
private void zeroButton_Click(object sender, RoutedEventArgs e) { part1 = Convert.ToDouble(ScreenText.Text); ScreenText.AppendText("" + zero); }
private void nineButton_Click(object sender, RoutedEventArgs e) { ScreenText.AppendText("" + nine); }
private void eightButton_Click(object sender, RoutedEventArgs e) { ScreenText.AppendText("" + eight); }
/// <summary> /// load all of the game content into the Content object /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. _spriteBatch = new SpriteBatch(GraphicsDevice); // create (instantiate) objects _apple = new Apple(Content); _appleExplosion = new Explosion(Content); _screenText = new ScreenText(Content); // make apple and text visible _apple.Active = true; _screenText.Active = true; }