Esempio n. 1
0
    IEnumerator ShowAndHide(float seconds)
    {
        motion.SetStateToClose();
        motion.Open();
        yield return(new WaitForSeconds(seconds));

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