Exemple #1
0
        public static void Init(AssetBundle expandSharedAssets1)
        {
            BabySitterObject = expandSharedAssets1.LoadAsset <GameObject>("Baby Sitter");
            SpriteSerializer.AddSpriteToObject(BabySitterObject, ExpandPrefabs.EXItemCollection, "babysitter");

            BabySitter babysitItem = BabySitterObject.AddComponent <BabySitter>();

            string shortDesc = "You've got a friend in me...";
            string longDesc  = "Looks like you're stuck baby sitting him today.\n\nHe'll try his best to be useful.\nTry not to get him killed.";

            ItemBuilder.SetupItem(babysitItem, shortDesc, longDesc, "ex");
            babysitItem.quality = ItemQuality.B;
            if (!ExpandSettings.EnableEXItems)
            {
                babysitItem.quality = ItemQuality.EXCLUDED;
            }
        }
Exemple #2
0
        public static void Init(AssetBundle expandSharedAssets1)
        {
            BabySitterobject = expandSharedAssets1.LoadAsset <GameObject>("Baby Sitter");

            BabySitter babysitItem = BabySitterobject.AddComponent <BabySitter>();

            ItemBuilder.AddSpriteToObject(BabySitterobject, expandSharedAssets1.LoadAsset <Texture2D>("babysitter"), false, false);

            string shortDesc = "You've got a friend in me...";
            string longDesc  = "Looks like you're stuck baby sitting him today.\n\nHe'll try his best to be useful.\nTry not to get him killed.";

            ItemBuilder.SetupItem(babysitItem, shortDesc, longDesc, "ex");
            babysitItem.quality           = ItemQuality.B;
            babysitItem.CompanionGuid     = "1d1e1070617842f09e6f45df3cb223f6";
            babysitItem.DeathStatModifier = new StatModifier()
            {
                amount      = 1.8f,
                statToBoost = PlayerStats.StatType.Damage,
                modifyType  = StatModifier.ModifyMethod.MULTIPLICATIVE,
            };
        }
Exemple #3
0
        public override DebrisObject Drop(PlayerController player)
        {
            DestroyCompanion();
            player.OnNewFloorLoaded = (Action <PlayerController>)Delegate.Remove(player.OnNewFloorLoaded, new Action <PlayerController>(HandleNewFloor));
            DebrisObject drop = base.Drop(player);

            if (drop)
            {
                BabySitter component = drop.gameObject.GetComponent <BabySitter>();
                if (component)
                {
                    component.m_HasDied         = m_HasDied;
                    component.m_PickedUp        = true;
                    component.m_healthRemaining = m_healthRemaining;
                    if (component.m_HasDied)
                    {
                        component.m_pickedUpThisRun = true;
                        component.Break();
                    }
                }
            }
            return(drop);
        }