예제 #1
0
 void Awake()
 {
     duelScene               = GameManager.GetDuelScene();
     cardImage               = gameObject.transform.GetChild(0).gameObject;
     attackImage             = gameObject.transform.GetChild(1).gameObject;
     borderImage             = cardImage.transform.GetChild(0).gameObject;
     operationPanelTransform = gameObject.transform.GetChild(2).transform.GetChild(0);
     attackAndDefenseText    = gameObject.transform.GetChild(2).transform.GetChild(1).gameObject;
     attackAndDefenseText.GetComponent <Text>().text = "";
 }
예제 #2
0
 /// <summary>
 /// 为卡牌设置场景内依附的物体
 /// </summary>
 /// <param name="gameObject"></param>
 public void SetCardObject(GameObject gameObject)
 {
     cardObject     = gameObject;
     cardScript     = cardObject.GetComponent <CardScript>();
     duelCardScript = cardObject.GetComponent <DuelCardScript>();
     if (duelCardScript != null)
     {
         duelScene = GameManager.GetDuelScene();
     }
 }
예제 #3
0
    int iGuessWin = 0;//0-未知 1-成功 2-失败

    void Start()
    {
        //先选择卡组再猜先
        selectCardGroupPanel.SetActive(true);
        guessFirstPanel.SetActive(false);
        selectFirstPanel.SetActive(false);
        duelScene = GameManager.GetDuelScene();

        GameManager.CleanPanelContent(cardGroupScrollViewTransform);
        UserData userData = GameManager.GetSingleInstance().GetUserData();

        foreach (var item in userData.userCardGroupList)
        {
            AddCardGroupItemToScrollView(item);
        }
    }
예제 #4
0
        void Start()
        {
            GameManager.GetSingleInstance().SetAudioByName(duelBgmName);
            duelScene = GameManager.GetDuelScene();
            duelScene.Init();
            cardImage = GameObject.Find("cardImage").GetComponent <Image>();

            Transform canvasTransform = GameObject.Find("Canvas").transform;

            duelResultPanel = canvasTransform.Find("DuelResultPanel").gameObject;
            duelResultPanel.SetActive(false);

            phaseTypePanel = canvasTransform.Find("rightPanel/PhaseTypePanel").gameObject;
            phaseTypePanel.SetActive(false);

            PhaseTypeConfig phaseTypeConfig = ConfigManager.GetConfigByName("PhaseType") as PhaseTypeConfig;

            for (int i = 1; i < phaseTypePanel.transform.GetChild(0).childCount; i++)
            {
                phaseTypePanel.transform.GetChild(0).GetChild(i).GetComponent <Text>().text = phaseTypeConfig.GetRecordById(i).value;
            }

            attackOrDefensePanel = canvasTransform.Find("rightPanel/AttackOrDefensePanel").gameObject;
            attackOrDefensePanel.SetActive(false);

            effectSelectPanel = canvasTransform.Find("rightPanel/EffectSelectPanel").gameObject;
            effectSelectPanel.SetActive(false);

            cardListPanel            = canvasTransform.Find("rightPanel/CardListPanel").gameObject;
            cardListContentTransform = cardListPanel.transform.GetChild(0).GetChild(0).GetChild(0);
            cardListPanel.SetActive(false);

            tossCoinPanel = canvasTransform.Find("rightPanel/TossCoinPanel").gameObject;
            tossCoinPanel.SetActive(false);

            throwDicePanel = canvasTransform.Find("rightPanel/ThrowDicePanel").gameObject;
            throwDicePanel.SetActive(false);

            selectItemPanel = canvasTransform.Find("rightPanel/SelectItemPanel").gameObject;
            selectItemPanel.SetActive(false);

            makeSurePanel = canvasTransform.Find("rightPanel/MakeSurePanel").gameObject;
            makeSurePanel.SetActive(false);
        }
예제 #5
0
        protected string effectName  = "未命名"; //效果的名称


        public EffectProcessBase(Player ownerPlayer, string effectName)
        {
            this.ownerPlayer = ownerPlayer;
            this.effectName  = effectName;
            duelScene        = GameManager.GetDuelScene();
        }
예제 #6
0
 /// <summary>
 /// 设置网络模式
 /// </summary>
 public void SetNetMode()
 {
     duelScene = new DuelScene(DuelMode.Net);
     OpenNet();
     EnterGuessFirstScene();
 }
예제 #7
0
 /// <summary>
 /// 设置单人模式
 /// </summary>
 public void SetSingleMode()
 {
     duelScene = new DuelScene(DuelMode.Single);
     EnterGuessFirstScene();
 }
예제 #8
0
 public void CleanDuelScene()
 {
     duelScene = null;
 }
예제 #9
0
        public override void Process()
        {
            DuelScene duelScene = GameManager.GetDuelScene();

            duelScene.OpponentDraw();
        }