public int GetUniqueID(Dragable dObject, Card tempCardScript, Dropzone tempDropZone, Controler Tcontrol) { //dObject.returnParent.gameObject.GetComponent<Hand>().cards.Remove(tempCardScript); dObject.returnParent = this.transform; tempDropZone.AddCard(tempCardScript); Hand THand = Tcontrol.hands[Tcontrol.turn]; int UID = GetCard(THand, tempCardScript); Remove(tempCardScript, THand); Tcontrol.ifDisplay.setText(Tcontrol.UpdateInfo(0)); return(UID); }
public void PlayCard(int UID, TournementControler Tc) { Dropzone Dropzone = Tc.dzones[playerID]; Hand THand = Tc.hands[Tc.turn]; HandleTextFile.WriteLog("AI Log: Player " + (playerID + 1) + " Plays Card" + THand.cards[UID].name, GameControler.SName); Card temp = Instantiate(THand.cards[UID]); Dropzone.AddCard(temp); temp.transform.SetParent(Dropzone.transform); Destroy(THand.transform.GetChild(UID).gameObject); }
public void NetworkExecuteDropTZone(int UID) { Debug.Log(UID); Dropzone Dropzone = (Dropzone)this.GetComponent("Dropzone"); TournementControler Controler = tournamentControler; Hand THand = Controler.hands[Controler.turn]; Card temp = Instantiate(THand.cards[UID]); Dropzone.AddCard(temp); temp.transform.SetParent(this.transform); Destroy(THand.transform.GetChild(UID).gameObject); THand.cards.RemoveAt(UID); Controler.ifDisplay.setText(Controler.UpdateInfo(0)); }
public void PlayCard(int UID, QuestController Qc, bool Sponsor, int Stage) { Debug.Log("StageNumber: " + Stage); if (!Sponsor) { Dropzone Dropzone = Qc.dzones[playerID]; Hand THand = Qc.hands[Qc.turn]; HandleTextFile.WriteLog("AI Log: Player " + (playerID + 1) + " Plays Card" + THand.cards[UID].name, GameControler.SName); Card temp = Instantiate(THand.cards[UID]); Dropzone.AddCard(temp); temp.transform.SetParent(Dropzone.transform); Destroy(THand.transform.GetChild(UID).gameObject); } else { Dropzone Dropzone = Qc.qzones[Stage]; Hand THand = Qc.hands[Qc.turn]; HandleTextFile.WriteLog("AI Log: Player " + (playerID + 1) + " Plays Card" + THand.cards[UID].name, GameControler.SName); Card temp = Instantiate(THand.cards[UID]); Dropzone.AddCard(temp); temp.transform.SetParent(Dropzone.transform); Destroy(THand.transform.GetChild(UID).gameObject); } }