示例#1
0
    public void NotifyPlayerStopReady()
    {
        --m_NbPlayersReady;
        DebugScreen.PrintVar <int>("ready", m_NbPlayersReady);

        UIManager.Instance.HideSelectableMessage(sessionStartMsg);
    }
示例#2
0
    /// Let player join
    public void NotifyPlayerJoin()
    {
        ++m_NbPlayersJoin;
        DebugScreen.PrintVar <int>("join", m_NbPlayersJoin);

        // if needed, hide Start Party message
        UIManager.Instance.HideSelectableMessage(sessionStartMsg);
    }
示例#3
0
    public void NotifyPlayerReady()
    {
        ++m_NbPlayersReady;
        DebugScreen.PrintVar <int>("ready", m_NbPlayersReady);

        if (AreAllJoiningPlayersReady())
        {
            UIManager.Instance.ShowAndSelectMessage(sessionStartMsg);
        }
    }
示例#4
0
    private void OnEnterJoinPhase()
    {
        Debug.Log("SessionManager Join Phase ENTER");

        // immediately retrieve event parent by tag in loaded level, and register scrap spawn events
        // now objects are spawned after some delay, so self-registration should be enough
        // LevelManager.Instance.RegisterAllScrapSpawnPoints(ParentLocator.eventParent);

        // spawn all scraps
        LevelManager.Instance.SpawnAllScraps();
        // on the built level, initialize correct block states
        SwitchBlockManager.Instance.Setup();

        // activate player join UI (input + view)
        // IMPROVE: only show message for plugged controllers, if we can detect them
        for (int i = 1; i <= 4; ++i)
        {
            Debug.Log(string.Format("PlayerJoinUI {0}", i));
        }

        DebugScreen.PrintVar <int>("join", 0);
        DebugScreen.PrintVar <int>("ready", 0);
    }
示例#5
0
 public void NotifyPlayerStopJoin()
 {
     // TODO: despawn (in practice, do not destroy but deactivate)
     --m_NbPlayersJoin;
     DebugScreen.PrintVar <int>("join", m_NbPlayersJoin);
 }