// Use this for initialization
    void Start()
    {
        functionManager = new FunctionManager();
        functionManager.AddFunction(MoneyFunction);
        functionManager.AddFunction(SourceFunction);
        functionManager.AddFunction(RoundFunction);
        functionManager.AddFunction(PositionFunction);
        functionManager.AddFunction(StealFunction);
        functionManager.AddFunction(ReplaceFunction);

        cardFactory     = this.GetComponent <CardFactory>();
        gameMap         = this.GetComponent <GameMap>();
        act             = this.GetComponent <InterActive>();
        ui              = this.GetComponent <Uicontroller>();
        eventController = this.GetComponent <EventController>();

        eventBoard = this.GetComponentInChildren <EventBoard>();
        eventBoard.leftbuttonEvent += OnMapEffect;

        ticketUI            = ticketUIObj.GetComponent <TicketUI>();
        ticketUI.StockOver += OnStockOver;
        ticketCamera.SetActive(false);
        //ticketUIObj.SetActive(false);

        //注册监听事件
        //设置玩家头像
        int count = 0;

        foreach (var player in players)
        {
            //.................................设置玩家角色......................................新增(采用后删掉)
            int roleNum = PlayerPrefs.GetInt("roleNum" + count.ToString());
            player.setRole(roleImage[roleNum]);
            player.roleName = count;
            player.PD       = player.LoadDataFromJson("/PlayerData" + count.ToString() + ".json");
            count++;
            //.....................................................................................................
            //player.gameController = this;
            player.MoveOver  += OnMoveOver;
            player.SkillOver += OnSkillOver;
        }

        StartGame();
    }