// _////////////////////////////////////////////////_ _____ Swap _____ SaveV _____ public void SwapCurposiAndSetTargetWith(CuVect pT) { //Ag.LogIntenseWord (" SwapCurposiAndSetTargetWith " + SaveV + " / " + pT.SaveV); //Ag.LogString (" This Vector : " + MyVector + " / " + pT.MyVector); ShowMyself(" SwapCurposiAndSetTargetWith "); Ag.Swap <Vector3> (ref SaveV, ref pT.SaveV); Return2SavedVect(); pT.Return2SavedVect(); }
void SwapCards(GameObject GmObj) { Ag.Swap <AmCard> (ref Selected.GetComponent <PlayerCardInfo> ().mCard, ref GmObj.GetComponent <PlayerCardInfo> ().mCard); Ag.Swap <WasCard> (ref Selected.GetComponent <PlayerCardInfo> ().mwas, ref GmObj.GetComponent <PlayerCardInfo> ().mwas); Selected.GetComponent <PlayerCardInfo> ().CardInit(); GmObj.GetComponent <PlayerCardInfo> ().CardInit(); LineUpSetting(); SelectReleaseUI(); StartCoroutine(CardRepositionNow(0.2f)); }
void SwapBetweenFrames(GameObject pHome, GameObject pDest) { Ag.LogIntenseWord("SwapBetweenFrames " + pHome.name + " " + pDest.name); CuCell alien = pHome.CellCs(); CuCell targt = pDest.CellCs(); alien.Pstn.SwapCurposiAndSetTargetWith(targt.Pstn); FrameHome.RemoveCellWith(pHome.name, pDest); FrameDest.RemoveCellWith(pDest.name, pHome); Ag.Swap <int> (ref alien.mSortNum, ref targt.mSortNum); Ag.Swap <GameObject> (ref alien.mPrevGobj, ref targt.mPrevGobj); Ag.Swap <GameObject> (ref alien.mNextGobj, ref targt.mNextGobj); }
public void SwapSortInfoWith(GameObject pT) // switch with Alien .. { ShowMySortInfo(); pT.CellCs().ShowMySortInfo(); CuCell cll = pT.CellCs(); Ag.Swap <GameObject> (ref mPrevGobj, ref cll.mPrevGobj); Ag.Swap <GameObject> (ref mNextGobj, ref cll.mNextGobj); Ag.Swap <int> (ref mSortNum, ref cll.mSortNum); // Set Next / Prev Objects ... MyPrevIs(mPrevGobj); MyNextIs(mNextGobj); cll.MyPrevIs(cll.mPrevGobj); cll.MyNextIs(cll.mNextGobj); //" !!! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ magic ".HtLog (); ShowMySortInfo(); pT.CellCs().ShowMySortInfo(); }
// _////////////////////////////////////////////////_ _///////////////////////_ _____ Switch _____ Btw Frames _____ void LiaisonSwitch() { // Called from Mouse Up. UITileManager :: AlienSwitchProcess //if (mAlien == null || mAlienTarget == null) return; Ag.LogIntenseWord(" CuLiaison :: LiaisonSwitch "); CuCell alien = Liaison.CellCs(); CuCell targt = FrameDest.mSwitchObj.CellCs(); GameObject Target = FrameDest.mSwitchObj; if (!alien.SameKindOf(Target)) { FrameHome = FrameDest = null; Liaison = null; return; } switch ("SWAP") { case "SWAP": FrameHome.RemoveCellWith(Liaison.name, Target); FrameDest.RemoveCellWith(Target.name, Liaison); Ag.Swap <int> (ref alien.mSortNum, ref targt.mSortNum); Ag.Swap <GameObject> (ref alien.mPrevGobj, ref targt.mPrevGobj); Ag.Swap <GameObject> (ref alien.mNextGobj, ref targt.mNextGobj); alien.Pstn.SwapCurposiAndSetTargetWith(targt.Pstn); break; //case "INSERT": //Target.CellCs ().InsertAt (mAlien); } FrameDest.ArrangeCells(); FrameHome.ArrangeCells(); FrameHome = FrameDest = null; Liaison = null; }
bool IsSwapableCase(GameObject GmObj, out bool KeeperKickerSwapCase, out bool CostError, out bool HuboError, out bool SameNameError) { AmCard SelCrd = Selected.GetComponent <PlayerCardInfo> ().mCard; AmCard CurCrd = GmObj.GetComponent <PlayerCardInfo> ().mCard; SameNameError = HuboError = CostError = KeeperKickerSwapCase = false; Ag.LogStartWithStr(1, " MenuManager _ Manager Team . cs Is IsSwapableCase .... "); AmCard mainC, subbC; if (SelCrd.WAS.kickOrder >= 0) { mainC = SelCrd; subbC = CurCrd; } else { mainC = CurCrd; subbC = SelCrd; } Ag.LogString(" MenuManager _ Manager Team :: " + mainC.WAS.country + " is MainC PlayerCountry " + subbC.WAS.country + " is SubCC PlayerCountry "); // Keeper / Kicker Check.. if (SelCrd.WAS.isKicker != CurCrd.WAS.isKicker) { KeeperKickerSwapCase = true; return(false); } // Main Kicker Swap ... if (SelCrd.KickOrder > 0 && CurCrd.KickOrder > 0) { return(true); } // Swap Between Hubos if (SelCrd.KickOrder < 0 && CurCrd.KickOrder < 0) { HuboError = true; return(false); } // Special Card .. Ag.LogString(" Special Card Check.... main >> " + mainC.IsSpecialCard + " subb >> " + subbC.IsSpecialCard + " S CardNum >> " + Ag.mySelf.SpecialCardNum); if (!mainC.IsSpecialCard && subbC.IsSpecialCard && Ag.mySelf.SpecialCardNum >= 2) { StartCoroutine(DontchangeCardPosi(1f, "주전 선수에는 스페셜선수가 2명이상 포함될수 없습니다.", false)); return(false); } Ag.LogString(" MenuManager _ Manager Team :: " + mainC.WAS.country + " MainC Playerid " + subbC.WAS.country + "SubCC Playerid" + "2"); Ag.LogString(" MenuManager _ Manager Team :: " + mainC.WAS.country + " MainC Playerid " + subbC.WAS.country + "SubCC Playerid" + Ag.mySelf.CanThisJoin2MainCards(mainC, subbC)); /* * if (!Ag.mySelf.CanThisJoin2MainCards (mainC, subbC)) { * SameNameError = true; * return false; * } */ // Lower Swap is always open.. int mainCrdCost = SelCrd.WAS.cost, huboCrdCost = CurCrd.WAS.cost; if (SelCrd.KickOrder < 0) { Ag.Swap <int> (ref mainCrdCost, ref huboCrdCost); } if (mainCrdCost >= huboCrdCost) { return(true); } // Cost Compare Ag.Swap <int> (ref SelCrd.WAS.kickOrder, ref CurCrd.WAS.kickOrder); if ((CardCostAll() - CurCrd.WAS.cost + SelCrd.WAS.cost) > Ag.mySelf.WAS.Cost) { Ag.Swap <int> (ref SelCrd.WAS.kickOrder, ref CurCrd.WAS.kickOrder); CostError = true; return(false); } if ((CardCostAll() - SelCrd.WAS.cost + CurCrd.WAS.cost) > Ag.mySelf.WAS.Cost) { Ag.Swap <int> (ref SelCrd.WAS.kickOrder, ref CurCrd.WAS.kickOrder); CostError = true; return(false); } Ag.Swap <int> (ref SelCrd.WAS.kickOrder, ref CurCrd.WAS.kickOrder); return(true); }