ShowCoin() public method

public ShowCoin ( bool bShow ) : void
bShow bool
return void
Exemplo n.º 1
0
    public override void OnHideEffectPlayOver()
    {
        base.OnHideEffectPlayOver();
        UIGameHead gamehead = UIWindowManager.Singleton.GetUIWindow <UIGameHead>();

        gamehead.ShowCoin(false);
    }
Exemplo n.º 2
0
    public override void OnShow()
    {
        base.OnShow();
        UIGameHead gamehead = UIWindowManager.Singleton.GetUIWindow <UIGameHead>();

        gamehead.ShowCoin(true);

        m_msgLabel.text  = Localization.instance.Get("Use_" + GlobalVars.UsingItem.ToString());
        m_costLabel.text = CapsConfig.GetItemPrice(GlobalVars.UsingItem).ToString();
        m_coinDrawer.SetNumberRapid(CapsConfig.GetItemPrice(GlobalVars.UsingItem));

        int startX = (GameLogic.Singleton.BlockXStart + GameLogic.Singleton.BlockXEnd) / 2;
        int startY = (GameLogic.Singleton.BlockYStart + GameLogic.Singleton.BlockYStart) / 2;

        //若冰块关,找个冰块
        if (GlobalVars.CurStageData.Target == GameTarget.ClearJelly)
        {
            for (int i = 0; i <= GameLogic.BlockCountX; ++i)
            {
                int x = (startX + i) % GameLogic.BlockCountX;
                for (int j = 0; j < GameLogic.BlockCountY; ++j)
                {
                    int y = (startY + j) % GameLogic.BlockCountY;
                    if (GameLogic.Singleton.PlayingStageData.CheckFlag(x, y, GridFlag.Jelly) || GameLogic.Singleton.PlayingStageData.CheckFlag(x, y, GridFlag.JellyDouble))
                    {
                        CapBlock pBlock = GameLogic.Singleton.GetBlock(new Position(x, y));
                        if (pBlock != null && pBlock.color < TBlockColor.EColor_Nut1 && pBlock.CurState == BlockState.Normal)
                        {
                            GlobalVars.UsingItemTarget = new Position(x, y);
                            SetTarget(GlobalVars.UsingItemTarget);
                            break;
                        }
                    }
                }
            }
        }
        else
        {
            //不是冰块关,找个可点块
            for (int i = 0; i <= GameLogic.BlockCountX; ++i)
            {
                int x = (startX + i) % GameLogic.BlockCountX;
                for (int j = 0; j < GameLogic.BlockCountY; ++j)
                {
                    int      y      = (startY + j) % GameLogic.BlockCountY;
                    CapBlock pBlock = GameLogic.Singleton.GetBlock(new Position(x, y));
                    if (pBlock != null && pBlock.color < TBlockColor.EColor_Nut1 && pBlock.CurState == BlockState.Normal)
                    {
                        GlobalVars.UsingItemTarget = new Position(x, y);
                        SetTarget(GlobalVars.UsingItemTarget);
                        break;
                    }
                }
            }
        }
    }
Exemplo n.º 3
0
    public override void OnShow()
    {
        base.OnShow();
        //GameLogic.Singleton.PauseGame();

        //获取道具信息
        m_msgLabel.text  = Localization.instance.Get("Use_" + GlobalVars.UsingItem.ToString());
        m_costLabel.text = CapsConfig.GetItemPrice(GlobalVars.UsingItem).ToString();
        m_coinDrawer.SetNumberRapid(CapsConfig.GetItemPrice(GlobalVars.UsingItem));
        m_itemIcon.spriteName = GlobalVars.UsingItem.ToString();

        UIGameHead gamehead = UIWindowManager.Singleton.GetUIWindow <UIGameHead>();

        gamehead.ShowCoin(true);
    }