Beispiel #1
0
        public override void Use()
        {
            if (active == false)
            {
                return;
            }

            for (int i = 0; i < Mathf.Pow(Constants.size, 2); i++)
            {
                Block blockScript = Main.blockList[i].GetComponent <Block>();
                if (Main.blockTarget.TargetColor == blockScript.Color)
                {
                    Main.blockTarget.Score = Main.blockTarget.Score + 500;
                    blockScript.Destroy("PopSoo", 0.5f);
                }
            }

            SoundManager.Instance.PlayEffect(SoundManager.Instance.effect_doMeow0);
            Animator.SetTrigger("SooSmile");
            ItemAnim.SetBool("ItemActive", false);
            Main.resetCheck = false;
            Main.blockGenerator.DelayGenerate(0.51f, false, true);
            Main.timer.ModifyTime(10);
            Main.itemSuCount++;
            active = false;
        }
Beispiel #2
0
        public override void Use()
        {
            if (active == false)
            {
                return;
            }

            for (int i = 0; i < Mathf.Pow(Constants.size, 2); i++)
            {
                Block blockScript = Main.blockList[i].GetComponent <Block>();

                if (blockScript.Coord.GetIndex() == (Mathf.Pow(Constants.size, 2) - 1) / 2)
                {
                    blockScript.Destroy("PopDo", 0.5f);
                }
                else
                {
                    blockScript.Destroy("Disable", 0.5f);
                }
            }
            SoundManager.Instance.PlayEffect(SoundManager.Instance.effect_doMeow0);
            Animator.SetTrigger("DoSmile");
            ItemAnim.SetBool("ItemActive", false);
            Main.resetCheck = false;
            Main.blockGenerator.DelayGenerate(0.51f, false, true);
            Main.timer.ModifyTime(10);
            Main.itemDoCount++;
            active = false;
        }