Esempio n. 1
0
        public void Setup()
        {
            if (setup)
            {
                return;
            }
            try
            {
                Tools.Init();
                ItemBuilder.Init();

                //Phase 1
                BloodBank.Init();
                BloodShield.Init();
                BossBullets.Init();
                ChestReroller.Init();
                CursedRing.Init();
                HologramItem.Init();
                IcePack.Init();
                LightningGuon.Init();
                MimicWhistle.Init();
                ScrollOfApproxKnowledge.Init();
                SlotMachine.Init();
                SweatingBullets.Init();
                TerrifyingMask.Init();

                //Phase 2
                BabyGoodBlob.Init();
                CloakAndDagger.Init();
                Drone.Init();
                MagicMirror.Init();
                Pikachu.Init();
                RubyLotus.Init();
                StickyBomb.Init();
                Thermometer.Init();
                NinjaMask.Init();

                //Phase 3
                Leveler.Init();
                BigSlime.Init();

                setup = true;
            }
            catch (Exception e)
            {
                Tools.PrintException(e);
            }


            ETGModConsole.Commands.AddUnit("kts", e =>
            {
                ETGModConsole.Log("Custom Items: ");
                foreach (string s in itemList)
                {
                    ETGModConsole.Log("    " + s);
                }
            });

            ETGModConsole.Log($"KTS Item Pack {version} Initialized");
        }
        public void Build(Leveler item, PlayerController player, ref Stat[] stats)
        {
            if (m_extantGUI != null)
            {
                return;
            }
            this.m_item              = item;
            this.m_player            = player;
            this.m_stats             = stats;
            m_extantGUI              = SpriteBuilder.SpriteFromResource($"{spriteDir}/panel").transform;
            m_panel                  = m_extantGUI.gameObject.GetComponent <tk2dSprite>();
            m_panel.transform.parent = m_player.transform;
            m_panel.SortingOrder     = 0;
            m_panel.IsPerpendicular  = false;

            BuildLevels();
            BuildXPAndText();
            shown         = false;
            m_panel.scale = Vector2.zero;
            Invoke("InitializeAppearance", .1f);
        }