Пример #1
0
        /// <summary>
        ///     Fired when the game loads.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        private static void GameOnOnGameLoad(EventArgs args)
        {
            pan = new CupcakePan();
            LoadJson();

            Game.PrintChat("<font color=\"#E536F5\"><b>CupcakeTrainer:</b></font> loaded!");

            Obj_AI_Base.OnProcessSpellCast += ObjAiBaseOnOnProcessSpellCast;
            AttackableUnit.OnDamage += Obj_AI_Base_OnDamage;
        }
Пример #2
0
        private static void LoadJson()
        {
            var path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "CupcakeData.json");

            if (File.Exists(path))
            {
                pan = JsonConvert.DeserializeObject<CupcakePan>(File.ReadAllText(path));
            }
        }