void Start() { gameData = GetComponent <GameCommonData>(); Player1UI = ContentsSet(player1UI); Player2UI = ContentsSet(player2UI); }
public void ScoreTextUISet(PlayerContents player, int[] textnum, int life) { for (int i = 0; i < 3; i++) { player.textsEevaluate[i].SetText(uiString[textnum[i]], valueDef[i], startTimeDef[i]); } player.hpText.SetText(life.ToString(), -1, 8); }
void Start() { gameData = GetComponent <GameCommonData>(); Player1UI = ContentsSet(player1UI); Player2UI = ContentsSet(player2UI); //Result.HitPosition[] e = { Result.HitPosition.Legs, Result.HitPosition.Null }; //ViewOpen(Result.VictoryPlayer.Player1, e, valueDef, 6); }
void Start() { photonView = GetComponent <PhotonView>(); phaseCheck = GetComponent <PhaseCheck>(); Player1 = ContentsSet(player1UI); Player2 = ContentsSet(player2UI); //Result.HitPosition[] e = { Result.HitPosition.Legs, Result.HitPosition.Null }; //ViewOpen(Result.VictoryPlayer.Player1, e, valueDef, 6); }
PlayerContents ContentsSet(Transform pUi) { PlayerContents pc = new PlayerContents { }; GameObject hitBody = pUi.FindChild("HitBody").gameObject; GameObject textSet = pUi.FindChild("TextSet").gameObject; pc.hpText = pUi.FindChild("HPSet/HP").GetComponent <ResultEvent>(); for (int i = 0; i < 3; i++) { pc.bodyImages[i] = hitBody.transform.GetComponentsInChildren <Image>()[i]; pc.textsEevaluate[i] = textSet.transform.GetComponentsInChildren <ResultEvent>()[i]; pc.bodyImageResult[i] = pc.bodyImages[i].GetComponent <ResultEvent>(); } return(pc); }
IEnumerator BodyBrenk(PlayerContents player, PlayerData pd) { for (int i = 0; i < 3; i++) { player.bodyImageResult[i].SetImage(); } if (pd.HitPos == GameCommonData.HitPosition.Null) { yield break; } for (int i = 0; i < 3; i++) { Debug.Log(pd.HitPos); player.bodyImages[(int)pd.HitPos - 1].color = Color.red; yield return(new WaitForSeconds(0.5f)); player.bodyImages[(int)pd.HitPos - 1].color = Color.white; yield return(new WaitForSeconds(0.5f)); } player.bodyImages[(int)pd.HitPos - 1].color = Color.red; }
IEnumerator BodyBrenk(PlayerContents player) { for (int i = 0; i < 3; i++) { player.bodyImageResult[i].SetImage(); } if (player.hitPosition == Result.HitPosition.Null) { yield break; } for (int i = 0; i < 3; i++) { Debug.Log(player.hitPosition); player.bodyImages[(int)player.hitPosition - 1].color = Color.red; yield return(new WaitForSeconds(0.5f)); player.bodyImages[(int)player.hitPosition - 1].color = Color.white; yield return(new WaitForSeconds(0.5f)); } player.bodyImages[(int)player.hitPosition - 1].color = Color.red; }