예제 #1
0
 public void Init(HandCardUI _handCardUI, bool _isMy)
 {
     isMy         = _isMy;
     handCardUI   = _handCardUI;
     image        = this.GetComponent <RawImage>();
     handCardUI   = this.transform.parent.GetComponent <HandCardUI>();
     HandCardAnim = transform.FindChild("HandCardAnim").GetComponent <DashedAnim>();
     posY         = rectTransform.localPosition.y;
 }
예제 #2
0
    void Awake()
    {
        duel    = Duel.GetInstance();
        mDeckUI = transform.FindChild("MDeckUI").GetComponent <GameFieldUI>();
        oDeckUI = transform.FindChild("ODeckUI").GetComponent <GameFieldUI>();

        mHandCardUI = transform.FindChild("MHandCard").GetComponent <HandCardUI>();
        oHandCardUI = transform.FindChild("OHandCard").GetComponent <HandCardUI>();
        mHandCardUI.Init();
        oHandCardUI.Init();

        mFieldMgr = transform.FindChild("MField").GetComponent <FieldMgr>();
        oFieldMgr = transform.FindChild("OField").GetComponent <FieldMgr>();
        mFieldMgr.Init(true);
        oFieldMgr.Init(false);

        mLpSliderUI = transform.FindChild("LPSlider_player1").GetComponent <LPSliderUI>();
        oLpSliderUI = transform.FindChild("LPSlider_player2").GetComponent <LPSliderUI>();

        lpChangeUI       = transform.FindChild("lpChangeUI").GetComponent <LPChangeUI>();
        cardEffectAnim   = transform.FindChild("CardEffectAnim").GetComponent <CardEffectAnim>();
        selectEffectUI   = transform.FindChild("SelectEffectUI").GetComponent <SelectEffectUI>();
        phaseButtonMgr   = transform.FindChild("PhaseButton").GetComponent <PhaseButtonMgr>();
        guessFirst       = transform.FindChild("GuessFirst").GetComponent <GuessFirst>();
        floatText        = transform.FindChild("FloatText").GetComponent <FloatText>();
        selectCardShowUI = transform.FindChild("SelectCardShow").GetComponent <SelectCardShowUI>();
        selectPutType    = transform.FindChild("SelectPutType").GetComponent <SelectPutType>();
        mDrawCardAnim    = transform.FindChild("MDrawCardAnim").GetComponent <DrawCardAnim>();
        oDrawCardAnim    = transform.FindChild("ODrawCardAnim").GetComponent <DrawCardAnim>();
        attackAnim       = transform.FindChild("AttackAnim").GetComponent <AttactAnim>();
        roundCounterUI   = GetChild <RoundCountUI>("RoundNumText");

        mChangeAreaAnim = GetChild <ChangeAreaAnim>("MAnim");
        oChangeAreaAnim = GetChild <ChangeAreaAnim>("OAnim");

        chainUICtr = GetChild <ChainUICtr>("ChainUIMgr");

        selectCardMgr = SelectCardMgr.GetInstance();
        optionListUI  = OptionListUI.GetInstance();
        dialogBoxUI   = DialogBoxUI.GetInstance();
        selectCardUI  = SelectCardUI.GetInstance();
        tipPlane      = ErrorPlane.GetInstance();

        selectCardMgr.Init();
        phaseButtonMgr.Init();
        selectEffectUI.Init();
        cardEffectAnim.Init();
        lpChangeUI.Init();
        optionListUI.Init();
        dialogBoxUI.Init();
        selectCardUI.Init();
        selectPutType.Init();
        attackAnim.Init();
    }
예제 #3
0
    public GameObject[] CreateHandCards()
    {
        GameObject[] cardArray = new GameObject[hand.Count];

        for (int i = 0; i < hand.Count; i++)
        {
            cardArray[i] = Instantiate(cardPrefab);
            HandCardUI ui = cardArray[i].GetComponent <HandCardUI>();
            ui.SetCard(hand[i]);
            ui.onPlayCard += CardPressed;
        }

        return(cardArray);
    }
예제 #4
0
    public void Init()
    {
        mFieldMgr   = transform.FindChild("MField").GetComponent <FieldMgr>();
        oFieldMgr   = transform.FindChild("OField").GetComponent <FieldMgr>();
        mHandCardUI = transform.FindChild("MHandCard").GetComponent <HandCardUI>();
        oHandCardUI = transform.FindChild("OHandCard").GetComponent <HandCardUI>();

        curGroup    = new Group();
        selectGroup = new Group();

        duel = Duel.GetInstance();

        AddHandler(DuelEvent.netEvent_ReciveSelectFieldCard, ReciveSelectFieldCard);
        AddHandler(DuelEvent.playBackEvent_SelectFieldCard, PlayBackSelectFieldCard);
    }
예제 #5
0
 public void init()
 {
     ui      = new HandCardUI();
     ui.ctrl = this;
 }