コード例 #1
0
        public static void Init()
        {
            string        name          = "Baby Good Det";
            string        resourcePath  = "NevernamedsItems/Resources/Companions/BabyGoodDet/babygooddet_icon";
            GameObject    gameObject    = new GameObject();
            CompanionItem companionItem = gameObject.AddComponent <CompanionItem>();

            ItemBuilder.AddSpriteToObject(name, resourcePath, gameObject);
            string shortDesc = "Laserbrained";
            string longDesc  = "A scale model Det, constructed as part of some asinine Gundead school project." + "\n\nFires powerful lasers, but can have a hard time hitting her target.";

            companionItem.SetupItem(shortDesc, longDesc, "nn");
            companionItem.quality       = PickupObject.ItemQuality.C;
            companionItem.CompanionGuid = BabyGoodDet.guid;
            BabyGoodDet.BuildPrefab();

            companionItem.SetupUnlockOnCustomFlag(CustomDungeonFlags.PURCHASED_BABYGOODDET, true);
            companionItem.AddItemToDougMetaShop(50);
        }
コード例 #2
0
        public static void Init()
        {
            string        name          = "Scroll of Exact Knowledge";
            string        resourcePath  = "NevernamedsItems/Resources/Companions/ScrollOfExactKnowledge/scrollofexactknowledge_icon";
            GameObject    gameObject    = new GameObject();
            CompanionItem companionItem = gameObject.AddComponent <ScrollOfExactKnowledge>();

            ItemBuilder.AddSpriteToObject(name, resourcePath, gameObject);
            string shortDesc = "Nerd";
            string longDesc  = "Offers useful information on the Gungeon around you." + "\n\nSeems to have a fear of being alone, and enjoys company.";

            companionItem.SetupItem(shortDesc, longDesc, "nn");
            companionItem.quality       = PickupObject.ItemQuality.C;
            companionItem.CompanionGuid = ScrollOfExactKnowledge.guid;
            ScrollOfExactKnowledge.BuildPrefab();
            ScrollOfExactKnowledgeID = companionItem.PickupObjectId;
            companionItem.SetupUnlockOnCustomFlag(CustomDungeonFlags.ALLJAMMED_BEATEN_OFFICE, true);

            ChestToolbox.OnChestPostSpawn += ScrollOfExactKnowledge.OnChestSpawned;
        }