예제 #1
0
    public override void Execute(object data)
    {
        CoinArgs e    = data as CoinArgs;
        UIDead   dead = GetView <UIDead>();
        //TODO

        /**
         * if(花钱成功)
         * dead.briberytime++
         */
        UIBoard   board = GetView <UIBoard>();
        GameModel gm    = GetModel <GameModel>();

        if (gm.PayCoin(e.Coin))
        {
            if (board.Times < 0.1f)
            {
                board.Times += 20;
            }
            dead.BriberyTime++;
            dead.Hide();
            UIResume resume = GetView <UIResume>();
            resume.StartCount();
        }
    }
예제 #2
0
    public override void Execute(object data)
    {
        GameModel gm = GetModel <GameModel>();

        gm.m_isPlay = false;

        UIDead dead = GetView <UIDead>();

        dead.Show();
    }
예제 #3
0
    public override void Execute(object data)
    {
        GameModel gm = GetModel <GameModel>();

        gm.IsPlay = false;

        //TOTO:显示游戏结束UI
        UIDead ui = GetView <UIDead>();

        ui.Show();
    }
예제 #4
0
    public override void Execute(object data)
    {
        GameModel gm = GetModel <GameModel>();

        gm.IsPlay = false;

        //Todo 显示游戏结束的UI
        UIDead dead = GetView <UIDead>();

        dead.Show();
    }
예제 #5
0
    public override void Excute(object data)
    {
        GameModel gm = GetModel <GameModel>();

        gm.IsPlay = false;

        // TODO 弹出面板
        UIDead uIDead = GetView <UIDead>();

        uIDead.Show();
    }
예제 #6
0
    public override void Execute(object data)
    {
        Game.M_Instance.M_GM.M_IsPlay = false;

        UIDead dead = MVC.GetView <UIDead>();

        dead.Show();

        PlayerAnim anim = MVC.GetView <PlayerAnim>();

        anim.StopPlayerAnim();
    }
예제 #7
0
    public override void Execute(object data)
    {
        CoinArgs e    = data as CoinArgs;
        UIDead   dead = MVC.GetView <UIDead>();

        if (Game.M_Instance.M_GM.GetMoney(e.M_Coin))
        {
            dead.Hide();
            dead.M_BriberyTime++;
            UIResume resume = MVC.GetView <UIResume>();
            resume.StartCount();
        }
    }
예제 #8
0
    public override void Excute(object data)
    {
        GameModel    gameModel  = GetModel <GameModel>();
        UIBoard      board      = GetView <UIBoard>();
        UIDead       dead       = GetView <UIDead>();
        UIFinalScore finalScore = GetView <UIFinalScore>();

        board.Hide();
        dead.Hide();
        finalScore.Show();
        gameModel.Exp += board.Coin + (board.Distance * (board.GoalCount + 1));
        finalScore.UpdateUI(board.Distance, board.Coin, board.GoalCount, gameModel.Exp, gameModel.Grade);
    }
예제 #9
0
    public override void Execute(object data = null)
    {
        GameModel gm = GetModel <GameModel>();

        gm.IsPlay = false;

        // 显示结束UI
        UIDead uiDead = GetView <UIDead>();

        uiDead.Show();

        uiDead.UpdateUI();
    }
예제 #10
0
    public override void Execute(object data)
    {
        CoinArgs e    = data as CoinArgs;
        UIDead   dead = GetView <UIDead>();

        //花钱
        //若  成功
        //贿赂次数增加
        dead.Hide();
        UIResume resume = GetView <UIResume>();

        resume.StartCount();
    }
예제 #11
0
    public override void Execute(object data)
    {
        GameModel    gm         = GetModel <GameModel>();
        UIBoard      board      = GetView <UIBoard>();
        UIDead       dead       = GetView <UIDead>();
        UIFinalScore finalscore = GetView <UIFinalScore>();

        board.Hide();
        dead.Hide();
        gm.Coin += board.Coin;
        finalscore.Show();
        //更新Exp
        gm.Exp += (board.Coin * 10 + board.Distance * (board.Goal + 1));
        //更新UI
        finalscore.UpdateUI(board.Distance, board.Coin, board.Goal, gm.Exp, gm.Level);
    }
예제 #12
0
    public override void Execute(object data)
    {
        GameModel gm = GetModel <GameModel>();

        UIBoard      uIBoard      = GetView <UIBoard>();
        UIFinalScore uIFinalScore = GetView <UIFinalScore>();
        UIDead       uIDead       = GetView <UIDead>();

        uIDead.Hide();
        uIBoard.Hide();
        uIFinalScore.Show();

        //更新Exp
        gm.Exp += uIBoard.Coin + (uIBoard.Distance * (uIBoard.Goal + 1));
        uIFinalScore.UpdateUI(uIBoard.Distance, uIBoard.Coin, uIBoard.Goal, gm.Exp, gm.Grade);
    }
