public App() { InitializeComponent(); DependencyService.Register <MockDataStore>(); MainPage = new RoundImage(); }
IEnumerator startTimer() { RoundImage.GetComponent <Animator>().SetBool("animate", true); yield return(new WaitForSeconds(3f)); RoundImage.GetComponent <Animator>().SetBool("animate", false); string timer = JsonUtility.ToJson(GameManager.manager._timer_data); GameManager.manager.SocketEmit("start_round_timer", timer); SoundManager.manager.playStart(); striker_avatar.transform.GetComponent <Animator>().SetBool("start", true); striker_avatar.transform.GetChild(1).GetComponent <Animator>().SetTrigger("start"); }
void ReleaseDesignerOutlets() { if (btnCloseBg != null) { btnCloseBg.Dispose(); btnCloseBg = null; } if (btnCloseBgBottom != null) { btnCloseBgBottom.Dispose(); btnCloseBgBottom = null; } if (CloseButton != null) { CloseButton.Dispose(); CloseButton = null; } if (MainView != null) { MainView.Dispose(); MainView = null; } if (MessageText != null) { MessageText.Dispose(); MessageText = null; } if (PointsText != null) { PointsText.Dispose(); PointsText = null; } if (RoundImage != null) { RoundImage.Dispose(); RoundImage = null; } if (TableHeightConstraint != null) { TableHeightConstraint.Dispose(); TableHeightConstraint = null; } if (TableView != null) { TableView.Dispose(); TableView = null; } if (TopViewContainer != null) { TopViewContainer.Dispose(); TopViewContainer = null; } if (vWhiteBackground != null) { vWhiteBackground.Dispose(); vWhiteBackground = null; } }
private void InitGame(Role role) { direct = Direction.Centre; canKick = true; //round = 1; //if (!setCamera) //{ round++; for (int i = 0; i < roundSprite.Length; i++) { if (round == (i + 1)) { RoundImage.GetComponent <Image>().sprite = roundSprite[i]; } } if (role == Role.Keeper) { InGameAvatar[0].transform.parent = keeper_avatar.transform; InGameAvatar[0].transform.position = keeper_avatar.transform.position; InGameAvatar[0].transform.rotation = keeper_avatar.transform.rotation; InGameAvatar[0].transform.localScale = new Vector3(1, 1, 1); myAnimator.runtimeAnimatorController = Resources.Load("KeeperNew") as RuntimeAnimatorController; InGameAvatar[1].transform.parent = striker_avatar.transform; InGameAvatar[1].transform.position = striker_avatar.transform.position; InGameAvatar[1].transform.rotation = striker_avatar.transform.rotation; opponentAnimator.runtimeAnimatorController = Resources.Load("StrikerNew") as RuntimeAnimatorController; InGameAvatar[1].transform.localScale = new Vector3(1, 1, 1); Camera.main.transform.position = keeperCamPos; Camera.main.transform.rotation = Quaternion.Euler(keeperCamRot); //KeeperUI.SetActive(true); StrikerUI.SetActive(true); strikerBG.SetActive(false); keeperBG.SetActive(true); kickBtn.GetComponent <Image>().sprite = buttonImg[0]; } else if (role == Role.Striker) { InGameAvatar[0].transform.parent = striker_avatar.transform; InGameAvatar[0].transform.position = striker_avatar.transform.position; InGameAvatar[0].transform.rotation = striker_avatar.transform.rotation; InGameAvatar[0].transform.localScale = new Vector3(1, 1, 1); myAnimator.runtimeAnimatorController = Resources.Load("StrikerNew") as RuntimeAnimatorController; InGameAvatar[1].transform.parent = keeper_avatar.transform; InGameAvatar[1].transform.position = keeper_avatar.transform.position; InGameAvatar[1].transform.rotation = keeper_avatar.transform.rotation; InGameAvatar[1].transform.localScale = new Vector3(1, 1, 1); opponentAnimator.runtimeAnimatorController = Resources.Load("KeeperNew") as RuntimeAnimatorController; Camera.main.transform.position = strikerCamPos; Camera.main.transform.rotation = Quaternion.Euler(strikerCamRot); //KeeperUI.SetActive(false); strikerBG.SetActive(true); keeperBG.SetActive(false); StrikerUI.SetActive(true); kickBtn.GetComponent <Image>().sprite = buttonImg[1]; } //setCamera = true; // } temp1 = new Vector3(0, 0, 0); StartCoroutine(startTimer()); }