public void Accept() { FindObjectOfType <ChatSystem>().Whisper(AskedUser, "ACCEPT_INVITE"); FindObjectOfType <PartyMatchmaker>().SetLeader(AskedUser); panel.SetStateToOpen(); panel.Close(); currentAsk = false; }
IEnumerator ShowAndHide(float seconds) { motion.SetStateToClose(); motion.Open(); yield return(new WaitForSeconds(seconds)); motion.SetStateToOpen(); motion.Close(); }
public static void Close(string motionName) { if (EMMotionManager.instance.openCloseMotions.TryGetValue(motionName, out openCloseMotion)) { openCloseMotion.Close(); } else { Debug.LogWarning("Motion manager: " + motionName + " doesn't exist"); } }
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; }
public void NewGame() { Debug.Log("New Game Starting"); if (PhotonNetwork.playerList.Length < 4) { Debug.Log("Canceled New Game: Player Num"); gameStarted = false; } else { FindObjectOfType <Note>().Notify("", "New Game Started!", 1f); ResetOnAllClients(); } WinScreen.Close(); resetAll(); ended = false; GameObject ship = GameObject.FindGameObjectWithTag("myShip"); ship.GetComponent <RocketHealth>().Respawn(); ship.GetComponent <RocketHealth>().RandomSpawnPoint(); }