예제 #13
0
    public override void Execute(object data)
    {
        UIBoard board = MVC.GetView <UIBoard>();

        board.Hide();

        UIFinalScore final = MVC.GetView <UIFinalScore>();

        final.Show();
        Game.M_Instance.M_GM.M_Exp += board.M_Coin + board.M_Distance * (board.M_GoalCount + 1);
        final.UpdateUI(board.M_Distance, board.M_Coin, board.M_GoalCount, Game.M_Instance.M_GM.M_Exp, Game.M_Instance.M_GM.M_Grage);

        UIDead dead = MVC.GetView <UIDead>();

        dead.Hide();
        Game.M_Instance.M_GM.M_Coin += board.M_Coin;
    }
예제 #14
0
    public override void Excute(object data)
    {
        CoinArgs  coin      = data as CoinArgs;
        UIDead    dead      = GetView <UIDead>();
        GameModel gameModel = GetModel <GameModel>();


        // 如果花钱成功

        if (gameModel.GetMoney(coin.coin))
        {
            dead.BriberyTime++;
            dead.Hide();
            UIResume resume = GetView <UIResume>();
            resume.StartCount();
        }
    }
예제 #15
0
파일: MainUIWindow.cs 프로젝트: k3498gg/TSC
    private void Init()
    {
        if (isInit)
        {
            return;
        }
        isInit = true;
        Transform cache = transform;

        m_Joystick = cache.Find("Joystick").GetComponent <TCKJoystick>();
        m_UIDead   = cache.Find("Dead").GetComponent <UIDead>();
        m_ranking  = cache.Find("ScrollView").GetComponent <UIRanking>();
        m_timer    = cache.Find("Timer/Text").GetComponent <Text>();

        m_skills     = new Transform[2];
        m_btnImage   = new Image[2];
        m_timerImage = new Image[2];
        m_Renders    = new CanvasRenderer[2];
        m_skillInfos = new UISkill[2];

        for (int i = 0; i < m_skills.Length; i++)
        {
            m_skills[i]     = cache.Find("Skill/Skill" + (i + 1).ToString());
            m_btnImage[i]   = m_skills[i].GetComponent <Image>();
            m_timerImage[i] = cache.Find("Skill/Skill" + (i + 1).ToString() + "/Timer").GetComponent <Image>();
            m_Renders[i]    = m_timerImage[i].GetComponent <CanvasRenderer>();
            m_skillInfos[i] = m_skills[i].GetComponent <UISkill>();

            if (i < GameMgr.Instance.MainEntity.Attribute.Skills.Length)
            {
                m_skillInfos[i].SkillId = GameMgr.Instance.MainEntity.Attribute.Skills[i];
            }
            if (i == 0)
            {
                m_Renders[i].cull          = false;
                m_timerImage[i].fillAmount = GameMgr.Instance.MainEntity.Attribute.CurPhy / GameMgr.Instance.MainEntity.Attribute.MaxPhy;
            }
            else
            {
                m_Renders[i].cull = true;
            }
            UGUIEventListener.Get(m_skills[i].gameObject).onPress = OnPress;
        }
    }
예제 #16
0
    public override void Execute(object data)
    {
        CoinArgs  e      = data as CoinArgs;
        UIDead    uIDead = GetView <UIDead>();
        GameModel gm     = GetModel <GameModel>();

        //TODO
        //if(花钱成功)
        if (gm.BuyGoods(e.coin))
        {
            uIDead.Hide();
            uIDead.BriberyTime++;
            UIResume uIResume = GetView <UIResume>();
            uIResume.StartCount();
        }
        else
        {
        }
    }
예제 #17
0
    public override void Execute(object data = null)
    {
        UIBoard      board      = GetView <UIBoard>();
        UIFinalScore finalScore = GetView <UIFinalScore>();
        UIDead       dead       = GetView <UIDead>();

        GameModel gm = GetModel <GameModel>();

        board.Hide();
        dead.Hide();
        finalScore.Show();

        //1.更新Exp
        gm.Exp += board.Coin + board.Distance * (board.GoalCount + 1);
        //2.更新UI
        finalScore.UpdateUI(board.Distance, board.Coin, board.GoalCount, gm.Exp, gm.Level);
        //3.更新金币
        gm.Coin += board.Coin;
    }
예제 #18
0
    public override void Execute(object data)
    {
        GameModel gm = GetModel <GameModel>();

        UIBoard board = GetView <UIBoard>();

        board.Hide();

        UIFinalScore final = GetView <UIFinalScore>();

        final.Show();
        gm.Exp += board.Coin + board.Distance * (board.GoalCount + 1);

        final.UpdateUI(board.Distance, board.Coin, board.GoalCount, gm.Exp, gm.Level);


        UIDead dead = GetView <UIDead>();

        dead.Hide();
    }
예제 #19
0
    public override void Execute(object data = null)
    {
        CoinArgs  e       = data as CoinArgs;
        UIDead    dead    = GetView <UIDead>();
        GameModel gm      = GetModel <GameModel>();
        UIBoard   uIBoard = GetView <UIBoard>();

        //花钱
        if (gm.GetMoney(e.CoinCount))
        {
            dead.Hide();
            dead.BriberyTime++;
            UIResume resume = GetView <UIResume>();
            resume.StartCount();//继续游戏
            uIBoard.UpdateUI();
        }
        else
        {
            dead.TipMessage("金币不足!");
        }
    }