Esempio n. 1
0
        public static void Init(AssetBundle expandSharedAssets1)
        {
            PowBlockObject = expandSharedAssets1.LoadAsset <GameObject>("Pow Block");

            tk2dSprite m_PowBlockSprite = SpriteSerializer.AddSpriteToObject(PowBlockObject, ExpandPrefabs.EXItemCollection, "PowBlock");

            ExpandUtility.GenerateSpriteAnimator(PowBlockObject, playAutomatically: true);

            tk2dSpriteAnimator m_PowBlockAnimator = PowBlockObject.GetComponent <tk2dSpriteAnimator>();

            ExpandUtility.AddAnimation(m_PowBlockAnimator, m_PowBlockSprite.Collection, PowBlockIdleSprites, "Idle", tk2dSpriteAnimationClip.WrapMode.Loop, 8);
            ExpandUtility.AddAnimation(m_PowBlockAnimator, m_PowBlockSprite.Collection, PowBlockUsedSprites, "POW", tk2dSpriteAnimationClip.WrapMode.Loop, 2);


            PowBlock powBlock  = PowBlockObject.AddComponent <PowBlock>();
            string   shortDesc = "Shaken not stirred...";
            string   longDesc  = "A special block that when stomped on causes a violent shaking.\n\nEnemies shall lose their footing.";

            ItemBuilder.SetupItem(powBlock, shortDesc, longDesc, "ex");
            ItemBuilder.SetCooldownType(powBlock, ItemBuilder.CooldownType.Damage, 380f);
            powBlock.quality = ItemQuality.C;
            if (!ExpandSettings.EnableEXItems)
            {
                powBlock.quality = ItemQuality.EXCLUDED;
            }


            PowBlockPickupID = powBlock.PickupObjectId;
        }
Esempio n. 2
0
        public static void Init(AssetBundle expandSharedAssets1)
        {
            PowBlockObject = expandSharedAssets1.LoadAsset <GameObject>("Pow Block");
            ItemBuilder.AddSpriteToObject(PowBlockObject, expandSharedAssets1.LoadAsset <Texture2D>("PowBlock"), false, false);
            SpriteBuilder.AddSpriteToCollection(expandSharedAssets1.LoadAsset <Texture2D>("PowBlock_Used"), PowBlockObject.GetComponent <tk2dSprite>().Collection);

            PowBlock powBlock  = PowBlockObject.AddComponent <PowBlock>();
            string   shortDesc = "Shaken not stirred...";
            string   longDesc  = "A special block that when stomped on causes a violent shaking.\n\nEnemies shall lose their footing.";

            ItemBuilder.SetupItem(powBlock, shortDesc, longDesc, "ex");
            ItemBuilder.SetCooldownType(powBlock, ItemBuilder.CooldownType.Damage, 380f);
            powBlock.quality = ItemQuality.C;



            PowBlockPickupID = powBlock.PickupObjectId;
        }