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 = ""; }
/// <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(); } }
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); } }
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); }
protected string effectName = "未命名"; //效果的名称 public EffectProcessBase(Player ownerPlayer, string effectName) { this.ownerPlayer = ownerPlayer; this.effectName = effectName; duelScene = GameManager.GetDuelScene(); }
/// <summary> /// 设置网络模式 /// </summary> public void SetNetMode() { duelScene = new DuelScene(DuelMode.Net); OpenNet(); EnterGuessFirstScene(); }
/// <summary> /// 设置单人模式 /// </summary> public void SetSingleMode() { duelScene = new DuelScene(DuelMode.Single); EnterGuessFirstScene(); }
public void CleanDuelScene() { duelScene = null; }
public override void Process() { DuelScene duelScene = GameManager.GetDuelScene(); duelScene.OpponentDraw(); }