Exemple #1
0
 public void SearchRoom()
 {
     AudioController.Instance.PlayAudio(AudioEnum.ClickButton);
     //matchSword.GetComponentInChildren<Animation> ().Play ("FindMatchAnimation");
     matchSword.GetComponentInChildren <Animation> ().PlayQueued("FindMatchAnimation", QueueMode.PlayNow);
     matchSword.GetComponentInChildren <Animation> ().PlayQueued("MatchingLoop", QueueMode.CompleteOthers).wrapMode = WrapMode.Loop;
     matchingText.text = "Matching...";
     TweenController.TweenMoveTo(matchingText.transform, new Vector2(matchingText.transform.localPosition.x, matchingText.transform.localPosition.y + 160f), 0.5f);
     TweenController.TweenMoveTo(menu.transform, new Vector2(menu.transform.localPosition.x, menu.transform.localPosition.y - 160f), 0.5f);
     ScreenController.Instance.StartMatchingScreen();
     searchRoomButton.interactable = false;
     FDController.Instance.SearchRoom(delegate(bool result) {
         if (result)
         {
             GoToGameRoom();
         }
         else
         {
             Debug.Log("Cancelled Search");
             searchRoomButton.interactable = true;
             matchSword.GetComponentInChildren <Animation> ().Play("MatchIdle");
             AudioController.Instance.PlayAudio(AudioEnum.ClickButton);
             matchingText.text = "Find Match";
             TweenController.TweenMoveTo(matchingText.transform, new Vector2(matchingText.transform.localPosition.x, matchingText.transform.localPosition.y - 160f), 0.5f);
             TweenController.TweenMoveTo(menu.transform, new Vector2(menu.transform.localPosition.x, menu.transform.localPosition.y + 160f), 0.5f);
         }
         ScreenController.Instance.StopMatchingScreen();
     });
 }
Exemple #2
0
 public void LerpToMatch(Button match)
 {
     TweenController.TweenMoveTo(viewGroup.transform, -matchView.transform.localPosition, 0.5f);
     TweenController.TweenMoveTo(menuIndicator.transform, matchButton.transform.localPosition, 0.3f);
     colorToDefault();
     match.gameObject.GetComponentInChildren <Image> ().color = new Color32(66, 135, 199, 255);
     TweenController.TweenScaleToLarge(match.transform.GetChild(0).transform, new Vector3(1.3f, 1.3f, 1.3f), 0.2f);
 }
Exemple #3
0
 public void LerpBackToHome(Button home)
 {
     TweenController.TweenMoveTo(viewGroup.transform, new Vector2(0, 0), 0.5f);
     TweenController.TweenMoveTo(menuIndicator.transform, homeButton.transform.localPosition, 0.3f);
     colorToDefault();
     home.gameObject.GetComponentInChildren <Image> ().color = new Color32(66, 135, 199, 255);
     TweenController.TweenScaleToLarge(home.transform.GetChild(0).transform, new Vector3(1.3f, 1.3f, 1.3f), 0.2f);
 }
Exemple #4
0
 public void LerpProfileView(Button start)
 {
     TweenController.TweenMoveTo(viewGroup.transform, profileView.transform.localPosition, 0.3f);
     menu.SetActive(true);
     lobbyView.SetActive(false);
 }