public void ConfigureDestinations() { T1.ConfigureDestination(T2, null); T2.ConfigureDestination(T3, T1); T3.ConfigureDestination(PP, T2); PP.ConfigureDestination(PD, T3); PD.ConfigureDestination(null, T3); }
private InputCore GetInputHandler() { inputDelay = 0.0f; InputCore c = gameObject.AddComponent <InputCore>(); c.SetController(PD.controller, PD.GetKeyBindings()); return(c); }
public static PD Get() { var inst = new PD( new MySqlConnection(ConnectionString) ); return inst; }
private bool HandlePause(bool mouseClick = false) { if (isTransitioning) { return(paused); } if (!paused) { if (cursor1.pause() || mouseClick) { hud.pausePresser = 1; paused = true; PD.sounds.SetSoundAndPlay(SoundPaths.S_Menu_Pause); } else if (cursor2.pause()) { hud.pausePresser = 2; paused = true; PD.sounds.SetSoundAndPlay(SoundPaths.S_Menu_Pause); } } else { if (hud.pauseMenu == null) { return(paused); } switch (hud.pauseMenu.state) { case 1: PD.sounds.SetSoundAndPlay(SoundPaths.S_Menu_Confirm); isTransitioning = true; PD.SaveAndQuit(hud.GetTimeInSeconds()); break; case 2: PD.sounds.SetSoundAndPlay(SoundPaths.S_Menu_Confirm); isTransitioning = true; if (PD.gameType == PersistData.GT.Challenge) { PD.LowerPuzzleLevel(); PD.SaveAndPuzzleSelect(hud.GetTimeInSeconds()); } else { PD.SaveAndMainMenu(hud.GetTimeInSeconds()); } break; case 3: if (PD.gameType == PersistData.GT.Challenge) { PD.sounds.SetSoundAndPlay(SoundPaths.S_Menu_Confirm); isTransitioning = true; PD.SaveAndReset(hud.GetTimeInSeconds()); } else { PD.sounds.SetSoundAndPlay(SoundPaths.S_Menu_Unpause); paused = false; } break; case 4: paused = false; PD.sounds.SetSoundAndPlay(SoundPaths.S_Menu_Unpause); break; } } return(paused); }
private void SpeakCharacterName(int idx, int playerSelecting) { int narratorIndex = 24 + idx; PD.sounds.SetVoiceAndPlay(SoundPaths.NarratorPath + narratorIndex.ToString("d3"), 0); int val = Random.Range(1, 4); PD.sounds.QueueVoice(SoundPaths.VoicePath + PD.GetPlayerSpritePathFromInt(idx) + "/" + val.ToString("d3")); }
virtual protected void InitGraphics() { sheet = Resources.LoadAll <Sprite>(PD.UseHighContrastCursor()?SpritePaths.HiContastTileCursor:SpritePaths.TileCursor); cursor = GetGameObject(Vector3.zero, "", sheet[0], false, "HUDText"); if (!isShown) { cursor.SetActive(false); } }
public void Start() { StateControllerInit(false); usingTouchControls = PD.GetSaveData().savedOptions["touchcontrols"] == 1; firstLaunch = true; player1Human = !PD.isDemo; player2Human = (PD.gameType == PersistData.GT.Versus); bh = new BlockHandler(PD, PD.GetPuzzleLevel()); zaps = new List <ZappyGun>(); zapsToDelete = new List <ZappyGun>(); SetupCountdown(); SetupActors(); SetupRoundDisplay(); SetupEasterEgg(); specialMode = PD.useSpecial; height = PD.isTutorial?6:PD.rowCount; width = 8; float p1Xoffset = (player2Human || (PD.isDemo && PD.demoPlayers == 2)) ? -10.1f : (PD.IsLeftAlignedHUD()?-1.5f:-5.5f), p2Xoffset = 3.0f; CreateBoards(p1Xoffset, p2Xoffset); SetUpHUDAndScores(); if (PD.gameType == PersistData.GT.Challenge) { (board1 as BoardWarPuzzlePlayer).unlockedRow = (hud as PuzzleHUD).GetUnlockedRow(); } cursor1 = CreatePlayerCursor(player1Human, p1Xoffset, 1, board1, board2); cursor2 = CreatePlayerCursor(player2Human || PD.override2P, p2Xoffset, 2, board2, board1, PD.override2P); board1.Setup(cursor1, th, bh, (player2Human || (PD.isDemo && PD.demoPlayers == 2)) ? new Vector2(-0.2f, -0.6f) : new Vector2(PD.IsLeftAlignedHUD()?-0.725f:0.75f, -0.6f), player2Human || (PD.isDemo && PD.demoPlayers == 2), true, player1Human && usingTouchControls); board2.Setup(cursor2, th, bh, new Vector2(0.2f, -0.6f), true, player2Human || (PD.isDemo && PD.demoPlayers == 2)); board1.RefreshGraphics(); board2.RefreshGraphics(); CreateMirrors(p1Xoffset, p2Xoffset); mirror1.RefreshGraphics(); mirror2.RefreshGraphics(); SetupMouseControls(p1Xoffset); if (!PD.isDemo) { if (PD.gameType == PersistData.GT.Campaign) { campaign = new CampaignHandler(PD, board1 as BoardWarSpecial, board2 as BoardWarCampaign, mirror2 as BoardMirrorSpecial, cursor1 as BoardCursorWar, cursor2 as BoardCursorBot, hud as CampaignHUD, GetXMLHead()); } pauseButtonSheet = Resources.LoadAll <Sprite>(SpritePaths.ShortButtons); pauseButton = GetGameObject(player2Human ? (new Vector3(0.0f, -0.1f)):(new Vector3(2.5f, 0.7f)), "Pause Button", pauseButtonSheet[0], true, "HUD"); pauseButton.SetActive(PD.usingMouse); pauseButton.transform.localScale = new Vector3(0.75f, 0.75f); FontData f = PD.mostCommonFont.Clone(); f.scale = 0.035f; pauseText = GetMeshText(player2Human ? (new Vector3(0.0f, 0.0f)):(new Vector3(2.5f, 0.8f)), GetXmlValue(GetXMLHead(), "pause"), f).gameObject; pauseText.SetActive(PD.usingMouse); pauseTimer = 0; mouseObjects.Add(pauseButton); mouseObjects.Add(pauseText); } else { demoCountdown = 1800; } }
private void UpdateOnline() { timeToWait -= Time.deltaTime; if (wantToEnd && (readyToEnd || timeToWait <= 0f)) { EndOnlineGame(); } List <string> ms = GetMessages(); if (ms.Count > 0) { foreach (string m in ms) { lastTimeMessageReceived = Time.time; if (m == "bye") { wantToEnd = true; } else if (m == "another") { p2Ok.GetComponent <SpriteRenderer>().sprite = roundsSheet[1]; theyreReady = true; } } } if ((Time.time - lastTimeMessageReceived) > 15f) { SendMessage("bye"); wantToEnd = true; } if (onlineState == 0) // awaiting player input { if (PD.controller.M_Cancel()) { SendMessage("bye"); wantToEnd = true; } else if (PD.controller.G_Launch() || PD.controller.Pause()) { SendMessage("another"); onlineState = 1; p1Ok.GetComponent <SpriteRenderer>().sprite = roundsSheet[1]; begin.SetActive(false); beginText.SetActive(false); cancel.SetActive(false); cancelText.SetActive(false); } } else if (onlineState == 1) // awaiting opponent input { if (theyreReady) { PD.MoveToOnlineBattle(); } } }
public string GetPuzzleData(int l, int type) { SaveData saveInfo = PD.GetSaveData(); if (!saveInfo.puzzleScores.ContainsKey(l)) { return(""); } return("\n\n{0}: " + saveInfo.puzzleScores[l] + ((type == 0)?"":("\n{1}: " + saveInfo.puzzleTimes[l]))); }
private void AddDamageReferenceKey(int numPlayers) { Vector2 pos = (numPlayers == 2)?new Vector2(0.0f, 0.35f):new Vector2(PD.IsLeftAlignedHUD()?-0.9f:0.9f, 0.7f); GameObject helper = GetGameObject(pos, "Damage Reference", Resources.Load <Sprite>(SpritePaths.GuideCircle + (PD.IsColorBlind()?SpritePaths.ColorblindSuffix:"")), false, "Reference"); if (numPlayers == 2) { helper.transform.localScale = new Vector2(0.75f, 0.75f); } }
private PD GetFlags() { PD flags = PD.ALLPAGES; // Only set this flag when using PRINTDLG and PrintDlg, // and not when using PrintDlgEx and PRINTDLGEX. if (!UseEXDialog) { flags |= PD.ENABLEPRINTHOOK; } if (!allowCurrentPage) { flags |= PD.NOCURRENTPAGE; } if (!allowPages) { flags |= PD.NOPAGENUMS; } if (!allowPrintToFile) { flags |= PD.DISABLEPRINTTOFILE; } if (!allowSelection) { flags |= PD.NOSELECTION; } flags |= (PD)PrinterSettings.PrintRange; if (printToFile) { flags |= PD.PRINTTOFILE; } if (showHelp) { flags |= PD.SHOWHELP; } if (!showNetwork) { flags |= PD.NONETWORKBUTTON; } if (PrinterSettings.Collate) { flags |= PD.COLLATE; } return(flags); }
public List <int> GetCompletedPuzzles() { SaveData saveInfo = PD.GetSaveData(); List <int> keys = new List <int>(); foreach (int k in saveInfo.puzzleScores.Keys) { keys.Add(k); } return(keys); }
private void SaveAndApplyChanges_Accessibility() { PD.SetOption("colorblind", accessibilityScreen.val_colorblind); PD.SetOption("hudplacement", accessibilityScreen.val_hudplacement); PD.SetOption("emphasizecursor", accessibilityScreen.val_emphasizecursor); PD.SetOption("touchcontrols", accessibilityScreen.val_touchcontrols); PD.SetOption("easymode", accessibilityScreen.val_easymode); PD.SetOption("keydelay", accessibilityScreen.val_keydelay); PD.SetOption("scopophobia", accessibilityScreen.val_scopo); PD.KEY_DELAY = accessibilityScreen.val_keydelay; StartCoroutine(PD.SameScreenSave()); }
private void SetupAFuckingBalloon() { if (PD.GetSaveData().savedOptions["beatafuckingballoon"] != 1) { return; } Sprite psprite = Resources.LoadAll <Sprite>(SpritePaths.CharFullShots)[32]; GameObject pleaseDadCanIHgaaveOne = GetGameObject(new Vector3(-1.8f, 1.2f), "Puhloonverlay", psprite, false, "HUDText"); pleaseDadCanIHgaaveOne.GetComponent <SpriteRenderer>().color = new Color(1.0f, 1.0f, 1.0f, 0.5f); pleaseDadCanIHgaaveOne.renderer.transform.localScale = new Vector2(0.5f, 0.45f); }
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { PD ds = new PD(); global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny(); any.Namespace = ds.Namespace; sequence.Items.Add(any); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); if (xs.Contains(dsSchema.TargetNamespace)) { global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); try { global::System.Xml.Schema.XmlSchema schema = null; dsSchema.Write(s1); for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();) { schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); s2.SetLength(0); schema.Write(s2); if ((s1.Length == s2.Length)) { s1.Position = 0; s2.Position = 0; for (; ((s1.Position != s1.Length) && (s1.ReadByte() == s2.ReadByte()));) { ; } if ((s1.Position == s1.Length)) { return(type); } } } } finally { if ((s1 != null)) { s1.Close(); } if ((s2 != null)) { s2.Close(); } } } xs.Add(dsSchema); return(type); }
private void UpdateOuter() { cursor2Display.SetVisibility(false); cursor2Display.ResetToStartPos(); cursor.SetVisibility(true); cursor3.SetVisibility(false); cursor.DoUpdate(); int oldIdx = selectedIdx; int cy = cursor.getY(); selectedIdx = cy; if (selectedIdx != oldIdx) { sidepanels[oldIdx][1].SetActive(false); } sidepanels[selectedIdx][1].SetActive(true); sidepanels[selectedIdx][1].GetComponent <SpriteRenderer>().color = new Color(1.0f, 1.0f, 1.0f, GetButtonOpacity()); if (cursor.launchOrPause()) { menuPosition = cy; if (cy == 3) { cursor2.setY(8); cursor2Display.SetWidth(GetXmlFloat(top, "optionscalewidth")); SignalSuccess(); } else if (cy == 2) { cursor2Display.SetWidth(GetXmlFloat(top, "optionscalewidth")); SignalSuccess(); } else if (cy == 1) { cursor2.setY(8); cursor2Display.SetWidth(GetXmlFloat(top, "accessibilityscalewidth")); SignalSuccess(); } else if (cy == 0) { SignalSuccess(); PD.GoToMainMenu(); } } else { UpdateCursorPosition(cy); if (cursor.back()) { SignalSuccess(); PD.GoToMainMenu(); } } }
public void ChangeKey(int y, int newVal, bool player1) { if (player1) { InputVal newInput = new InputVal_Key((KeyCode)newVal); InputMethod.KeyBinding oldK = PD.controller.GetKeyInUse(newInput); if (oldK == keyOrdering[y] || oldK == InputMethod.KeyBinding.hidden3) { PD.controller.ChangeKey(keyOrdering[y], newInput); PD.SetKeyBinding(0, (int)keyOrdering[y], newInput.GetRawVal()); } else { InputVal oldInput = PD.controller.GetInputVal(keyOrdering[y]); PD.controller.ChangeKey(keyOrdering[y], newInput); PD.SetKeyBinding(0, (int)keyOrdering[y], newInput.GetRawVal()); PD.controller.ChangeKey(oldK, oldInput); PD.SetKeyBinding(0, (int)oldK, oldInput.GetRawVal()); int idx = System.Array.IndexOf(keyOrdering, oldK); if (idx >= 0) { UndoQuestion(idx, true); } } } else { InputVal newInput = new InputVal_Key((KeyCode)newVal); InputMethod.KeyBinding oldK = fakePlayer2.GetKeyInUse(newInput); if (oldK == keyOrdering[y] || oldK == InputMethod.KeyBinding.hidden3) { fakePlayer2.ChangeKey(keyOrdering[y], newInput); PD.SetKeyBinding(1, (int)keyOrdering[y], newInput.GetRawVal()); } else { InputVal oldInput = fakePlayer2.GetInputVal(keyOrdering[y]); fakePlayer2.ChangeKey(keyOrdering[y], newInput); PD.SetKeyBinding(1, (int)keyOrdering[y], newInput.GetRawVal()); fakePlayer2.ChangeKey(oldK, oldInput); PD.SetKeyBinding(1, (int)oldK, oldInput.GetRawVal()); int idx = System.Array.IndexOf(keyOrdering, oldK); if (idx >= 0) { UndoQuestion(idx, false); } } } UndoQuestion(y, player1); }
override protected void AdditionalSetup(Sprite tile, int players, Vector3 offset, System.Xml.XmlNode top, int additionalInfo) { money = 0; hudBox.GetComponent <SpriteRenderer>().sprite = Resources.Load <Sprite> (SpritePaths.InfoBoxCampaign); float x = PD.IsLeftAlignedHUD() ? -1.2f : 0.6f; GetMeshText(new Vector3(x, 1.03f), GetXmlValue(top, "money"), new FontData(TextAnchor.MiddleLeft, TextAlignment.Left, 0.03f)); moneyText = GetMeshText(new Vector3(x + 0.6f, 0.84f), money.ToString(), new FontData(TextAnchor.MiddleRight, TextAlignment.Right, 0.045f)); shopText = GetMeshText(new Vector3(x + 0.3f, 0.5f), "", new FontData(TextAnchor.MiddleCenter, TextAlignment.Center, 0.023f)); AddDamageReferenceKey(); repairText = GetGameObject(new Vector3(2.4f, -0.65f), "repairs text", Resources.Load <Sprite>(SpritePaths.RepairText), false, "HUDText"); repairText.SetActive(false); }
public bool IsValid() { int pd; Int32.TryParse(PD.ToString("ddHHmmss"), out pd); var a = (pd | PCL); var b = PT | PCT; var c = a | b; return(PCC == c.ToLitString(6));// ToL6S(c); //return PCC == c; //return PCC == ((pd | PCL) | ((int)PT | PCL)); }
private int GetFirstIncompletePuzzle() { SaveData saveInfo = PD.GetSaveData(); for (int i = 1; i < PuzzleSelectController.totalPuzzleCount; i++) { if (!saveInfo.puzzleScores.ContainsKey(i)) { return(i); } } return(0); }
public override void Setup(BoardCursorActualCore c, TweenHandler t, BlockHandler b, Vector2 nexterPos, bool smallNext, bool show = true, bool touch = false) { deathTile = 7; // might be useless base.Setup(c, t, b, nexterPos, smallNext, show, touch); topoffset = 2; cursor.setWidthAndHeight(width, ++height); for (int x = 0; x < width; x++) { tiles.Add(CreateTile(x, height - 1, 4)); } shields = new List<Shield>(); shieldSheet = Resources.LoadAll<Sprite>(SpritePaths.Shield); eyeSheet = Resources.LoadAll<Sprite>(PD.IsScopophobic()?SpritePaths.EyeSheetScopo:SpritePaths.EyeSheet); gold = 0; eyeballTimer = 0; justGotAShield = false; frozen = false; }
private void SaveAndApplyChanges_Options() { Vector2 resolution = resolutions[resIdx]; PD.SetOption("width", Mathf.FloorToInt(resolution.x)); PD.SetOption("height", Mathf.FloorToInt(resolution.y)); PD.SetOption("fullscreen", isFullScreen?1:0); PD.SetOption("vol_m", volume_music); PD.SetOption("vol_s", volume_sound); PD.SetOption("vol_v", volume_voice); PD.SetRes(); StartCoroutine(PD.SameScreenSave()); }
protected OptionsCursor GetOptionsCursor(int w, int h, string sprite, float px, float py, float dx, float dy, int initX, int initY, int p = 1, int frame = -1, float dtweenchange = -1) { GameObject g = Instantiate(gameObject, Vector3.zero, Quaternion.identity) as GameObject; OptionsCursor c = g.AddComponent <OptionsCursor>(); Destroy(g); c.SetPD(PD); c.player = p; c.SetController(p == 1?PD.controller:PD.controller2, PD.GetKeyBindings(p - 1)); c.setWidthAndHeight(w, h); c.Setup(th); c.SetupMenu(sprite, px, py, dx, dy, initX, initY, frame, dtweenchange); return(c); }
private void AddRowLocks() { Sprite rowLockSprite = Resources.Load <Sprite>(SpritePaths.LockedRow); int actualUnlockedRow = PD.rowCount - initRemainingMoves; for (int y = 0; y < PD.rowCount; y++) { if (actualUnlockedRow == y) { continue; } GetGameObject(new Vector3((PD.IsLeftAlignedHUD()?0.45f:-0.45f), -1.84f + y * Consts.TILE_SIZE), "lock" + y, rowLockSprite, false, "Zapper"); } }
public void Setup(bool won) { GetPersistData(); didP1Win = won; playeractor = CreateActor(PD.GetPlayerSpritePath(PD.p1Char), new Vector3(-2.1f, 0.2f), false, true, true); playeractor.SetScale(0.4f); opponentactor = CreateActor(PD.GetPlayerSpritePath(PD.p2Char), new Vector3(2.1f, 0.2f), true, true, true); opponentactor.SetScale(0.4f); tbox = (DialogContainer)gameObject.AddComponent("DialogContainer"); tbox.Setup(new Vector3(0.0f, -1.4f), true); isFirstLoad = true; PD.sounds.SetSoundVolume(PD.GetSaveData().savedOptions["vol_s"] / 350.0f); setText(); }
public void Setup() { top = GetXMLHead(); buttonsSheet = Resources.LoadAll <Sprite>(SpritePaths.InputIcons); cancelSheet = Resources.LoadAll <Sprite>(SpritePaths.CancelButtons); renderLayer = "HUDText"; headerText.text = GetXmlValue(top, "controls"); float x = -0.25f; f = PD.mostCommonFont.Clone(); f.align = TextAlignment.Right; f.anchor = TextAnchor.MiddleRight; texts.Add(GetMeshText(new Vector2(x, 0.6f), "Up:", f)); texts.Add(GetMeshText(new Vector2(x, 0.4f), "Down:", f)); texts.Add(GetMeshText(new Vector2(x, 0.2f), "Left:", f)); texts.Add(GetMeshText(new Vector2(x, 0.0f), "Right:", f)); texts.Add(GetMeshText(new Vector2(x, -0.2f), "Launch/Confirm:", f)); texts.Add(GetMeshText(new Vector2(x, -0.4f), "Shift Left:", f)); texts.Add(GetMeshText(new Vector2(x, -0.6f), "Shift Right:", f)); texts.Add(GetMeshText(new Vector2(x, -0.8f), "Shift All Left:", f)); texts.Add(GetMeshText(new Vector2(x, -1.0f), "Shift All Right:", f)); texts.Add(GetMeshText(new Vector2(x, -1.2f), "Pause:", f)); texts.Add(GetMeshText(new Vector2(x, -1.4f), "Cancel:", f)); f.align = TextAlignment.Left; f.anchor = TextAnchor.MiddleLeft; keyOrdering = new InputMethod.KeyBinding[] { InputMethod.KeyBinding.back, InputMethod.KeyBinding.pause, InputMethod.KeyBinding.shiftAR, InputMethod.KeyBinding.shiftAL, InputMethod.KeyBinding.shiftR, InputMethod.KeyBinding.shiftL, InputMethod.KeyBinding.launch, InputMethod.KeyBinding.right, InputMethod.KeyBinding.left, InputMethod.KeyBinding.down, InputMethod.KeyBinding.up }; p1x = x + 0.75f; p1 = new List <GameObject>(); texts.Add(GetMeshText(new Vector2(p1x, 1.0f), "P1", f)); texts.Add(GetMeshText(new Vector2(p1x, 0.8f), "ALL", f)); for (int y = 0; y < keyOrdering.Length; y++) { p1.Add(GetKeyBindingDisplay(PD.controller, new Vector2(p1x, -1.4f + y * 0.2f), keyOrdering[y])); } p2x = p1x + 1.75f; p2 = new List <GameObject>(); texts.Add(GetMeshText(new Vector2(p2x, 1.0f), "P2", f)); texts.Add(GetMeshText(new Vector2(p2x, 0.8f), "ALL", f)); fakePlayer2 = new Input_Computer(); fakePlayer2.Initialize(PD.GetKeyBindings(1)); for (int y = 0; y < keyOrdering.Length; y++) { p2.Add(GetKeyBindingDisplay(fakePlayer2, new Vector2(p2x, -1.4f + y * 0.2f), keyOrdering[y])); } topCollider = GetCollider("top", new Vector3(1.45f, -0.2f), 1.2f, 13.5f); }
public void PersondataCleanup() { const string PD = @"{{Persondata | NAME = Hill, James J. | ALTERNATIVE NAMES = | SHORT DESCRIPTION = Politician | DATE OF BIRTH = September 16, 1838 | PLACE OF BIRTH = Calgary, [[Canada]] | DATE OF DEATH = May 29, 1916 | PLACE OF DEATH = [[Minnesota]] }}"; Assert.AreEqual(PD, Parsers.PersonData(PD.Replace("1838", "<small>1838</small>"), "Test"), "Small tag removal"); string PD1 = @"{{Persondata | NAME = Hill, James J. | ALTERNATIVE NAMES = | SHORT DESCRIPTION = Politician | DATE OF BIRTH = September 16, 1838 | PLACE OF BIRTH = Calgary, <small>[[Canada]]</small> | DATE OF DEATH = May 29, 1916 | PLACE OF DEATH = [[Minnesota]] }}"; Assert.AreEqual(PD, Parsers.PersonData(PD1, "Test"), "Balanced small tag removal"); string PD2 = @"{{Persondata | NAME = Hill, James J. | ALTERNATIVE NAMES = | SHORT DESCRIPTION = Politician | DATE OF BIRTH = September 16, 1838 | PLACE OF BIRTH = Calgary, [[Canada]]</small> | DATE OF DEATH = May 29, 1916 | PLACE OF DEATH = [[Minnesota]] }}"; Assert.AreEqual(PD, Parsers.PersonData(PD2, "Test"), "Unbalanced small tag removal"); string PD3 = @"{{Persondata | NAME = Hill, James J. | ALTERNATIVE NAMES = | SHORT DESCRIPTION = <small>Politician</small> | DATE OF BIRTH = September 16, 1838 | PLACE OF BIRTH = Calgary, [[Canada]]</small> | DATE OF DEATH = May 29, 1916 | PLACE OF DEATH = [[Minnesota]] }}"; Assert.AreEqual(PD, Parsers.PersonData(PD3, "Test"), "Small tag removal"); }
public void Update() { if (startedTransition) { return; } if (end.transform.position.y < 0.0f) { int gm = objects.Count; for (int i = 0; i < gm; i++) { GameObject g = objects[i]; if (g == null) { continue; } Vector3 p = g.transform.position; p.y += Time.deltaTime * 0.475f; if (g.transform.position.y < -6.0f && p.y >= -6.0f) { g.SetActive(true); } else if (g.transform.position.y < 3.0f && p.y >= 3.0f) { Destroy(g); objects[i] = null; } g.transform.position = p; } } else { if (finalTimeout-- < 0 && !PD.sounds.IsMusicPlaying()) { startedTransition = true; PD.DoWin(0, 0, true, false); } if (lastun != null && lastun.transform.position.y < 3.0f) { Vector3 p = lastun.transform.position; p.y += Time.deltaTime * 0.475f; lastun.transform.position = p; } } UpdateMouseInput(); if (clicker.isDown() || PD.controller.Pause() || PD.controller.G_Launch() || PD.controller.M_Confirm()) { startedTransition = true; PD.DoWin(0, 0, true, false); } }
public void Start() { StateControllerInit(false); if (PD.p1Char == PersistData.C.FuckingBalloon) { if (PD.gameType == PersistData.GT.Arcade) { PD.SetAchievement("BALLOONMAN"); } PD.MoveFromWinScreen(); return; } if (PD.gameType == PersistData.GT.Challenge) { SetUpUnlock(true); return; } Sprite winText = Resources.LoadAll <Sprite>(SpritePaths.WinnerTexts)[PD.winType - 1]; if (PD.winType == 2) { PD.sounds.SetVoiceAndPlay(SoundPaths.NarratorPath + "042", 0); } else { PD.sounds.SetVoiceAndPlay(SoundPaths.NarratorPath + "043", 0); } Sprite[] sheet = Resources.LoadAll <Sprite>(SpritePaths.CharFullShots); Sprite charSpr; if (PD.p1Char == PersistData.C.FuckingBalloon) { charSpr = sheet[32]; } else if (PD.p1Char == PersistData.C.September) { charSpr = sheet[31]; } else if (PD.p1Char == PersistData.C.White) { charSpr = sheet[30]; } else { charSpr = sheet[(int)PD.p1Char * 3 + PD.winType]; } pose = GetGameObject(new Vector3(0.0f, -0.2f), "win", charSpr, false, "HUDText"); winTextGO = GetGameObject(new Vector3(0.0f, 1.0f), "win2", winText, false, "HUDText"); }
private void WipeSelected_Options() { if (confirmWipe) { SignalFailure(); PD.WipeData(); optionsScreen.SetClrText("done"); } else { SignalMovement(); confirmWipe = true; optionsScreen.SetClrText("really"); } }
protected override bool HandleGameOver() { if (!gameOver) { return(false); } timeUntilProgression -= Time.deltaTime; if (timeUntilProgression <= 0 && !calledDoWin) { calledDoWin = true; Debug.Log(PD.currentRound + "/" + PD.rounds); PD.DoWin(board1.GetScore(), hud.GetTimeInSeconds(), board1.IsDead()); } return(true); }