public override void LoadContent() { base.LoadContent(); GridEntryWidth = 31; GridEntryHeight = 15; width = (int)((bounds.Width - 4f) / GridEntryWidth); height = (int)((bounds.Height - 24f) / GridEntryHeight); Grid = new SSHCrackGridEntry[width, height]; var num = 0; var num2 = 0f; var num3 = DURATION - GRID_REVEAL_DELAY - ENDING_FLASH; for (var i = 0; i < height; i++) { for (var j = 0; j < width; j++) { var num4 = Math.Max(Math.Abs(j - i / 2), Math.Abs(j + i / 2)); var num5 = i / 2 + num4; var num6 = num3 - num2; if (num % 2 == 0) { num6 = Utils.randm(num3); num2 = num6; } Grid[j, i] = new SSHCrackGridEntry { TimeSinceActivated = 0f, CurrentValue = Utils.getRandomByte(), TimeTillActive = num5 * SHEEN_FLASH_DELAY, TimeTillSolved = num6 }; num++; } } unlockedFlashColor = Color.Lerp(os.unlockedColor, os.brightUnlockedColor, 0.4f); var computer = Programs.getComputer(os, targetIP); computer.hostileActionTaken(); os.write("SecureShellCrack Running..."); }
public override void LoadContent() { base.LoadContent(); GridEntryWidth = 31; GridEntryHeight = 15; width = (int) ((bounds.Width - 4f)/GridEntryWidth); height = (int) ((bounds.Height - 24f)/GridEntryHeight); Grid = new SSHCrackGridEntry[width, height]; var num = 0; var num2 = 0f; var num3 = DURATION - GRID_REVEAL_DELAY - ENDING_FLASH; for (var i = 0; i < height; i++) { for (var j = 0; j < width; j++) { var num4 = Math.Max(Math.Abs(j - i/2), Math.Abs(j + i/2)); var num5 = i/2 + num4; var num6 = num3 - num2; if (num%2 == 0) { num6 = Utils.randm(num3); num2 = num6; } Grid[j, i] = new SSHCrackGridEntry { TimeSinceActivated = 0f, CurrentValue = Utils.getRandomByte(), TimeTillActive = num5*SHEEN_FLASH_DELAY, TimeTillSolved = num6 }; num++; } } unlockedFlashColor = Color.Lerp(os.unlockedColor, os.brightUnlockedColor, 0.4f); var computer = Programs.getComputer(os, targetIP); computer.hostileActionTaken(); os.write("SecureShellCrack Running..."); }