コード例 #1
0
        /// <summary>
        /// Initiates the Hacker Battle training simulation.
        /// </summary>
        public static void StartBattleTutorial()
        {
            var e = new EnemyHacker("Tutorial", "Tutorial hacker", "Tutorial hacker", 0, 0, "easy");
            var y = new Hacking_YourHealth(e);

            y.IsTutorial = true;
            API.CreateForm(y, "You", Properties.Resources.iconTerminal);
        }
コード例 #2
0
 /// <summary>
 /// Loads characters and other data from the save file.
 /// </summary>
 public static void GetCharacters()
 {
     if (File.Exists(Paths.SystemDir + "_hackers.json"))
     {
         Characters = JsonConvert.DeserializeObject <List <Character> >(API.Encryption.Decrypt(File.ReadAllText(Paths.SystemDir + "_hackers.json")));
     }
     else
     {
         var c = new Character("BinaryFire", "I may not be good, but it's what I like to do. You don't need to pay me.", 25, 10, 0);
         AddCharacter(c);
         File.WriteAllText(Paths.SystemDir + "_hackers.json", API.Encryption.Encrypt(JsonConvert.SerializeObject(Characters)));
     }
     if (File.Exists(Paths.SystemDir + "_hacktools.json"))
     {
         Tools = JsonConvert.DeserializeObject <List <HackTool> >(API.Encryption.Decrypt(File.ReadAllText(Paths.SystemDir + "_hacktools.json")));
     }
     else
     {
         var c = new HackTool("Destabilizer Attack", 10, "Destabilize ShiftOS by causing it to go beyond what it can do, opening many programs at once, and making it do things it was NEVER intended to do.");
         AddTool(c);
         File.WriteAllText(Paths.SystemDir + "_hacktools.json", API.Encryption.Encrypt(JsonConvert.SerializeObject(Tools)));
     }
     if (File.Exists(Paths.SystemDir + "_enemies.json"))
     {
         EnemyHackers = JsonConvert.DeserializeObject <List <EnemyHacker> >(API.Encryption.Decrypt(File.ReadAllText(Paths.SystemDir + "_enemies.json")));
     }
     else
     {
         var c = new EnemyHacker("Tutorial", "Enter the Tutorial Sequence.", "", 0, 0, "Easy");
         EnemyHackers.Add(c);
         File.WriteAllText(Paths.SystemDir + "enemies.json", API.Encryption.Encrypt(JsonConvert.SerializeObject(EnemyHackers)));
     }
     if (File.Exists(Paths.Drivers + "Network.dri"))
     {
         MyNetwork = JsonConvert.DeserializeObject <List <Module> >(API.Encryption.Decrypt(File.ReadAllText(Paths.Drivers + "Network.dri")));
     }
     else
     {
         var c = new Module(SystemType.Core, 1, "localhost");
         c.X = 0;
         c.Y = 0;
         MyNetwork.Add(c);
         File.WriteAllText(Paths.Drivers + "Network.dri", API.Encryption.Encrypt(JsonConvert.SerializeObject(MyNetwork)));
     }
 }
コード例 #3
0
 public Hacking_YourHealth(EnemyHacker enemy)
 {
     EnemyNet = enemy;
     InitializeComponent();
 }
コード例 #4
0
 public Hacking_Enemy(Hacking_YourHealth enemy, EnemyHacker thisHacker)
 {
     ThisHacker = thisHacker;
     Enemy      = enemy;
     InitializeComponent();
 }