Пример #1
0
    public override void execute()
    {
        CharacterOther     otherPlayer  = mCharacterManager.getCharacter(mOtherPlayerGUID.mValue) as CharacterOther;
        ScriptMahjongFrame mahjongFrame = mLayoutManager.getScript(LAYOUT_TYPE.LT_MAHJONG_FRAME) as ScriptMahjongFrame;

        mahjongFrame.notifyInfo("正在等待玩家" + otherPlayer.getName() + "做出选择");
    }
Пример #2
0
    public override void execute()
    {
        Character     character = (mReceiver) as Character;
        CharacterData data      = character.getCharacterData();

        character.dropMahjong(mMah);

        ScriptMahjongHandIn handIn = mLayoutManager.getScript(LAYOUT_TYPE.LT_MAHJONG_HAND_IN) as ScriptMahjongHandIn;

        handIn.notifyDropMahjong(data.mPosition, mMah, mIndex);
        ScriptMahjongDrop scriptDrop = mLayoutManager.getScript(LAYOUT_TYPE.LT_MAHJONG_DROP) as ScriptMahjongDrop;

        scriptDrop.notifyDropMahjong(data.mPosition, data.mDropList, mMah);
        if (character.getType() == CHARACTER_TYPE.CT_MYSELF)
        {
            ScriptMahjongFrame mahjongFrame = mLayoutManager.getScript(LAYOUT_TYPE.LT_MAHJONG_FRAME) as ScriptMahjongFrame;
            mahjongFrame.notifyInfo("");

            // 打出一张牌后,锁定玩家手里的牌,玩家不能点击手里的麻将
            handIn.notifyCanDrop(false);
            // 确认麻将操作按钮已经隐藏
            ScriptPlayerAction playerAction = mLayoutManager.getScript(LAYOUT_TYPE.LT_PLAYER_ACTION) as ScriptPlayerAction;
            playerAction.notifyActionAsk(null);
        }
    }
Пример #3
0
    public override void execute()
    {
        // 清空提示信息
        ScriptMahjongFrame mahjongFrame = mLayoutManager.getScript(LAYOUT_TYPE.LT_MAHJONG_FRAME) as ScriptMahjongFrame;

        mahjongFrame.notifyInfo("");
        CommandCharacterDrop cmd = mCommandSystem.newCmd <CommandCharacterDrop>();

        cmd.mMah   = (MAHJONG)mMahjong.mValue;
        cmd.mIndex = mIndex.mValue;
        mCommandSystem.pushCommand(cmd, mCharacterManager.getCharacter(mPlayerGUID.mValue));
    }
Пример #4
0
    public override void execute()
    {
        Character character = mReceiver as Character;

        // 如果是玩家自己,则通知布局可以打出一张牌
        if (character.getType() == CHARACTER_TYPE.CT_MYSELF)
        {
            ScriptMahjongHandIn handIn = mLayoutManager.getScript(LAYOUT_TYPE.LT_MAHJONG_HAND_IN) as ScriptMahjongHandIn;
            handIn.notifyCanDrop(true);
            ScriptMahjongFrame mahjongFrame = mLayoutManager.getScript(LAYOUT_TYPE.LT_MAHJONG_FRAME) as ScriptMahjongFrame;
            mahjongFrame.notifyInfo("请打出一张牌");
        }
    }
Пример #5
0
    public override void execute()
    {
        GameScene gameScene = mGameSceneManager.getCurScene();

        if (gameScene.getType() != GAME_SCENE_TYPE.GST_MAHJONG)
        {
            return;
        }
        // 清空提示信息
        ScriptMahjongFrame mahjongFrame = mLayoutManager.getScript(LAYOUT_TYPE.LT_MAHJONG_FRAME) as ScriptMahjongFrame;

        mahjongFrame.notifyInfo("");
        CommandCharacterPeng cmdGang = mCommandSystem.newCmd <CommandCharacterPeng>();

        cmdGang.mDroppedPlayer = mCharacterManager.getCharacterByGUID(mDroppedPlayerGUID.mValue);
        cmdGang.mMahjong       = (MAHJONG)mMahjong.mValue;
        mCommandSystem.pushCommand(cmdGang, mCharacterManager.getCharacterByGUID(mOtherPlayerGUID.mValue));
    }
Пример #6
0
    protected override void onInit(SceneProcedure lastProcedure, string intent)
    {
        // 显示布局
        LayoutTools.SHOW_LAYOUT(LAYOUT_TYPE.LT_ALL_CHARACTER_INFO);
        LayoutTools.SHOW_LAYOUT(LAYOUT_TYPE.LT_MAHJONG_BACK_FRAME);
        LayoutTools.SHOW_LAYOUT(LAYOUT_TYPE.LT_MAHJONG_FRAME);

        // 通知房间开始等待玩家加入
        MahjongScene mahjongScene = mGameScene as MahjongScene;

        mahjongScene.getRoom().notifyStartWait();

        // 设置显示房间号
        CharacterMyself    myself       = mCharacterManager.getMyself();
        ScriptMahjongFrame mahjongFrame = mLayoutManager.getScript(LAYOUT_TYPE.LT_MAHJONG_FRAME) as ScriptMahjongFrame;

        mahjongFrame.setRoomID(myself.getCharacterData().mRoomID);
        mahjongFrame.notifyInfo("正在等待其他玩家准备");
    }
Пример #7
0
    protected override void onExit(SceneProcedure nextProcedure)
    {
        ScriptMahjongFrame mahjongFrame = mLayoutManager.getScript(LAYOUT_TYPE.LT_MAHJONG_FRAME) as ScriptMahjongFrame;

        mahjongFrame.notifyInfo("");
    }
Пример #8
0
    public override void execute()
    {
        ScriptMahjongFrame mahjongFrame = mLayoutManager.getScript(LAYOUT_TYPE.LT_MAHJONG_FRAME) as ScriptMahjongFrame;

        mahjongFrame.notifyInfo("");
    }