IEnumerator ShowAndHide(float seconds) { motion.SetStateToClose(); motion.Open(); yield return(new WaitForSeconds(seconds)); motion.SetStateToOpen(); motion.Close(); }
void EndGame(string user) { WinScreen.Open(); WinText.text = ChatSystem.playerToText(user) + " wins the match!"; GameObject ship = GameObject.FindGameObjectWithTag("myShip"); ship.GetComponent <RocketControl>().canMove = false; ship.GetComponent <RocketShoot>().canShoot = false; }
public static void Open(string motionName) { if (EMMotionManager.instance.openCloseMotions.TryGetValue(motionName, out openCloseMotion)) { openCloseMotion.Open(); } else { Debug.LogWarning("Motion manager: " + motionName + " doesn't exist"); } }
public void Open(string user) { if (!currentAsk && !FindObjectOfType <PartyMatchmaker>().inParty()) { AskedUser = user; DispText.text = ChatSystem.playerToText(AskedUser) + " invited you to a party."; currentAsk = true; panel.SetStateToClose(); panel.Open(); } }
public void SetUsername(string username) { if (PhotonNetwork.insideLobby) { PhotonNetwork.playerName = username + ":" + Random.Range(0, 100000000); Debug.Log("Logged in as: " + PhotonNetwork.playerName); ThisPanel.Close(); MenuPanel.Open(); cs.LoginChat(PhotonNetwork.playerName); } else { FindObjectOfType <Note>().Error("Not yet connected."); } }
public override void OnJoinedRoom() { //base.OnJoinedRoom(); FindObjectOfType <ChatSystem>().chatClient.Subscribe(new string[] { PhotonNetwork.room.name }); if (MainMenu != null) { MainMenu.Close(); } GameUI.Open(); DestroyCurrentArena(); SpawnArena(FindObjectOfType <GameSetup>().ArenaIndex); GameObject player = PhotonNetwork.Instantiate("Ship", Vector3.zero, Quaternion.identity, 0); player.GetComponent <RocketControl>().canMove = true; player.GetComponent <RocketShoot>().canShoot = true; GameObject.FindGameObjectWithTag("MainCamera").GetComponent <ObjFollow>().target = player.transform; }