protected override void Awake()
    {
        view        = GetComponentInChildren <UIMainPlayer>();
        base.view   = view;//base.view 是没有赋值的
        gameManager = GetComponentInParent <GameManagerOffline>();

        EventCenter.AddListener(EventType.PlayCard, MainPlayerPlayCard);
        EventCenter.AddListener(EventType.PassTurn, PassTurn);
        EventCenter.AddListener(EventType.PlayCardHint, HintCards);
        EventCenter.AddListener(EventType.GrabLandlord, GrabLandlord);
        EventCenter.AddListener(EventType.NoGrabLandlord, NoGrabLandlord);
    }
Ejemplo n.º 2
0
    private void Awake()
    {
        view = GetComponentInChildren <UIMainPlayer>();

        EventCenter.AddListener(EventType.Ready, Ready);
        EventCenter.AddListener(EventType.UnReady, UnReady);
        EventCenter.AddListener(EventType.GrabLandlord, GrabLandlord);
        EventCenter.AddListener(EventType.NoGrabLandlord, NoGrabLandlord);
        EventCenter.AddListener(EventType.PlayCard, OnPlayCardClicked);
        EventCenter.AddListener(EventType.PassTurn, OnPassTurnClicked);
        EventCenter.AddListener(EventType.PlayCardHint, OnPlayCardHintClicked);
    }