// Use this for initialization void Start() { myCard = new AmCard(); myCard.mDirectObj.mWidth = new int[4] { 250, 250, 250, 250 }; myCard.mDirectObj.mPosition = new int[4] { 0, 250, 500, 750 }; myCard.SetDirectionArea(); Ag.mgIsKick = true; mCursor1 = GameObject.Find("Ui_camera/Camera/Ui_ingame/Panel_progressbar_kickbar/nod0").gameObject; mCursor2 = GameObject.Find("Ui_camera/Camera/Ui_ingame/Panel_progressbar_kickbar/nod1").gameObject; mCursor3 = GameObject.Find("Ui_camera/Camera/Ui_ingame/Panel_progressbar_kickbar/nod2").gameObject; mCursor4 = GameObject.Find("Ui_camera/Camera/Ui_ingame/Panel_progressbar_kickbar/nod3").gameObject; DrawGuideLine(); //GetUniqueKey(20); string cocococo = "zozozozoozzoz" + '"' + "ozozo:" + ":" + "zozozozo"; //'"'+ cocococo.Replace(WWW.UnEscapeURL("%22"),"\"")+'"'; Debug.Log(cocococo.Replace("\"", "\\\"").ToString()); }
/// <summary> /// 체험 시작. 체험 완료로 서버에 업데이트 /// </summary> public void SetCardsForSingleTry() { if (Ag.SingleTry == 0) { return; } SetBotGrade(); // 봇의 그레이드는 오리지날로. string grade = Ag.SingleTry == 1 ? "A" : "S"; // apply to only "S" grade .... not A cards ... string [] polyInfo = new string [] { "W_S_Goalie001", "W_S_Kicker001", "W_S_Kicker002", "W_S_Kicker003", "W_S_Kicker004", "W_S_Kicker005" }; string [] polyName = new string [] { "%EB%A0%88%ED%8F%AC%20%EC%95%BC%EC%89%B0", "%EB%A7%88%EB%9D%BC%EB%8F%88%EC%95%84", "%ED%97%AC%EB%A0%88", "%EC%98%A4%EB%82%98%ED%9B%84%EB%91%90", "%EC%A7%80%EB%82%9C", "%EB%B0%94%EA%B2%90%EB%B0%94%EC%9A%B0%EC%98%A4" }; for (int k = 0; k < 6; k++) { AmCard kick = GetCardOrderOf(k); kick.SetGradeLevelWithNewDirection(grade, 10); // Kick order initialize ... kick.WAS.kickOrder = k; if (grade == "S") { kick.WAS.info = polyInfo [k]; kick.WAS.playerName = polyName [k]; } } etcInfoObj.SingleTry += Ag.SingleTry; // 0, 1, 2, 3 UpdateEtcInfoObj("SetCardsForSingleTry"); }
public void GameTurnBot(int turnN, AmCard EnemCard) { //Ag.LogIntenseWord (" Value at Bot " + " " + Direction + " " + " " + Skill + " " + Ag.mgEnemDirec + " " + Ag.mgEnemSkill); //Ag.LogDouble (" NodeActions :: GameTurnBot ... turn : " + turnN + " EnemCard : " + EnemCard.WAS.grade + " / " + EnemCard.WAS.level); NodeGameTurnRslt gameTurn = new NodeGameTurnRslt() { roll = Ag.mgIsKick ? "KICK" : "KEEP", direction = Direction, skill = Skill, turnNum = turnN, sessionKey = MySocket.sessionKey, grade = CurMyCard.WAS.grade, level = CurMyCard.WAS.level }; MySocket.arrGameSend.Add(gameTurn); NodeGameTurnRslt enemTurn = new NodeGameTurnRslt() { roll = !Ag.mgIsKick ? "KICK" : "KEEP", direction = Ag.mgEnemDirec, skill = Ag.mgEnemSkill, turnNum = turnN, sessionKey = MySocket.sessionKey, grade = EnemCard.WAS.grade, level = EnemCard.WAS.level }; MySocket.arrGameRcvd.Add(enemTurn); Ag.LogIntenseWord(" NodeActions :: GameTurnBot arrGameSend.count : " + MySocket.arrGameSend.Count + " Rcvd : " + MySocket.arrGameRcvd.Count); }
public override void SendAction() { Ag.LogString("WasCardLevelup :: SendAction ... Started ... "); SendStr = ""; SendStr = SendStr.AddCodeKeyKKOID(User, 252); SendStr = SendStr.AddKeyValue("cardID", cardID); SendStr = SendStr.AddKeyValue("formatVersion", 1); // Deck AmCard curCard = User.GetCardIdOf(cardID); int bT = User.GetBuyType("FuncLevelUp" + (curCard.WAS.level + 1)); SendStr = SendStr.AddKeyValue("buyType", bT, false); SendStr = SendStr.AddParen(); postAction += () => { Ag.LogString("WasCardLevelup :: postAction " + RcvdStr); //JsonData jsUInfo = JsonMapper.ToObject (RcvdStr); if (Result.result == 0) { JSONNode contJs = NdObj ["cardInfoRslt"]; Ag.LogString("WasCardLevelup :: postAction .. >>>> next step is messageAction "); AmCard theCard = User.arrCard.GetMemberWithCond <AmCard> ((AmCard crd) => { return(crd.WAS.ID == contJs ["ID"].AsInt); }); theCard.WAS.WasCardParse(contJs); theCard.ScouterParse(); } messageAction(Result.result); }; SendAndRciv(); }
public bool ParseCards(JSONNode pData) { Ag.LogStartWithStr(1, " [< AmUserNet.cs >] <<<<< ParseCards >>>>> >> " + pData.Count); pData.ToString().HtLog(); try { arrCard.Clear(); for (int k = 0; k < pData.Count; k++) { Ag.LogIntense(1, true); Ag.LogString(pData [k].ToString() + " k : " + k); AmCard aObj = new AmCard(); // if (k == 0) { // 임 시 로 키 퍼 세 팅. // aObj.WAS.isKicker = false; // //polyNum = 101; // } else // aObj.WAS.isKicker = true; //if (aObj.WAS.ParseFrom (pData [k])) aObj.WAS.WasCardParse(pData [k]); aObj.ScouterParse(); arrCard.Add(aObj); } } catch { Ag.LogIntenseWord(" [< AmUserNet.cs >] Parse <<<<< ParseCards >>>>> E R R O R :: "); return(false); } return(true); }
public void SetSkillPositions(AmCard pCard, bool pDidBuyPotion, bool pEventPotion, bool pMinusPotion, AmUser pUser, int costumeNum) {//[2012:11:09:LJK] Random Item Acc Good Perfect modified arrArea = new ArrayList(); //case 0: good = 20f; better = .5f; break; //Debug.Log ("Card Good :: SetSkillPositions" + pCard.WAS.skill[0] + "Perfect" + pCard.WAS.skill[1] + " CardGRADE " + pCard.WAS.grade); int good, prft; if (AgStt.mgGameTutorial) { mGood = pCard.WAS.skill [0]; mPerfect = pCard.WAS.skill [1]; } else { WAS.GetSkillFinalValue(pUser.arrUniform [0].Kick.Shirt.Texture, pUser.arrUniform [0].Kick.Pants.Texture, pUser.arrUniform [0].Kick.Socks.Texture, costumeNum, out good, out prft, Ag.mgDirection); mGood = good; mPerfect = prft; } //Debug.Log ("mGood :: SetSkillPositions" + mGood + "mPerfect :: SetSkillPositions"+ mPerfect); // Potion... if (pDidBuyPotion) { mGood *= 1.2f; mPerfect += 30f; } //[2012:11:09:LJK] Random Item Acc Good Perfect modified if (pEventPotion) { mPerfect += 20f; }//[2012:11:09:LJK] Random Item Acc Good Perfect modified float cen, sta; if (AgStt.mgGameTutorial) { cen = 241f; sta = cen - mGood * 0.5f; } else { cen = 300f; sta = cen - mGood * 0.5f; } //Ag.LogIntenseWord (" SetSkillPositions >>>>> mGood :: " + mGood + " mPerfect :: " + mPerfect + " sta : " + sta); arrArea.Add(new int[] { 1, (int)sta, (int)(sta + mGood) }); if (mPerfect > 0) // Regend card has no perfect area .... { InsertSmallArea(2, (int)(cen - 0.5f * mPerfect), (int)(cen + 0.5f * mPerfect)); } }
// additionalBuyFlag : 0 (no), 1 (additional) // public List<string> playerNamze = new List<string> (); // public List<int> backNum = new List<int> (); // 0 : cash, 1 : gold /* * public WasPurchaseCard () * { * string hangen = WWW.UnEscapeURL ("%EC%83%9D%EC%84%B1%EC%9E%90"); * Ag.LogString ("WasPurchaseCard :: Generation ... " + hangen); * * dlgt_WillSend = () => { * return User.arrCard.Count < 30; * }; * } */ public override void SendAction() { Ag.LogString("WasPurchaseCard :: SendAction ... Started ... "); User.arrNewCard.Clear(); SendStr = ""; SendStr = SendStr.AddCodeKeyKKOID(User, 220); SendStr = SendStr.AddKeyValue("option", option); SendStr = SendStr.AddKeyValue("eaNum", eaNum); SendStr = SendStr.AddKeyValue("leagueType", leagueType); SendStr = SendStr.AddKeyValue("formatVersion", 2); // Deck //SendStr = SendStr.AddKeyValue ("kind", kind); // SendStr = SendStr.AddArray ("backNum", JsonMapper.ToJson (backNum)); // SendStr = SendStr.AddArray ("playerName", JsonMapper.ToJson (playerName)); SendStr = SendStr.AddKeyValue("additionalBuyFlag", additionalBuyFlag); SendStr = SendStr.AddKeyValue("buyType", buyType, false); SendStr = SendStr.AddParen(); postAction += () => { Ag.LogString("WasPurchaseCard :: postAction " + RcvdStr); //JsonData jsData = JsonMapper.ToObject (RcvdStr); JSONNode jsCard = NdObj ["arrCard"]; if (Result.result == 0) { for (int k = 0; k < jsCard.Count; k++) { AmCard nuCard = new AmCard(); nuCard.WAS.WasCardParse(jsCard [k]); nuCard.ScouterParse(); if (User.GetCardIdOf(jsCard [k] ["ID"].AsInt) == null) { nuCard.KickOrder = -1; } User.arrNewCard.Add(nuCard); } } // Card Update .... WasCardUpdate bObj = new WasCardUpdate() { User = User }; bObj.messageAction = (int pInt) => { }; // 0 : 성공, -1 : 코인부족, -2 : 기타 에러 Ag.LogString("WasPurchaseCard :: postAction " + Result.result + " New Card : " + User.arrNewCard.Count); messageAction(Result.result); //Ag.LogString (((string)(jsData ["cash1"])).LogWith ("cash1") + ((string)(jsData ["cash2"])).LogWith ("cash2") + ((string)(jsData ["gold"])).LogWith ("gold")); }; SendAndRciv(); }
public AmCard xxGetFakeCard(string grade, bool isKicker) { AmCard rObj = new AmCard(); rObj.WAS.grade = grade; rObj.WAS.level = AgUtil.RandomInclude(0, 9); rObj.WAS.isKicker = isKicker; rObj.WAS.InitDirectionAndSkill(); rObj.WAS.ShowMySelf(); return(rObj); }
public void SetPolyGon(AmCard pPolyGonNum) { //// Debug.Log (" info " + pPolyGonNum.WAS.info + " iskicker " + pPolyGonNum.WAS.isKicker); if (pPolyGonNum.WAS.isKicker) { mPoly = (GameObject)Resources.Load("Kicker/Prefab/" + pPolyGonNum.WAS.look); } else { mPoly = (GameObject)Resources.Load("Keeper/Prefab/" + pPolyGonNum.WAS.look); } }
// _////////////////////////////////////////////////_ _____ Costume _____ Util _____ /// <summary> /// 카드가 갖고 있는 코스츔을 카드 내의 어레이에 저장. /// </summary> public void SetCostumeToCard() { //Ag.LogString (" SetCostumeToCard () 카드가 갖고 있는 코스츔을 카드 내의 어레이에 저장. "); ClearAllarrCostumeInCard(); // 일단 어레이 초기화. for (int k = 0; k < arrCostume.Count; k++) { if (arrCostume [k].WAS.cardId > 0) { AmCard theCard = GetCardIdOf(arrCostume [k].WAS.cardId); if (theCard != null) { theCard.arrCostumeInCard.Add(arrCostume [k]); // 채우기 } } } Ag.LogString(" SetCostumeToCard () End ..... >>>> "); }
void EnemyUniformSetting() { AmCard card = new AmCard(); Ag.LogString("Ag.NodeObj.EnemyUser.GetCardOrderOf (1)) :: " + Ag.NodeObj.EnemyUser.GetCardOrderOf(1).WAS.look); if (mEnemyPlayer == null) { mEnemyPlayer = (GameObject)Instantiate(SetPolyGon(Ag.NodeObj.EnemyUser.GetCardOrderOf(1))); } card = Ag.NodeObj.EnemyUser.GetCardOrderOf(1); mEnemyPlayer.transform.FindChild("deleveryBall").gameObject.SetActive(false); //mEnemyPlayer.transform.position = new Vector3 (-0.54f, 0f, -0.64f); mEnemyPlayer.transform.position = new Vector3(-0.5142088f, 0f, -0.7245067f); mEnemyPlayer.transform.localScale = new Vector3(0.4107453f, 0.4107453f, 0.4107453f); mEnemyPlayer.transform.eulerAngles = new Vector3(0, 358.9525f, 0); mEnemyPlayer.animation.Play("Match_Kicker_walk(131)"); try { EnemyUniform(); } catch { //Debug.Log ("Error"); } mEnemyPlayer.transform.FindChild("Clothes").renderer.materials [0].mainTexture = Shirts.mainTexture; mEnemyPlayer.transform.FindChild("Clothes").renderer.materials [1].mainTexture = Pants.mainTexture; mEnemyPlayer.transform.FindChild("Clothes").renderer.materials [2].mainTexture = Socks.mainTexture; //EnemyDataLoad = true; if (card.arrCostumeInCard.Count > 0) { for (int i = 0; i < card.arrCostumeInCard.Count; i++) { //Debug.Log ("CostumeNAme" + card.arrCostumeInCard [i].WAS.itemTypeId); PlayerCostume.instance.SetCostumeToPlayer(true, mEnemyPlayer, (card.arrCostumeInCard [i].WAS.itemTypeId)); } } else { PlayerCostume.instance.SetCostumeToPlayer(true, mEnemyPlayer, "KickerShoes01"); } Ag.LogString(" EnemyStart .... Done "); }
void DrawKickerbar() { mCard.WAS.ResetWidthAndSkill(); DirCard = new AmCard(); DirCard.mDirectObj.mWidth = new int[] { mCard.WAS.direction [0], mCard.WAS.direction [2], mCard.WAS.direction [4], mCard.WAS.direction [6] }; DirCard.mDirectObj.mPosition = new int[] { mCard.WAS.direction [1], mCard.WAS.direction [3], mCard.WAS.direction [5], mCard.WAS.direction [7] }; DirCard.SetDirectionArea(); int num = 0; num = DirCard.arrArea.Count; GameObject mGame; for (int i = 0; i < num; i++) { int[] curVal = (int[])DirCard.arrArea [i]; // 3, 15, 50 < posi, sta, end > int color = curVal [0]; int sta = curVal [1], end = curVal [2]; float staX = (float)(sta / 1000.0f); float width = (float)((end - sta) / 1000.0f); float staEnd = staX + width; mGame = (GameObject)Instantiate(Resources.Load("prefab_General/KickerBar")); mGame.transform.parent = dicMenuList ["Panel_directionbar_Kicker"].transform; mGame.transform.localPosition = new Vector3((staX * 508) - 254, 0, 0); mGame.GetComponent <UISprite> ().spriteName = "kickbar" + color; if (color == 0 && width * 510 < 0) { width = 0; } mGame.transform.localScale = new Vector3(width * 510, 24, 1); BarObj.Add(mGame); } }
public bool CanThisJoin2MainCards(AmCard pTarget, AmCard pAlter) { if (pTarget.WAS.playerID == pAlter.WAS.playerID) { return(true); } Ag.LogString("if (pTarget.WAS.playerID == pAlter.WAS.playerID) pass .... " + pTarget.WAS.playerID + " " + pAlter.WAS.playerID); for (int k = 0; k < 6; k++) { AmCard cur = GetCardOrderOf(k); Ag.LogString("if (cur.WAS.playerID == pAlter.WAS.playerID) Notpass .... " + cur.WAS.playerID + " " + pAlter.WAS.playerID); if (cur.WAS.playerID == pAlter.WAS.playerID) { return(false); } } Ag.LogString(" Can this join 2 main cards .... end ...... return true"); return(true); }
public void xx4Debug_MakeMyCardsGradeS(AmUser pUser) { int kickOdr = 1; bool keep = false; for (int k = 0; k < arrCard.Count; k++) { AmCard curCd = arrCard [k]; curCd.WAS.grade = "S"; curCd.WAS.InitDirectionAndSkill(); if (curCd.WAS.isKicker) { curCd.WAS.kickOrder = kickOdr < 6 ? kickOdr++ : -1; } else { curCd.WAS.kickOrder = keep ? -1 : 0; if (keep) { curCd.WAS.kickOrder = -1; } else { curCd.WAS.kickOrder = 0; keep = true; } } } // WasCardUpdate aObj = new WasCardUpdate () { User = pUser }; // aObj.messageAction = (int pInt) => { // switch (pInt) { // 0:성공, -1:캐쉬 부족, 1:잘못된 단위 // case 0: // Ag.LogString (" result : Success "); // return; // } // }; // }
void CommonStateMethods() { mStateArr.GetState("Begin").mEntryAction += () => { KakaoNativeExtension.Instance.loadGameFriends(onLoadGameFriendsComplete, onLoadGameFriendsError); arrMyScore = new List <bool> (); arrEnScore = new List <bool> (); mAllPoint = Ag.mgPrevScore = Ag.mySelf.myRank.mScore; SoundManager.Instance.Play_Effect_Sound("05_Crowd_etc"); CerCam.enabled = false; mIntroCam.enabled = true; Ag.NodeObj.ReMatchSent.InitSet(false); Ag.mRound = 0; if (AgStt.mgGameTutorial) { //ljk 11 11 TutorialBegin(); TutorialSetTextureCharacter(); } else { if (Ag.mgIsKick) { VoiceSoundManager.Instance.Play_Effect_Sound("voice/Pre-matchIntro(PlayerFirst)01"); myCard = Ag.NodeObj.MyUser.GetCardOrderOf(1); SetPolyGon(myCard); mPlayerKicker = (GameObject)Instantiate(mPoly); EnemCard = Ag.NodeObj.EnemyUser.GetCardOrderOf(0); // Debug.Log(" EnemCard.WAS.ID" +EnemCard.WAS.ID); SetPolyGon(EnemCard); mPlayerKeeper = (GameObject)Instantiate(mPoly); } else { VoiceSoundManager.Instance.Play_Effect_Sound("voice/Pre-matchIntro(OpponentFirst)1"); myCard = Ag.NodeObj.MyUser.GetCardOrderOf(0); SetPolyGon(myCard); mPlayerKeeper = (GameObject)Instantiate(mPoly); EnemCard = Ag.NodeObj.EnemyUser.GetCardOrderOf(1); SetPolyGon(EnemCard); mPlayerKicker = (GameObject)Instantiate(mPoly); KeeperRemoveTrailer(); } SetTextureCharacter(); } IntroAni(); }; mStateArr.GetState("CountDn").mEntryAction += () => { Ag.mgDirection = Ag.mgSkill = 0; Ag.NodeObj.Direction = Ag.NodeObj.Skill = 0; }; mStateArr.GetState("PreGame").mEntryAction += () => { //Ag.mySelf.ApplyDeckItemBeforeGame (); PreGameVoicePlay(); //voice Play CeremonyResultLabelEffInit(); if (Ag.GameStt.SomeoneOutPopupEnemyLeft) { dicGameSceneMenuList ["popup"].SetActive(true); dicGameSceneMenuList ["alert_someoneout"].SetActive(true); Ag.mgDidWin = true; Ag.NodeObj.GameFinish = true; // I won .. if (mStateArr.GetCurStateName() != "ShowEndingResult") { mStateArr.SetStateWithNameOf("EndingCeremony"); } } mFirstRewardGold = Ag.mySelf.mGold; Ag.mySelf.mRewardGold = 0; ItemEffInit(); //ItemEffInit dicGameSceneMenuList ["Panel_top"].SetActive(true); mIsKeeperSkl = 5; mDirLightFlag = false; mskillflag = true; mEffballflag = true; //mItemSlot.SetActive (true); mEventDirspeed = 0.8f; mEventSkillSpeed = 0.8f; SoundManager.Instance.Play_Effect_Sound("02_Crowd_Set"); mStage.InitCursorMove(0.8f, 800f); mCerCamAxis.SetActive(false); mDidDragStarted = false; mKeeperSetDir = false; mIntroCam.enabled = false; mStage.mIsTouched = true; CameraSet(); DestroyObject(mKickBall); mKickBall = (GameObject)Instantiate(Resources.Load("prefab_Polygon/Ball/Ball")); if (AgStt.mgGameTutorial) { TutoriPreGame(); // 여 기 에 myCard = 이 들 어 가 야 함... //mCurPlayer = Ag.mySelf.mCurPlayer; //GetKicker( 1 ); //mCurEnem = Ag.myEnem.mCurPlayer; //.GetGoulKeeper(); } else { if (Ag.mgIsKick) // ljk 11 11 { myCard = Ag.NodeObj.MyUser.GetCardOrderOf((PlayerOrderNum % 5) + 1); myCard.SetDirectionPosition(); myCard.SetDirectionArea(); //Ag.LogString (" myCard count " + myCard.arrArea.Count); PlayerOrderNum++; } else { EnemCard = Ag.NodeObj.EnemyUser.GetCardOrderOf((EnemyOrderNum % 5) + 1); for (int i = 0; i < EnemCard.WAS.direction.Length; i++) { //Ag.LogString (" EnemCard.WAS.direction :: i " + i + " >>>> " + EnemCard.WAS.direction [i].ToString ()); } EnemCard.SetDirectionPosition(); EnemCard.SetDirectionArea(); EnemyOrderNum++; } } if (AgStt.mgGameTutorial) { TutorialSetTextureCharacter(); } else { if (Ag.mgIsKick) { KickerScenePlay(false); SetKickerDir(true); StartCoroutine(ShowKickerFX2(1.8f)); DestroyObject(mPlayerKicker); DestroyObject(mPlayerKeeper); SetPolyGon(myCard); mPlayerKicker = (GameObject)Instantiate(mPoly); EnemCard = Ag.NodeObj.EnemyUser.GetCardOrderOf(0); SetPolyGon(EnemCard); //Debug.Log ("EnemCard :: "+ EnemCard.WAS.look); mPlayerKeeper = (GameObject)Instantiate(mPoly); if (myCard.arrCostumeInCard.Count > 0) { for (int i = 0; i < myCard.arrCostumeInCard.Count; i++) { //// Debug.Log ("CostumeNAme" + myCard.arrCostumeInCard [i].WAS.itemTypeId); PlayerCostume.instance.SetCostumeToPlayer(true, mPlayerKicker, (myCard.arrCostumeInCard [i].WAS.itemTypeId)); } } else { PlayerCostume.instance.SetCostumeToPlayer(true, mPlayerKicker, "KickerShoes01"); } if (EnemCard.arrCostumeInCard.Count > 0) { for (int i = 0; i < EnemCard.arrCostumeInCard.Count; i++) { // Debug.Log ("CostumeNAme" + EnemCard.arrCostumeInCard [i].WAS.itemTypeId); PlayerCostume.instance.SetCostumeToPlayer(false, mPlayerKeeper, (EnemCard.arrCostumeInCard [i].WAS.itemTypeId)); } } else { PlayerCostume.instance.SetCostumeToPlayer(false, mPlayerKeeper, "KeeperGloves01"); } if (!AgStt.mgGameTutorial) { dicGameSceneMenuList ["Keeperinfo"].SetActive(true); EnemyKeeperInfo(); } mBall = mPlayerKicker.transform.FindChild("deleveryBall").gameObject; //LJk 2013 07 25 mBall.transform.renderer.enabled = false; PreAni(); DrawGuideLineNew(); StartCoroutine(CaptureImage()); } else { dicGuideObjectPos = new Dictionary <int, float> (); dicGuideObjectWidth = new Dictionary <int, float> (); DrawGuideLineNew(); if (!AgStt.mgGameTutorial) { StartCoroutine(SmallinfoFlag(1f)); } if (AgStt.mgGameTutorial) { StartCoroutine(TutorinfoFlag(1f)); } //Debug.Log ("backGreenItemPosition Pregame " + dicGameSceneMenuList["Anim_back_green"].gameObject.transform.localPosition.y); //mPlayerInfoDirflag = true; mIsKeeperSkl = 0; mPlayerInfoX = 0.224f; mPlayerInfoY = 0.7f; mPlayerInfowid = 0f; MplayerInfoHeight = 0.2078125f; //KickinfoPlag = false; StartCoroutine(KeeperinfoAni(2.5f)); if (!AgStt.mgGameTutorial) { StartCoroutine(PlayerinfobarFlag(0.5f)); } DragNum = 0; KickerScenePlay(false); //Ag.LogString ("Number >>> " + Ag.mySelf.arrAllPlayer.Count); //GuideKeeperViewAni (); DestroyObject(mPlayerKicker); DestroyObject(mPlayerKeeper); SetPolyGon(EnemCard); mPlayerKicker = (GameObject)Instantiate(mPoly); myCard = Ag.NodeObj.MyUser.GetCardOrderOf(0); SetPolyGon(myCard); mPlayerKeeper = (GameObject)Instantiate(mPoly); //Debug.Log ("backGreenItemPosition Pregame " + dicGameSceneMenuList["Anim_back_green"].gameObject.transform.localPosition.y); if (EnemCard.arrCostumeInCard.Count > 0) { for (int i = 0; i < EnemCard.arrCostumeInCard.Count; i++) { // Debug.Log ("CostumeNAme" + EnemCard.arrCostumeInCard [i].WAS.itemTypeId); PlayerCostume.instance.SetCostumeToPlayer(true, mPlayerKicker, (EnemCard.arrCostumeInCard [i].WAS.itemTypeId)); } } else { PlayerCostume.instance.SetCostumeToPlayer(true, mPlayerKicker, "KickerShoes01"); } if (myCard.arrCostumeInCard.Count > 0) { for (int i = 0; i < myCard.arrCostumeInCard.Count; i++) { // Debug.Log ("CostumeNAme" + myCard.arrCostumeInCard [i].WAS.itemTypeId); PlayerCostume.instance.SetCostumeToPlayer(false, mPlayerKeeper, (myCard.arrCostumeInCard [i].WAS.itemTypeId)); } } else { PlayerCostume.instance.SetCostumeToPlayer(false, mPlayerKeeper, "KeeperGloves01"); } if (!AgStt.mgGameTutorial) { dicGameSceneMenuList ["Kickerinfo"].SetActive(true); } EnemyKickerinfo(); mBall = mPlayerKicker.transform.FindChild("deleveryBall").gameObject.gameObject; //LJK 07:25 mBall.transform.renderer.enabled = false; dicGameSceneMenuList ["Panel_keeperarrow_Main"].SetActive(true); DragPositionF(true); PreAni(); StartCoroutine(CaptureImage()); } SetTextureCharacter(); } KeeperRemoveTrailer(); }; mStateArr.GetState("Ceremony").mEntryAction += () => { ShowWinORLose_Label_Eff(); }; }
//public int buyType; // "arrItem":["itemTypeID":"CardCombiAdvt" ,"itemTypeID":"CardCombiAdvtHigh" ,"itemTypeID":"CardCombiGrade"]} public override void SendAction() { Ag.LogString("WasCardCombi :: SendAction ... Started ... "); User.arrNewCard.Clear(); SendStr = ""; SendStr = SendStr.AddCodeKeyKKOID(User, 253); SendStr = SendStr.AddKeyValue("formatVersion", 2); SendStr = SendStr.AddKeyValue("cardID1", cardID1); SendStr = SendStr.AddKeyValue("cardID2", cardID2); SendStr = SendStr.AddKeyValue("cardID3", cardID3); SendStr = SendStr.AddKeyValue("buyType", User.GetBuyType("FunCardMix")); string strArr = ""; // 0 일 때 에러 안나게 if (arrItemStr.Count == 0) { SendStr = SendStr.AddArray("arrItem", "[]"); } else { for (int k = 0; k < arrItemStr.Count; k++) { string curStr = ""; curStr = curStr.AddKeyValue("itemTypeID", arrItemStr [k], false); //, ; curStr = curStr.AddParen(); strArr += curStr; if (k != (arrItemStr.Count - 1)) { strArr += ","; } } strArr = strArr.AddSqreBrakt(); SendStr = SendStr.AddArray("arrItem", strArr, false); } SendStr = SendStr.AddParen(); postAction += () => { Ag.LogString("WasCardCombi :: postAction " + RcvdStr); //JsonData jsUInfo = JsonMapper.ToObject (RcvdStr); if (Result.result == 0) { JSONNode contJs = NdObj ["cardInfoRslt"]; contJs.ToString().HtLog(); Ag.LogString("WasCardCombi :: postAction .. >>>> next step is messageAction "); AmCard theCard = new AmCard(); theCard.WAS.WasCardParse(contJs); theCard.ScouterParse(); if (User.GetCardIdOf(contJs ["ID"].AsInt) == null) { theCard.KickOrder = -1; } User.arrNewCard.Add(theCard); theCard.mustUpdate = true; // Card Update .... WasCardUpdate bObj = new WasCardUpdate() { User = User }; bObj.messageAction = (int pInt) => { }; } messageAction(Result.result); }; SendAndRciv(); }
public override void SendAction() { Ag.LogString("WasCardUpdate :: SendAction ... Started ... " + arrSendCard.Count); SendStr = ""; SendStr = SendStr.AddCodeKeyKKOID(User, 310); SendStr = SendStr.AddKeyValue("formatVersion", 1); arrSendCard.AddRange(User.arrNewCard); arrSendCard.AddRange(User.GetUpdateCards()); Ag.LogString(" WasCardUpdate :: Update Cards Number >>> " + arrSendCard.Count); string strArr = ""; int count = arrSendCard.Count > 8 ? 8 : arrSendCard.Count; //int count = arrSendCard.Count > 5 ? 5 : arrSendCard.Count; for (int i = 0; i < count; i++) { AmCard uObj = arrSendCard [i]; (" i = " + i).HtLog(); try { //uObj.WAS.SetInfoString(); uObj.WAS.ShowMySelf(); } catch { uObj.WAS.skill = new int[] { 0, 0, 0 }; } strArr += uObj.WAS.ToJsonStr(); // JsonMapper.ToJson (uObj.WAS).ToString () + " , "; if (i != (arrSendCard.Count - 1)) { strArr += ","; } } strArr = strArr.AddSqreBrakt(); // [ ] SendStr = SendStr.AddArray("arrCardInfo", strArr, false); SendStr = SendStr.AddParen(); postAction += () => { Ag.LogString("WasCardUpdate :: postAction " + RcvdStr); //JsonData jsUInfo = JsonMapper.ToObject (RcvdStr); // 0 : 성공 if (Result.result == 0) { for (int i = 0; i < count; i++) { arrSendCard [i].UpdatedPerformed(); } } if (User.GetUpdateCards().Count > 0) { WasCardUpdate mObj = new WasCardUpdate() { User = User }; mObj.messageAction = (int pInt) => { mObj = null; }; } Ag.LogString("WasCardUpdate :: postAction .. >>>> next step is messageAction "); messageAction(Result.result); }; SendAndRciv(); }
// _////////////////////////////////////////////////_ _///////////////////////_ _____ Set Frames _____ 2 * Single Row _____ void SetDoubleHor1Row() { // _////////////////////////////////////////////////_ _____ General Option 양 프레임에 공통 적용 _____ //optObj = new CuUiOption (HoldLimit: 30, SelDist: 0.5f, FlyingSpdMin: 0.05f, SpdLimit: 3f); optObj = new CuUiOption(HoldLimit: 5, SelDist: 1.2f, FlyingSpdMin: 0.05f, SpdLimit: 3f); mTouch = new CuTouch(optObj); mLiaison = new CuLiaison(); // Frame Setting .. Upper Frame int eaX = 5, eaY = 1; // 셀의 갯수. 삽입될 것 고려해서 충분히 잡을 것. // _////////////////////////////////////////////////_ _____ Frame Option _____ optFrame = new CuFrameOption(optObj, Vert: false, MoveAniSpd: 200, SizeAniSpd: 100, SelectSize: 1.2f, SwitchSize: 0.9f, SwitchInFrame: false); // Set Touch Manager float dimX, dimY; // 셀의 크기. Vector3 vecOri, vecMax; // 스크린 좌하/우상 좌표 가져오기. (월드 좌표계로 변환) muiCam.GetComponent <UICam> ().GetWorldPointsOfCurScreen(out vecOri, out vecMax); dimX = (vecMax.x - vecOri.x) / 5; //7; // 스크린 크기를 기준으로 셀의 크기를 정한다. dimY = (vecMax.y - vecOri.y) / 3; //8; Ag.LogDouble(" TileUITest :: Screen World Points .. " + vecOri.LogWith("world 1") + vecMax.LogWith("world 2") + Ag.mgScrX.LogWith("ScrX") + Ag.mgScrY.LogWith("ScrY")); AgUiManDoubleRow theMan = new AgUiManDoubleRow("UPFR", mTouch, optFrame, muiCam); theMan.SetFrame(eaX: eaX, eaY: eaY, reverse: false, xyTchFrame: new float[] { 0.1f, // Xmin 0.55f, // Ymin 0.9f, // Xmax 0.9f, // Ymax 0.1f, 0.55f, 0.9f, // Xmax 0.9f }); Ag.LogDouble(" TileUI Test :: Setting >>> Vects " + vecOri + ", " + vecMax + " >> dimX/Y : " + dimX + " / " + dimY); // Set Wagu, Container ... TIle Manager ... Vector3 boxScale = new Vector3(dimX * 0.8f, dimY * 0.8f, 0.5f); // 크기 조절. int serialN = 0; /*for (int ii=0; ii < eaY; ii++) { * for (int k=0; k < eaX; k++) { * GameObject curObj = mRscrcMan.GetPrefabAt (Folder: "_TestMoon", pName: "ATile"); * curObj.name = "UP_BOX_" + serialN++; //k.ToString() + ii; * curObj.transform.renderer.material.mainTexture = mRscrcMan.GetTextureIn ("Download", "Item" + (serialN % 10 + 1)); * curObj.transform.localScale = boxScale; * curObj.CellCs ().InitPstnSize (optFrame); * * AmCard playerCard = new AmCard (pGrade: AgUtil.RandomInclude (0, 20), pType: 5, pWthr: "CLOUD"); // Type, Grade, Weather .. setting ... * curObj.CellCs ().PlCard = playerCard; * * string kind = "TEST"; // serialN < 3 ? "ATTK" : "DPNC" ; * theMan.AddACell (curObj, k, ii, kind); * * Ag.LogString (" Add a Cell " + curObj.name + " " + k.LogWith ("X") + ii.LogWith ("Y")); * } * } */ mTouch.evntTouchDown += theMan.CheckInside; // 필수. //mTouch.evntDrag += theMan.Scroll; // 스크롤 가능하게 //theMan.dodgeScroll += theMan.DidSelected; //theMan.dodgeScrollArea += theMan.OutOfMyTouchArea; mTouch.evntHold += theMan.SelectNearest; mTouch.evntHoldMove += theMan.SwitchCombination; // Empty Cell 스위치 가능하게.. ##### theMan.dodgeSwitchCombi += theMan.IsFrameOffLimit; //mTouch.evntHoldMove += theMan.AutoScroll; theMan.dodgeSelectNear += theMan.DidSelected; theMan.dodgeSelectNear += theMan.IsFrameOffLimit; theMan.dodgeSelectNearestArea += theMan.OutOfMyTouchArea; mTouch.evntTouchUp += mLiaison.InsertRemove; //mTouch.evntInitFly = theMan.InitiateFly; //theMan.evntFlyBack = theMan.FlyBack; //theMan.dodgeAutoScrlArea += theMan.OutOfMyTouchArea; //theMan.dodgeAutoScrl += theMan.SelectObjIsNull; theMan.evntAlienCame = theMan.AlienCame_SetSwitchObj; mTouch.evntTouchUp += theMan.RelaseProcess; // Put @ Last ... theMan.mLiaison = mLiaison; arrMan.Add(theMan); // Frame Setting .. Lower Frame eaX = 15; eaY = 1; // 셀의 갯수. 삽입될 것 고려해서 충분히 잡을 것. // _////////////////////////////////////////////////_ _____ Frame Option _____ optFrame = new CuFrameOption(optObj, Vert: false, MoveAniSpd: 100, SizeAniSpd: 100, SelectSize: 1.2f, SwitchSize: 0.9f, SwitchInFrame: false); // Set Touch Manager muiCam.GetComponent <UICam> ().GetWorldPointsOfCurScreen(out vecOri, out vecMax); dimX = (vecMax.x - vecOri.x) / 6; //7; // 스크린 크기를 기준으로 셀의 크기를 정한다. dimY = (vecMax.y - vecOri.y) / 3; //8; Ag.LogDouble(" TileUITest :: Screen World Points .. " + vecOri.LogWith("world 1") + vecMax.LogWith("world 2") + Ag.mgScrX.LogWith("ScrX") + Ag.mgScrY.LogWith("ScrY")); theMan = new AgUiManDoubleRow("LOWR", mTouch, optFrame, muiCam); //, new float[] { vecOri.x * 0.9f, vecMax.x*0.9f, vecOri.y*0.9f, vecMax.y*0.9f } ); theMan.SetFrame(eaX: eaX, eaY: eaY, reverse: false, xyTchFrame: new float[] { 0.1f, // Xmin 0.05f, // Ymin 0.9f, // Xmax 0.45f, // Ymax 0.1f, 0.05f, 2.5f, 0.45f }); Ag.LogDouble(" TileUI Test :: Setting >>> Vects " + vecOri + ", " + vecMax + " >> dimX/Y : " + dimX + " / " + dimY); Ag.LogString(" Option " + optFrame.optMoveAniSpd.LogWith("AniSpd")); // Set Wagu, Container ... TIle Manager ... //new float[] { vecOri.x, vecMax.x, vecOri.y, vecMax.y } ); boxScale = new Vector3(dimX * 0.8f, dimY * 0.8f, 0.5f); // 크기 조절. serialN = 0; // for (int k=0; k< eaX - 6; k++) { // 12를 기본으로 넣고.. 6개까지 추가 가능. // for (int ii=0; ii< 1; ii++) { for (int ii = 0; ii < eaY; ii++) { for (int k = 0; k < eaX; k++) { GameObject curObj = mRscrcMan.GetPrefabAt(Folder: "_TestMoon", pName: "ATile"); curObj.name = "LW_BOX_" + serialN++; //k.ToString() + ii; curObj.transform.renderer.material.mainTexture = mRscrcMan.GetTextureIn("Download", "Item" + (serialN % 10 + 1)); curObj.transform.localScale = boxScale; curObj.CellCs().InitPstnSize(optFrame); AmCard playerCard = new AmCard(pGrade: AgUtil.RandomInclude(0, 20), pType: 5, pWthr: "CLOUD"); // Type, Grade, Weather .. setting ... curObj.CellCs().PlCard = playerCard; string kind = "TEST"; // serialN < 3 ? "ATTK" : "DPNC" ; theMan.AddACell(curObj, k, ii, kind); Ag.LogString(" Add a Cell " + curObj.name + " " + k.LogWith("X") + ii.LogWith("Y")); } } mTouch.evntTouchDown += theMan.CheckInside; mTouch.evntDrag += theMan.Scroll; theMan.dodgeScroll += theMan.DidSelected; theMan.dodgeScrollArea += theMan.OutOfMyTouchArea; mTouch.evntHold += theMan.SelectNearest; // Normal Switch //mTouch.evntHoldMove += theMan.Switch; mTouch.evntHoldMove += theMan.SwitchCombination; // Empty Cell 스위치 가능하게.. ##### theMan.dodgeSwitchCombi += theMan.IsFrameOffLimit; theMan.dodgeSelectNear += theMan.DidSelected; theMan.dodgeSelectNear += theMan.IsFrameOffLimit; theMan.dodgeSelectNearestArea += theMan.OutOfMyTouchArea; mTouch.evntTouchUp += theMan.RelaseProcess; mTouch.evntInitFly += theMan.InitiateFly; theMan.evntFlyBack += theMan.FlyBack; //touchObj.evntAutoScrl += theMan.AutoScroll; theMan.dodgeAutoScrlVec += theMan.OutOfMyTouchArea; theMan.dodgeAutoScrl += () => { return(true); }; // Liaison Related .. theMan.evntAlienCame = theMan.AlienCame_SetSwitchObj; theMan.mLiaison = mLiaison; arrMan.Add(theMan); }
/// <summary> /// I am Enemy .. 에너미를 봇으로 세팅 /// Bots the uniform card rank item setting. /// </summary> public void BotUniformCardRankItemSetting() { // Uniform Setting. //Ag.mVirServer.BotIDSetting (); arrUniform = new List <AmUniform> (); arrUniform.Add(Ag.mVirServer.SetUniform(Ag.mVirServer.maiGradeOfBot)); //, arrUniform [0]); // 봇은 유니폼 1개만 필요. Ag.LogIntenseWord(" BotUniformCardRankItemSetting " + arrUniform.Count); arrUniform [0].ShowMySelf(); // Card Setting arrCard = new List <AmCard> (); // _____ Set Keeper AmCard aCard = new AmCard(); aCard.WAS.SetVarInBot(false, Ag.mySelf.GetBotGrade(), AgUtil.RandomInclude(0, 4)); aCard.WAS.isKicker = false; aCard.WAS.kickOrder = 0; aCard.WAS.InitDirectionAndSkill(); aCard.SetBotScouter(); aCard.SetBotPlayerInfo(); aCard.WAS.ShowMySelf(); arrCard.Add(aCard); // _____ Set Kicker for (int k = 0; k < 5; k++) { aCard = new AmCard(); //aCard.WAS.SetVarInBot (true, "C", AgUtil.RandomInclude (0, 4)); aCard.WAS.SetVarInBot(true, Ag.mySelf.GetBotGrade(), AgUtil.RandomInclude(0, 4)); aCard.WAS.InitDirectionAndSkill(); aCard.SetBotScouter(); aCard.SetBotPlayerInfo(); aCard.WAS.isKicker = true; aCard.WAS.kickOrder = k + 1; aCard.WAS.ShowMySelf(); arrCard.Add(aCard); } myRank.SetAsBot(Ag.mySelf.LeagueAsInt, Ag.mySelf.myRank); Ag.NodeObj.EnemyUser = Ag.myEnem; Ag.LogString("WeekWinNum" + Ag.NodeObj.EnemyUser.myRank.WAS.winNumWeek); // Item Setting arrItem = new List <AmItem> (); // Message AmItem aItm = new AmItem(); aItm.WAS.itemTypeID = "StartMessage"; aItm.SetVarInBot(); arrItem.Add(aItm); aItm = new AmItem(); aItm.WAS.itemTypeID = "EndMessage"; aItm.SetVarInBot(); arrItem.Add(aItm); aItm = new AmItem(); aItm.WAS.itemTypeID = "CeremonyDefault"; aItm.SetVarInBot(); arrItem.Add(aItm); }
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); }
// _////////////////////////////////////////////////_ _____ ... _____ xxx _____ public bool Result(AmCard pCurCard = null) { Ag.LogStartWithStr(2, " AmServer :: Result "); (" " + Ag.mgIsKick.ShowBool(" My Roll : ", "Kick", "Keep") + " Bot Grade >>> " + maiGradeOfBot + " <<< ").HtLog(); (" " + pCurCard.WAS.isKicker.ShowBool(" CurCard :", "Kicker", "Keeper") + " <<< ").HtLog(); (" Kick Order : " + pCurCard.WAS.kickOrder + " polygon : " + pCurCard.WAS.info).HtLog(); pCurCard.mDirectObj.ShowMyself(); // Generate Enemy Direction if (Ag.mgIsKick) { // Apply my Info to enem direction.. Ag.mgEnemDirec = pCurCard.SetKeeperDirect(maiGradeOfBot); //Ag.mgEnemDirec = Ag.mySelf.mCurPlayer.SetKeeperDirect (maiGradeOfBot); //Ag.mySelf.mCurPlayer.mDirectObj.GetWideRandomDirect( pApplyWidth:false ); } else { Ag.mgEnemDirec = pCurCard.SetKickerDirect(maiGradeOfBot); //Ag.mgEnemDirec = Ag.myEnem.mCurPlayer.SetKickerDirect (maiGradeOfBot); // Ag.myEnem.mCurPlayer.mDirectObj.GetWideRandomDirect( true ); } Ag.LogIntenseWord(" AmServer :: Result >>>>> >>>>> " + Ag.mgIsKick.ShowBool(" I am ", " Kicker ", " Keeper ") + " Ag.mgEnemDirec " + Ag.mgEnemDirec); // Generate Enemy Skill System.Random rObj = new System.Random(); int great = 0, ddong = 0; switch (maiGradeOfBot) { case 0: great = 20; break; case 1: ddong = 20; break; case 2: ddong = 10; great = 10; break; case 3: great = 20; break; case 4: great = 40; break; } if (rObj.GetRandomTrue(great)) { Ag.mgEnemSkill = 2; } else { Ag.mgEnemSkill = 1; } // if (!Ag.mgIsKick && rObj.GetRandomTrue (perfect)) // Ag.mgEnemSkill = 3; if (rObj.GetRandomTrue(ddong)) { Ag.mgEnemSkill = 0; } Ag.LogIntenseWord(" AmServer :: Result Dir / Skl :: " + Ag.mgEnemDirec + " / " + Ag.mgEnemSkill); return(true); // if (Ag.mgIsKick) { // Ag.mgEnemDirec = 1; // Ag.mgEnemSkill = 1; // } // // Debugging Log ... // Ag.LogString (" AmServer :: Result Enemy Direct >> " + Ag.mgEnemDirec + " Enemy Skill >> " + Ag.mgEnemSkill); // // // Kick Result Matrix ... 1: Goul, 2: No goul, 3: Special case.. // byte[,,] resultMat = new byte[2, 3, 3] { { { 2, 1, 1 }, { 2, 2, 1 }, { 2, 2, 2 } }, // Same Direction // { Miss } { Normal } { Miracle } // { { 2, 1, 1 }, { 2, 1, 1 }, { 2, 3, 1 } } // }; // Different Direction // // Set Variables... // byte kickDir, kickSkl, keepDir, keepSkl; // if (Ag.mgIsKick) { // kickDir = Ag.mgDirection; // kickSkl = Ag.mgSkill; // keepDir = Ag.mgEnemDirec; // keepSkl = Ag.mgEnemSkill; // Ag.LogString (" AmServer :: Result myDir kick Dir / Skl : " + kickDir + " / " + kickSkl + " enDir keep Dir / Skl : " + keepDir + " / " + keepSkl); // // } else { // keepDir = Ag.mgDirection; // keepSkl = Ag.mgSkill; // kickDir = Ag.mgEnemDirec; // kickSkl = Ag.mgEnemSkill; // Ag.LogString (" AmServer :: Result myDir keep Dir / Skl : " + keepDir + " / " + keepSkl + " enDir kick Dir / Skl : " + kickDir + " / " + kickSkl); // } // // // Kicker's DDong ball Case .... No goul... // if (kickDir == 0 || kickSkl == 0) // return ResultSub (2); // // // Kicker's Perfect Kick ... Always Goul // if (kickSkl == 3) // return ResultSub (1); // // // Check Panenka Kick // if (kickDir == 5) { // skill is 1 ... // if (keepDir != 0 && keepSkl == 2) // return ResultSub (1); // Goul.. // else // return ResultSub (2); // No Goul.. // } // // // Use Kick Result Matrix ... // int nRes = resultMat [kickDir == keepDir ? 0 : 1, keepSkl, kickSkl]; // // if (nRes == 3) { // if (kickDir % 2 == keepDir % 2) // nRes = 2; // No goul // else // nRes = 1; // Goul in. // } // if (kickDir == 0) // nRes = 2; // kick fail.. // // Ag.LogNewLine (4); // return ResultSub (nRes); }
// _////////////////////////////////////////////////_ _///////////////////////_ _____ Set Frames _____ 2 * Single Row _____ void SetDoubleHor1Row() { // _////////////////////////////////////////////////_ _____ General Option 양 프레임에 공통 적용 _____ optObj = new CuUiOption(HoldLimit: 30, SelDist: 0.5f, FlyingSpdMin: 0.05f, SpdLimit: 3f); mTouch = new CuTouch(optObj); mTouchCardMix = new CuTouch(optObj); mLiaison = new CuLiaison(); mLiaisonMix = new CuLiaison(); //arrGameObj.Clear (); // Frame Setting .. Upper Frame int eaX = 11, eaY = 1; // 셀의 갯수. 삽입될 것 고려해서 충분히 잡을 것. // _////////////////////////////////////////////////_ _____ Frame Option _____ CuFrameOption optFrame = new CuFrameOption(optObj, Vert: false, MoveAniSpd: 100, SizeAniSpd: 100, SelectSize: 1.3f, SwitchSize: 0.9f); arrFrameOpt.Add(optFrame); // Set Touch Manager float dimX, dimY; // 셀의 크기. Vector3 vecOri, vecMax; // 스크린 좌하/우상 좌표 가져오기. (월드 좌표계로 변환) muiCam.GetComponent <UICam> ().GetWorldPointsOfCurScreen(out vecOri, out vecMax); dimX = (vecMax.x - vecOri.x) / 400; //7; // 스크린 크기를 기준으로 셀의 크기를 정한다. dimY = (vecMax.y - vecOri.y) / 300; //8; Ag.LogDouble(" TileUITest :: Screen World Points .. " + vecOri.LogWith("world 1") + vecMax.LogWith("world 2") + Ag.mgScrX.LogWith("ScrX") + Ag.mgScrY.LogWith("ScrY")); AgUiManDoubleRow theMan = new AgUiManDoubleRow("UPFR", mTouch, optFrame, muiCam); theMan.SetFrame(eaX: eaX, eaY: eaY, reverse: false, xyTchFrame: new float[] { 0.1f, // Xmin 0.46f, // Ymin 0.88f, // Xmax 0.8f, // Ymax 0.1f, 0.46f, 1.78f, 0.8f }); Ag.LogDouble(" TileUI Test :: Setting >>> Vects " + vecOri + ", " + vecMax + " >> dimX/Y : " + dimX + " / " + dimY); // Set Wagu, Container ... TIle Manager ... Vector3 boxScale = new Vector3(dimX * 0.8f, dimY * 0.9f, 0.5f); // 크기 조절. int serialN = 0; for (int ii = 0; ii < eaY; ii++) { for (int k = 0; k < eaX; k++) { /* * GameObject curObj; * * curObj.name = "UP_BOX_" + serialN++; //k.ToString() + ii; * curObj.transform.renderer.material.mainTexture = mRscrcMan.GetTextureIn ("Download", "Item" + (serialN % 10 + 1)); * curObj.transform.localScale = boxScale; * curObj.CellCs ().InitPstnSize (optFrame); */ AmCard playerCard = new AmCard(pGrade: 3, pType: 5, pWthr: "CLOUD"); // Type, Grade, Weather .. setting ... //--------------------------------------------------- if (k < 1) { curObj = mRscrcMan.GetPrefabAt(Folder: "_TestMoon", pName: "KPtitleA"); } playerCard = new AmCard(pGrade: 1, pType: 1, pWthr: "CLOUD"); for (int j = 1; j < 1; j++) { curObj.transform.FindChild("star/star" + j).gameObject.SetActive(false); } if (k >= 1 && 6 > k) { curObj = mRscrcMan.GetPrefabAt(Folder: "_TestMoon", pName: "KtitleA"); playerCard = new AmCard(pGrade: 2, pType: 2, pWthr: "CLOUD"); for (int j = 1; j < 2; j++) { curObj.transform.FindChild("star/star" + j).gameObject.SetActive(false); } } if (k >= 6 && 9 > k) { curObj = mRscrcMan.GetPrefabAt(Folder: "_TestMoon", pName: "KtitleB"); playerCard = new AmCard(pGrade: 3, pType: 3, pWthr: "CLOUD"); for (int j = 1; j < 3; j++) { curObj.transform.FindChild("star/star" + j).gameObject.SetActive(false); } } if (k >= 9 && 12 > k) { curObj = mRscrcMan.GetPrefabAt(Folder: "_TestMoon", pName: "KtitleC"); playerCard = new AmCard(pGrade: 4, pType: 4, pWthr: "CLOUD"); for (int j = 1; j < 4; j++) { curObj.transform.FindChild("star/star" + j).gameObject.SetActive(false); } } if (k >= 12 && 16 > k) { curObj = mRscrcMan.GetPrefabAt(Folder: "_TestMoon", pName: "KtitleD"); playerCard = new AmCard(pGrade: 5, pType: 5, pWthr: "CLOUD"); for (int j = 1; j < 5; j++) { curObj.transform.FindChild("star/star" + j).gameObject.SetActive(false); } } if (k >= 16) { curObj = mRscrcMan.GetPrefabAt(Folder: "_TestMoon", pName: "KtitleS"); playerCard = new AmCard(pGrade: 1, pType: 1, pWthr: "CLOUD"); for (int j = 1; j < 1; j++) { curObj.transform.FindChild("star/star" + j).gameObject.SetActive(false); } } curObj.name = "Cardmix_" + serialN++; //k.ToString() + ii; curObj.transform.localScale = boxScale; curObj.CellCs().InitPstnSize(optFrame); (" " + optFrame.optSelectSize).HtLog(); arrGameObj.Add(curObj); /* * for (int j=1; j<(serialN % 5 +1); j++) { * curObj.transform.FindChild ("star/star" + j).gameObject.SetActive (false); * } */ curObj.transform.FindChild("Plane_playerface").gameObject.GetComponent <UIButtonMessage> ().target = curObj; //----------------------------------------------------- curObj.CellCs().PlCard = playerCard; string kind = serialN < 3 ? "ATTK" : "DPNC"; //theMan.AddACell (curObj, k, ii, kind); if (k < 1) { curObj.transform.FindChild("Plane_playerface").gameObject.transform.renderer.material.mainTexture = mRscrcMan.GetTextureIn("Download/playerface", "Keeper0" + (serialN % 2 + 1)); theMan.AddACell(curObj, k, ii, "Keeper", false); } else { curObj.transform.FindChild("Plane_playerface").gameObject.transform.renderer.material.mainTexture = mRscrcMan.GetTextureIn("Download/playerface", "Kicker0" + (serialN % 8 + 1)); theMan.AddACell(curObj, k, ii, "Kicker", false); } Ag.LogString(" Add a Cell " + curObj.name + " " + k.LogWith("X") + ii.LogWith("Y")); } } mTouch.evntTouchDown += theMan.CheckInside; // 필수. mTouch.evntDrag += theMan.Scroll; // 스크롤 가능하게 theMan.dodgeScroll += theMan.DidSelected; theMan.dodgeScrollArea += theMan.OutOfMyTouchArea; mTouch.evntHold += theMan.SelectNearest; mTouch.evntHoldMove += theMan.Switch; // 스위치 가능하게.. mTouch.evntHoldMove += theMan.AutoScroll; theMan.dodgeSelectNear += theMan.DidSelected; theMan.dodgeSelectNearestArea += theMan.OutOfMyTouchArea; mTouch.evntTouchUp += theMan.RelaseProcess; mTouch.evntInitFly = theMan.InitiateFly; theMan.evntFlyBack = theMan.FlyBack; theMan.dodgeAutoScrlVec += theMan.OutOfMyTouchArea; theMan.dodgeAutoScrl += theMan.SelectObjIsNull; theMan.dodgeAutoScrl += theMan.IsFrameOffLimit; theMan.evntAlienCame = theMan.AlienCame_SetSwitchObj; theMan.mLiaison = mLiaison; //arrManCardMix.Add (theMan); arrMan.Add(theMan); // Frame Setting .. Lower Frame eaX = 18; eaY = 1; // 셀의 갯수. 삽입될 것 고려해서 충분히 잡을 것. // _////////////////////////////////////////////////_ _____ Frame Option _____ optFrame = new CuFrameOption(optObj, Vert: false, MoveAniSpd: 100, SizeAniSpd: 100, SelectSize: 1.2f, SwitchSize: 0.9f, SwitchInFrame: false); arrFrameOpt.Add(optFrame); // Set Touch Manager muiCam.GetComponent <UICam> ().GetWorldPointsOfCurScreen(out vecOri, out vecMax); dimX = (vecMax.x - vecOri.x) / 400; //7; // 스크린 크기를 기준으로 셀의 크기를 정한다. dimY = (vecMax.y - vecOri.y) / 300; //8; Ag.LogDouble(" TileUITest :: Screen World Points .. " + vecOri.LogWith("world 1") + vecMax.LogWith("world 2") + Ag.mgScrX.LogWith("ScrX") + Ag.mgScrY.LogWith("ScrY")); theMan = new AgUiManDoubleRow("LOWR", mTouch, optFrame, muiCam); //, new float[] { vecOri.x * 0.9f, vecMax.x*0.9f, vecOri.y*0.9f, vecMax.y*0.9f } ); theMan.SetFrame(eaX: eaX, eaY: eaY, reverse: false, xyTchFrame: new float[] { 0.25f, // Xmin 0.195f, // Ymin 0.845f, // Xmax 0.4f, // Ymax 0.25f, 0.195f, 3f, 0.4f }); Ag.LogDouble(" TileUI Test :: Setting >>> Vects " + vecOri + ", " + vecMax + " >> dimX/Y : " + dimX + " / " + dimY); Ag.LogString(" Option " + optFrame.optMoveAniSpd.LogWith("AniSpd")); // Set Wagu, Container ... TIle Manager ... //new float[] { vecOri.x, vecMax.x, vecOri.y, vecMax.y } ); //boxScale = new Vector3 (dimX * 0.8f, dimY * 0.8f, 0.5f); // 크기 조절. boxScale = new Vector3(dimX * 0.8f, dimY * 0.9f, 0.5f); // 크기 조절. serialN = 0; // for (int k=0; k< eaX - 6; k++) { // 12를 기본으로 넣고.. 6개까지 추가 가능. // for (int ii=0; ii< 1; ii++) { for (int ii = 0; ii < eaY; ii++) { for (int k = 0; k < eaX; k++) { //GameObject curObj = mRscrcMan.GetPrefabAt (Folder: "_TestMoon", pName: "ATile"); //curObj.name = "LW_BOX_" + serialN++; //k.ToString() + ii; //curObj.transform.renderer.material.mainTexture = mRscrcMan.GetTextureIn ("Download", "Item" + (serialN % 10 + 1)); //curObj.transform.localScale = boxScale; (" " + optFrame.optSelectSize).HtLog(); //--------------------------------------- AmCard playerCard = new AmCard(pGrade: 3, pType: 5, pWthr: "CLOUD"); if (k < 1) { curObj = mRscrcMan.GetPrefabAt(Folder: "_TestMoon", pName: "KtitleA"); playerCard = new AmCard(pGrade: 2, pType: 2, pWthr: "CLOUD"); } if (k >= 1 && 6 > k) { curObj = mRscrcMan.GetPrefabAt(Folder: "_TestMoon", pName: "KtitleA"); playerCard = new AmCard(pGrade: 2, pType: 2, pWthr: "CLOUD"); for (int j = 1; j < 2; j++) { curObj.transform.FindChild("star/star" + j).gameObject.SetActive(false); } } if (k >= 6 && 9 > k) { curObj = mRscrcMan.GetPrefabAt(Folder: "_TestMoon", pName: "KtitleB"); playerCard = new AmCard(pGrade: 3, pType: 3, pWthr: "CLOUD"); for (int j = 1; j < 3; j++) { curObj.transform.FindChild("star/star" + j).gameObject.SetActive(false); } } if (k >= 9 && 11 > k) { curObj = mRscrcMan.GetPrefabAt(Folder: "_TestMoon", pName: "KtitleC"); playerCard = new AmCard(pGrade: 4, pType: 4, pWthr: "CLOUD"); for (int j = 1; j < 4; j++) { curObj.transform.FindChild("star/star" + j).gameObject.SetActive(false); } } if (k >= 11) { curObj = mRscrcMan.GetPrefabAt(Folder: "_TestMoon", pName: "KtitleS"); playerCard = new AmCard(pGrade: 1, pType: 1, pWthr: "CLOUD"); for (int j = 1; j < 1; j++) { curObj.transform.FindChild("star/star" + j).gameObject.SetActive(false); } } curObj.name = "UP_CardMix_" + serialN++; //k.ToString() + ii; arrGameObj.Add(curObj); curObj.transform.localScale = boxScale; curObj.CellCs().InitPstnSize(optFrame); //curObj.transform.FindChild ("Plane_playerface").gameObject.transform.renderer.material.mainTexture = mRscrcMan.GetTextureIn ("Download/playerface", "Kicker0" + (serialN % 8 + 1)); theMan.AddACell(curObj, k, ii, "Kicker", false); curObj.transform.FindChild("Plane_playerface").gameObject.transform.renderer.material.mainTexture = mRscrcMan.GetTextureIn("Download/playerface", "Kicker0" + (serialN % 8 + 1)); //curObj.transform.FindChild ("Plane_playerface").gameObject.GetComponent<UIButtonMessage> ().target = GameObject.Find ("Axis/Camera/Match").gameObject; curObj.transform.FindChild("Plane_playerface").gameObject.GetComponent <UIButtonMessage> ().target = curObj; //--------------------------------------- //AmCard playerCard = new AmCard (pGrade: 3, pType: 5, pWthr: "CLOUD"); // Type, Grade, Weather .. setting ... curObj.CellCs().PlCard = playerCard; string kind = serialN < 4 ? "ATTK" : "DPNC"; //theMan.AddACell (curObj, k, ii, kind); Ag.LogString(" Add a Cell " + curObj.name + " " + k.LogWith("X") + ii.LogWith("Y")); } } mTouch.evntTouchDown += theMan.CheckInside; mTouch.evntDrag += theMan.Scroll; theMan.dodgeScroll += theMan.DidSelected; theMan.dodgeScrollArea += theMan.OutOfMyTouchArea; mTouch.evntHold += theMan.SelectNearest; mTouch.evntHoldMove += theMan.Switch; theMan.dodgeSelectNear += theMan.DidSelected; theMan.dodgeSelectNearestArea += theMan.OutOfMyTouchArea; mTouch.evntTouchUp += theMan.RelaseProcess; mTouch.evntInitFly += theMan.InitiateFly; theMan.evntFlyBack += theMan.FlyBack; //touchObj.evntAutoScrl += theMan.AutoScroll; theMan.dodgeAutoScrlVec += theMan.OutOfMyTouchArea; theMan.dodgeAutoScrl += theMan.IsFrameOffLimit; theMan.dodgeAutoScrl += () => { return(true); }; // Liaison Related .. theMan.evntAlienCame = theMan.AlienCame_SetSwitchObj; theMan.mLiaison = mLiaison; arrMan.Add(theMan); //arrManCardMix.Add (theMan); }
public AmUser ParseFrom(JSONNode pJData) { AmUser rUsr = new AmUser(true, "NodeEnemyAmUserParse"); "NodeRltd :: NodeAmUser :: ParseFrom ".HtLog(); try { rUsr.WAS.KkoID = pJData ["KkoID"]; //.ToString ().RemoveQuotationMark (); rUsr.WAS.KkoNick = pJData ["KkoNick"]; //.ToString ().RemoveQuotationMark (); rUsr.KkoNickEncode = pJData ["KNickEncode"]; rUsr.TeamNameEncoded = pJData ["TeamNameEncoded"]; rUsr.WAS.League = pJData ["League"]; //Ag.NetExcpt.GamingEnemyID = rUsr.WAS.KkoID; } catch { Ag.LogString(" NodeRltd :: ParseFrom :: >>> KkoID KkoNick !!!!! E R R O R !!!!! ", pWichtig: true); } if (rUsr.KkoNickEncode == "%E0%B8%B8") { Ag.LogIntenseWord(" >>> KkoNick <<< " + rUsr.KkoNickEncode); rUsr.KkoNickEncode = ".."; } try { string contWinTryNot = pJData ["contWin"]; rUsr.ContWinStarted = contWinTryNot == "TRY"; Ag.LogString(" NodeRltd :: " + rUsr.ContWinStarted.ShowBool(" ContWin ", " Try", " Not")); } catch { Ag.LogString(" NodeRltd :: ParseFrom :: >>> ContWin TRY NOT"); } Ag.LogString(" NodeRltd :: ParseFrom :: >>> KkoID : " + rUsr.WAS.KkoID + " KkoNick : " + rUsr.WAS.KkoNick + " !!!!! "); JSONNode itemArr = pJData ["arrItemWas"]; (" NodeRltd :: NodeAmUser :: ParseFrom >> Item Array Parsing ____________" + itemArr.Count + "_____________ ").HtLog(); for (int k = 0; k < itemArr.Count; k++) { try { AmItem itm = new AmItem(); itm.ParseEnemyFrom(itemArr [k]); //itm.WAS = JsonMapper.ToObject<WasItem> (itemArr [k].ToJson ()); itm.ShowMyself(); rUsr.arrItem.Add(itm); } catch { Ag.LogString(" NodeRltd :: ParseFrom :: >>> Item Parse !!!!! E R R O R !!!!! ", pWichtig: true); } } JSONNode uniformArr = pJData ["arrWasUniform"]; Ag.LogStartWithStr(1, " NodeRltd :: NodeAmUser :: ParseFrom >> Uniform Array Parsing ____________" + uniformArr.Count + "_____________ "); for (int k = 0; k < uniformArr.Count; k++) { AmUniform nUni = new AmUniform(); rUsr.arrUniform.Add(nUni); try { nUni.Parse(uniformArr [k]); nUni.WasParseColorStringToKickKeepObj(); } catch { Ag.LogString(" NodeRltd :: ParseFrom :: >>> ParseColorInfo !!!!! E R R O R !!!!! ", pWichtig: true); } } JSONNode cardArr = pJData ["arrCard"]; Ag.LogStartWithStr(1, " NodeRltd :: NodeAmUser :: ParseFrom >> Card Array Parsing ____________" + cardArr.Count + "_____________ "); //cardArr.ToJson ().ToString ().HtLog (); for (int k = 0; k < cardArr.Count; k++) { try { AmCard nCard = new AmCard(); nCard.WAS.WasCardParse(cardArr [k]); nCard.ScouterParse(); rUsr.arrCard.Add(nCard); } catch { Ag.LogString(" NodeRltd :: ParseFrom :: >>> Card Parsing Failure !!!!! E R R O R !!!!! ", pWichtig: true); } } // JSONNode cstmdArr = pJData ["arrCostume"]; // Should be deprecate .... // (" NodeRltd :: NodeAmUser :: ParseFrom >> Costume Array Parsing ____________" + cstmdArr.Count + "_____________ ").HtLog (); // for (int k = 0; k < cstmdArr.Count; k++) { // arrCostume.Add (new AmCostume (cstmdArr [k])); // } JSONNode cstmWasArr = pJData ["arrCostumeWas"]; (" NodeRltd :: NodeAmUser :: ParseFrom >> Costume Was Array Parsing ____________" + cstmWasArr.Count + "_____________ ").HtLog(); for (int k = 0; k < cstmWasArr.Count; k++) { AmCostume nObj = new AmCostume(); nObj.WAS.ParseFrom(cstmWasArr [k]); rUsr.arrCostume.Add(nObj); } rUsr.ApplyCurrentDeck(); //rUsr.ApplyDeckItemBeforeGame (); return(rUsr); }
public void AddCellsTo(CuUiManager pManager) { boxScale = new Vector3(dimX * 0.8f, dimY * 0.9f, 0.5f); // 크기 조절. serialN = 0; // for (int k=0; k< eaX - 6; k++) { // 12를 기본으로 넣고.. 6개까지 추가 가능. // for (int ii=0; ii< 1; ii++) { for (int ii = 0; ii < eaY; ii++) { for (int k = 0; k < eaX; k++) { AmCard playerCard = new AmCard(pGrade: 3, pType: 5, pWthr: "CLOUD"); if (k < 1) { curObj = mRscrcMan.GetPrefabAt(Folder: "_TestMoon", pName: "KPtitleA"); playerCard = new AmCard(pGrade: 1, pType: 1, pWthr: "CLOUD"); for (int j = 1; j < 1; j++) { curObj.transform.FindChild("star/star" + j).gameObject.SetActive(false); } } if (k >= 1 && 6 > k) { curObj = mRscrcMan.GetPrefabAt(Folder: "_TestMoon", pName: "KtitleA"); playerCard = new AmCard(pGrade: 1, pType: 1, pWthr: "CLOUD"); for (int j = 1; j < 1; j++) { curObj.transform.FindChild("star/star" + j).gameObject.SetActive(false); } } if (k >= 6 && 9 > k) { curObj = mRscrcMan.GetPrefabAt(Folder: "_TestMoon", pName: "KtitleB"); playerCard = new AmCard(pGrade: 2, pType: 2, pWthr: "CLOUD"); for (int j = 1; j < 2; j++) { curObj.transform.FindChild("star/star" + j).gameObject.SetActive(false); } } if (k >= 9 && 12 > k) { curObj = mRscrcMan.GetPrefabAt(Folder: "_TestMoon", pName: "KtitleC"); playerCard = new AmCard(pGrade: 3, pType: 3, pWthr: "CLOUD"); for (int j = 1; j < 3; j++) { curObj.transform.FindChild("star/star" + j).gameObject.SetActive(false); } } if (k >= 12 && 16 > k) { curObj = mRscrcMan.GetPrefabAt(Folder: "_TestMoon", pName: "KtitleD"); playerCard = new AmCard(pGrade: 4, pType: 4, pWthr: "CLOUD"); for (int j = 1; j < 3; j++) { curObj.transform.FindChild("star/star" + j).gameObject.SetActive(false); } } if (k >= 16) { curObj = mRscrcMan.GetPrefabAt(Folder: "_TestMoon", pName: "KtitleS"); playerCard = new AmCard(pGrade: 1, pType: 1, pWthr: "CLOUD"); for (int j = 1; j < 1; j++) { curObj.transform.FindChild("star/star" + j).gameObject.SetActive(false); } } curObj.name = "Cardmix_" + serialN++; //k.ToString() + ii; curObj.transform.localScale = boxScale; curObj.CellCs().InitPstnSize(optFrame); (" " + optFrame.optSelectSize).HtLog(); arrGameObj.Add(curObj); /* * for (int j=1; j<(serialN % 5 +1); j++) { * curObj.transform.FindChild ("star/star" + j).gameObject.SetActive (false); * } */ //curObj.transform.FindChild ("Plane_playerface").gameObject.GetComponent<UIButtonMessage> ().target = GameObject.Find ("Axis/Camera/Match").gameObject; curObj.transform.FindChild("Plane_playerface").gameObject.GetComponent <UIButtonMessage> ().target = curObj; //----------------------------------------------------- // Type, Grade, Weather .. setting ... curObj.CellCs().PlCard = playerCard; string kind = serialN < 3 ? "ATTK" : "DPNC"; //theMan.AddACell (curObj, k, ii, kind); if (k < 1) { curObj.transform.FindChild("Plane_playerface").gameObject.transform.renderer.material.mainTexture = mRscrcMan.GetTextureIn("Download/playerface", "Keeper0" + (serialN % 2 + 1)); pManager.AddACell(curObj, k, ii, "Keeper", false); } else { curObj.transform.FindChild("Plane_playerface").gameObject.transform.renderer.material.mainTexture = mRscrcMan.GetTextureIn("Download/playerface", "Kicker0" + (serialN % 8 + 1)); pManager.AddACell(curObj, k, ii, "Kicker", false); } } } }
void MYDATALOAD() { //DestroyObject (dicPlayerOrObj ["MyPlayer"]); AmCard card = new AmCard(); card = Ag.mySelf.GetCardOrderOf(1); SetPolyGon(Ag.mySelf.GetCardOrderOf(1)); //dicPlayerOrObj.Add ("MyPlayer", (GameObject)Instantiate (mPoly)); // crash ... dicPlayerOrObj ["MyPlayer"] = (GameObject)Instantiate(mPoly); dicPlayerOrObj ["MyPlayer"].transform.localPosition = new Vector3(0.2011476f, -0.004949205f, -0.6948588f); dicPlayerOrObj ["MyPlayer"].transform.localEulerAngles = new Vector3(0, 276.2166f, 0); dicPlayerOrObj ["MyPlayer"].transform.localScale = new Vector3(0.4107453f, 0.4107453f, 0.4107453f); dicPlayerOrObj ["MyPlayer"].animation.Play("08_Aps_10_(400F)"); dicPlayerOrObj ["MyPlayer"].transform.FindChild("deleveryBall").gameObject.SetActive(false); StartCoroutine(CaptureImage(dicPlayerOrObj ["MyPlayer"])); //Ag.LogIntenseWord ("MYDATALOAD" + Ag.mySelf.GetCardOrderOf (1).WAS.backNum); MyUniform(); dicPlayerOrObj ["MyPlayer"].transform.FindChild("Clothes").renderer.materials [0].mainTexture = MyShirts.mainTexture; dicPlayerOrObj ["MyPlayer"].transform.FindChild("Clothes").renderer.materials [1].mainTexture = MyPants.mainTexture; dicPlayerOrObj ["MyPlayer"].transform.FindChild("Clothes").renderer.materials [2].mainTexture = MySocks.mainTexture; dicMenuList ["MY_Label_rank"].GetComponent <UILabel> ().text = Ag.mySelf.myRank.WAS.thisWeekRank.ToString(); dicMenuList ["MY_Label_successivewin"].GetComponent <UILabel> ().text = Ag.mySelf.myRank.WAS.winNum + Ag.mySelf.myRank.WAS.lossNum + WWW.UnEscapeURL("%EC%A0%84") + Ag.mySelf.myRank.WAS.winNum + WWW.UnEscapeURL("%EC%8A%B9") + Ag.mySelf.myRank.WAS.lossNum + WWW.UnEscapeURL("%ED%8C%A8"); dicMenuList ["MY_Label_tatalscore"].GetComponent <UILabel> ().text = Ag.mySelf.myRank.WAS.weekScore.ToString(); // dicMenuList ["MY_Label_userleague"].GetComponent<UILabel> ().text = "-"; Ag.mySelf.ApplyCurrentDeck(); if (Ag.mySelf.DeckItemEA > 0) { dicMenuList ["mydec"].SetActive(true); dicMenuList ["mydec"].transform.FindChild("flag").GetComponent <UISprite> ().spriteName = "flag_" + Ag.mySelf.mMaxCountry; dicMenuList ["mydec"].transform.FindChild("deckslot").gameObject.SetActive(true); dicMenuList ["mydec"].transform.FindChild("deckslot/4set").gameObject.SetActive(false); dicMenuList ["mydec"].transform.FindChild("deckslot/5set").gameObject.SetActive(false); dicMenuList ["mydec"].transform.FindChild("deckslot/6set").gameObject.SetActive(false); Debug.Log("Ag.mySelf.DeckItemEA" + "deckslot/" + (Ag.mySelf.DeckItemEA + 3) + "set"); dicMenuList ["mydec"].transform.FindChild("deckslot/" + (Ag.mySelf.DeckItemEA + 3) + "set").gameObject.SetActive(true); dicMenuList ["mydec"].transform.FindChild("deckslot/" + (Ag.mySelf.DeckItemEA + 3) + "set/Label_" + (Ag.mySelf.DeckItemEA + 3) + "set").GetComponent <UILabel> ().text = Ag.mySelf.mMaxCountry; } else { dicMenuList ["mydec"].SetActive(false); } //------------------------------------------------GuestMode KakaoNick if (Ag.mGuest) { dicMenuList ["MY_Label_usernickname"].GetComponent <UILabel> ().text = "No name"; } else { dicMenuList ["MY_Label_usernickname"].GetComponent <UILabel> ().text = Ag.mySelf.WAS.KkoNick; } dicMenuList ["MY_Label_userteamname"].GetComponent <UILabel> ().text = WWW.UnEscapeURL(Ag.mySelf.WAS.TeamName); if (card.arrCostumeInCard.Count > 0) { for (int i = 0; i < card.arrCostumeInCard.Count; i++) { Debug.Log("CostumeNAme" + card.arrCostumeInCard [i].WAS.itemTypeId); PlayerCostume.instance.SetCostumeToPlayer(true, dicPlayerOrObj ["MyPlayer"], (card.arrCostumeInCard [i].WAS.itemTypeId)); } } else { PlayerCostume.instance.SetCostumeToPlayer(true, dicPlayerOrObj ["MyPlayer"], "KickerShoes01"); } MyDataLoad = true; }
public void SetValueWith(AmCard pCard) { grade = pCard.WAS.grade; level = pCard.WAS.level; }
public override void Start() // Imsi { //Purchase = PurchaseType.Nstore; Ag.LogIntenseWord(" MenuManager Started ..... "); //mGameMatchOk = false; Ag.SingleTry = 0; Ag.CurrentScene = "MENU"; //-----------Popup Cash Item int ran = AgUtil.RandomInclude(1, 999); //if (Ag.mySelf.MinutesAfterRegist > 1440 && ran % 5 < 5) // 100 % @ 411 Ag.ContGameNum = 0; mBackDepthFlag = false; MailItemInit(); InitInAppPurchaseIOSnADR(); mFriendId = ""; Ag.mySelf.SetCostumeToCard(); //FriendRank (); mwas = new WasCard(); mCard = new AmCard(); mRankFriend = new WasRank(); BarObj = new List <GameObject> (); mTimeLooseAtStartPoint = 0f; Ag.LogIntenseWord(" MenuManager :: Start .. Game Init () "); LoadMenuResources(); SettingLocal(); // '킥오프' 주황색 버튼 BtnKickOff.MakeAbility(true); // BtnKickOff.SetObjectsWithAlt ( FindMyChild (dicMenuList ["Ui_kickoff"], "Panel_bottom/bundle_rightbtn/btn1_ready2", false), null, // FindMyChild (dicMenuList ["Ui_kickoff"], "Panel_bottom/bundle_rightbtn/btn1_ready", true)); if (Ag.mGuest) { Ag.mySelf.WAS.profileURL = ""; Ag.mySelf.WAS.KkoNick = "No name"; Ag.mySelf.KkoNickEncode = "No name"; } else { Ag.mySelf.WAS.profileURL = StcPlatform.ProfileURL; Ag.mySelf.WAS.KkoNick = StcPlatform.PltmNick; Ag.mySelf.KkoNickEncode = WWW.EscapeURL(StcPlatform.PltmNick); Ag.mySelf.TeamNameEncoded = WWW.EscapeURL(Ag.mySelf.WAS.TeamName); } if (PreviewLabs.PlayerPrefs.GetBool("DidTutorial")) { AgStt.mgGameTutorial = false; } else { AgStt.mgGameTutorial = true; } #if UNITY_EDITOR PreviewLabs.PlayerPrefs.SetBool("DidTutorial", true); AgStt.mgGameTutorial = false; #endif //GitIgnoreThis.GitIgnoreTutorial (); addsendmessageTutorPanel(); Ag.LogIntenseWord(" MenuManager :: Start .. for "); for (int i = 0; i < KakaoFriends.Instance.appFriends.Count; i++) { if (i == KakaoFriends.Instance.appFriends.Count - 1) { mFriendId += KakaoFriends.Instance.appFriends [i].userid; } else { mFriendId += KakaoFriends.Instance.appFriends [i].userid + ","; } Debug.Log(mFriendId); } Kick_OffInit(); PriceSetting(); SetNodeDelegate(); Ag.LogIntenseWord(" MenuManager :: Start .. Sale Item "); SaleItemSetting(); //pushSetting (); Ag.mViewCard.CardLeagueSpritename(Ag.mySelf.WAS.League); Ag.LogIntenseWord(" MenuManager :: Start .. spriteName " + Ag.mySelf.WAS.League + Ag.mViewCard.LeagueSpriteNameS); dicMenuList ["Lobby_division"].GetComponent <UISprite> ().spriteName = Ag.mViewCard.LeagueSpriteNameS; dicMenuList ["Ui_team_division"].GetComponent <UISprite> ().spriteName = Ag.mViewCard.LeagueSpriteNameS; dicMenuList ["MY_Label_division"].GetComponent <UISprite> ().spriteName = Ag.mViewCard.LeagueSpriteNameS; // Debug.Log (GiftRewardCode()+" gift"); #if UNITY_ANDROID var skus = new string[] { "com.prime31.testproduct", "android.test.purchased", "com.prime31.managedproduct", "com.prime31.testsubscription" }; GoogleIAB.queryInventory(skus); #endif Ag.mySelf.ApplyCurrentDeck(); Ag.LogIntenseWord(" MenuManager :: Start .. End .... "); //ShowDeckEffLabel (); InitFriendRank(); if (Ag.mGameStartAlready) { Btn_Fun_MatchRequire(); PopupAfterGameEnd(); if (Ag.mBlueItemFlag) { StartCoroutine(btn_auto_label_Priceoff()); } } else { if (Ag.mySelf.MinutesAfterRegist > 60 && ran % 20 == 3) // 5% ... // ran % 5 < 5) // 100 % @ 411 { PopupAfterUserCash(); } BannerEventAction(); // if (!PreviewLabs.PlayerPrefs.GetBool ("FirstCharge_check")) { // dicMenuList ["Ui_popup"].SetActive (true); // dicMenuList ["first_purchase"].SetActive (true); // } } }