Esempio n. 1
0
 public void Accept()
 {
     FindObjectOfType <ChatSystem>().Whisper(AskedUser, "ACCEPT_INVITE");
     FindObjectOfType <PartyMatchmaker>().SetLeader(AskedUser);
     panel.SetStateToOpen();
     panel.Close();
     currentAsk = false;
 }
Esempio n. 2
0
    IEnumerator ShowAndHide(float seconds)
    {
        motion.SetStateToClose();
        motion.Open();
        yield return(new WaitForSeconds(seconds));

        motion.SetStateToOpen();
        motion.Close();
    }
Esempio n. 3
0
 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");
     }
 }
Esempio n. 4
0
 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.");
     }
 }
Esempio n. 5
0
    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;
    }
Esempio n. 6
0
    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();
    }