public void ShowPaiHsImage(Manager_PengGang penggang, FICStartGame startGame, int hs) { this.penggang = penggang; this.hs = hs; this.startGame = startGame; hsImage = transform.Find("image/001").GetComponent <Image>(); hsImage.sprite = startGame.HuaseArray[hs]; }
//引用paipaipai脚本的手牌偏移量,测试 private void Awake() { Start_MJposition = this.transform.position; maskPai = transform.Find("/Main Camera").GetComponent <FICMaskPai>(); paipaipai = transform.Find("/Main Camera").GetComponent <FICpaipaipai>(); managerPengGang = transform.Find("/Main Camera").GetComponent <Manager_PengGang>(); startGame = transform.Find("/Main Camera").GetComponent <FICStartGame>(); myCards = transform.Find("/Main Camera").GetComponent <FICMyCards>(); SPCamera = transform.Find("/3D_SP_Camera").gameObject.GetComponent <Camera>(); ReminderLine = transform.Find("/Game_UI/Interaction_UI/desktop_UI/ReminderLine").gameObject; }
// Use this for initialization void Start() { startGame = transform.Find("/Main Camera").GetComponent <FICStartGame>(); pengGang = transform.Find("/Main Camera").GetComponent <Manager_PengGang>(); managerGame = transform.Find("/Main Camera").GetComponent <Manager_Game>(); pghgGridTrans = transform.Find("/Game_UI/Interaction_UI/can_buttons_pghg/grid_pghg"); guoButtonGO = transform.Find("/Game_UI/Interaction_UI/can_buttons_pghg/grid_pghg/item_button_guo").gameObject; pengButtonGO = transform.Find("/Game_UI/Interaction_UI/can_buttons_pghg/grid_pghg/item_button_peng").gameObject; gangButtonGO = transform.Find("/Game_UI/Interaction_UI/can_buttons_pghg/grid_pghg/item_button_gang").gameObject; huButtonGO = transform.Find("/Game_UI/Interaction_UI/can_buttons_pghg/grid_pghg/item_button_hu").gameObject; tingButtonGO = transform.Find("/Game_UI/Interaction_UI/can_buttons_pghg/grid_pghg/item_button_ting").gameObject; }
private Manager_Audio managerAudio; ///单例 /// <summary> /// /// </summary> private void Start() { myMaJiangList = new List <MaJiang>(); //=====================对其他脚本的获取============= paipaipai = gameObject.GetComponent <FICpaipaipai>(); maskPai = gameObject.GetComponent <FICMaskPai>(); startGame = gameObject.GetComponent <FICStartGame>(); pengGang = gameObject.GetComponent <Manager_PengGang>(); //=====================为个人手牌,弃牌,碰牌的父物体赋值=============== shouPaiContainerTrans = transform.Find("/Game_Prefabs/TABLE/Game_3DPai/SouthContainer/ShouPaiContainer"); qiPaiContainerTrans = transform.Find("/Game_Prefabs/TABLE/Game_3DPai/SouthContainer/QiPaiContainer"); pengGangPaiContainerTrans = transform.Find("/Game_Prefabs/TABLE/Game_3DPai/SouthContainer/PengGangPaiContainer"); tempShouPaiContainerTrans = shouPaiContainerTrans; //======================手牌预制体============== shouPaiGO = Resources.Load <GameObject>("Game_GYMJ/Prefabs/3Dpai"); tempGO = transform.Find("/Game_Prefabs/emptyGO").gameObject; //======================手牌位置确定============== firstShouPaiTrans = shouPaiContainerTrans.Find("FirstShouPai"); secondShouPaiTrans = shouPaiContainerTrans.Find("SecondShouPai"); thirdShouPaiTrans = shouPaiContainerTrans.Find("ThirdShouPai"); newFirstShouPaiTrans = firstShouPaiTrans.position; moPaiTrans = shouPaiContainerTrans.Find("MoPai"); //======================弃牌位置确定============== firstQiPaiTrans = qiPaiContainerTrans.Find("FirstQiPai"); secondQiPaiTrans = qiPaiContainerTrans.Find("SecondQiPai"); thirdQiPaiTrans = qiPaiContainerTrans.Find("ThirdQiPai"); //======================碰牌位置确定============== firstPengPaiTrans = pengGangPaiContainerTrans.Find("FirstPengPai"); secondPengPaiTrans = pengGangPaiContainerTrans.Find("SecondPengPai"); thirdPengPaiTrans = pengGangPaiContainerTrans.Find("ThirdPengPai"); fourPengPaiTrans = pengGangPaiContainerTrans.Find("FourPengPai"); fivePengPaiTrans = pengGangPaiContainerTrans.Find("FivePengPai"); //======================偏移量确定============== shouPaiOffsetX = secondShouPaiTrans.position - firstShouPaiTrans.position; shouPaiOffsetY = thirdShouPaiTrans.position - firstShouPaiTrans.position; qiPaiOffsetX = secondQiPaiTrans.position - firstQiPaiTrans.position; qiPaiOffsetZ = thirdQiPaiTrans.position - firstQiPaiTrans.position; pengPaiOffsetX = secondPengPaiTrans.position - firstPengPaiTrans.position; pengPaiOffsetZ = thirdPengPaiTrans.position - secondPengPaiTrans.position; pengPaiOffsetLX = fivePengPaiTrans.position - fourPengPaiTrans.position; //======================生成下一张牌的位置确定======= nextPengPaiPos = firstPengPaiTrans.position; nextQiPaiPos = firstQiPaiTrans.position; //======================动态加载3d牌贴图============== textureArray = new Texture[30]; InitTextureFor3D(); managerAudio = GameObject.Find("Main Camera").GetComponent <Manager_Audio>(); ///单例ManagerAudio脚本 }