Exemple #1
0
    public void OnRoomVariablesUpdate(BaseEvent evt)
    {
        if (HandleRecordToDisk(evt))
        {
            return;
        }
        switch (GameManager.Inst.LevelLoaded)
        {
        case GameManager.Level.BIZSIM:
            BizSimManager.Inst.OnRoomVariablesUpdate(evt);
            break;

        case GameManager.Level.ORIENT:
        case GameManager.Level.TEAMROOM:
            // These are handled by RoomVariableUrlController now.
            break;

        default:
            Debug.LogError("Room variable update not handled in level: " + (int)GameManager.Inst.LevelLoaded);
            break;
        }

        RoomVariableUrlController.HandleRoomVariableUpdate(evt);
        RoomVariableToEnable.HandleRoomVariableUpdate(evt);
    }
Exemple #2
0
    void HandleRoomVariableUpdate(UserVariable userVar)
    {
        switch (GameManager.Inst.LevelLoaded)
        {
        case GameManager.Level.ORIENT:
        case GameManager.Level.TEAMROOM:
            RoomVariableUrlController.HandleRoomVariableUpdate(userVar);
            break;

        default:
            Debug.LogError("Room variable update not handled for level: " + (int)GameManager.Inst.LevelLoaded);
            break;
        }
        RoomVariableToEnable.HandleRoomVariableUpdate(userVar);
    }
Exemple #3
0
    void OnLevelWasLoaded(int level)
    {
        IsLoadingLevel = false;
        if (LevelLoaded != Level.CONNECT)
        {
            playerManager.OnLevelWasLoaded_(level); // make sure players are created before level managers are initialized.
        }
        switch (LevelLoaded)
        {
        case Level.CONNECT:
        case Level.CAMPUS:
        case Level.MINICAMPUS:
            break;

        case Level.INVPATH:
            //InvisiblePathManager.Inst.OnRoomJoin(RoomJoinEvt);
            break;

        case Level.ORIENT:
            OrientationManager.Inst.OnRoomJoin(RoomJoinEvt);
            break;

        case Level.BIZSIM:
            BizSimManager.Inst.OnRoomJoin(RoomJoinEvt);
            break;

        case Level.AVATARSELECT:
            AvatarSelectionManager.Inst.Touch();
            break;

        case Level.NAVTUTORIAL:
            //TutorialManager.Inst.Touch();
            break;

        case Level.TEAMROOM:
            TeamRoomManager.Inst.Touch();
            break;

        case Level.CMDROOM:
            //CmdRoomManager.Inst.Touch();
            break;

        case Level.MOTION_TEST:
            TunnelGameManager.Inst.Touch();
            break;

        case Level.SCALE_GAME:
            ScaleGameManager.Inst.Touch();
            break;

        default:
            Debug.LogError("Unknown Level Loaded");
            break;
        }

        RoomVariableUrlController.HandleRoomJoin(RoomJoinEvt);
        RoomVariableToEnable.HandleRoomJoin(RoomJoinEvt);

        UpdateLevelInGuiLayer();

        // server doesn't need to know each room change at this point.
        //if( LevelLoaded != Level.AVATARSELECT )
        //    CommunicationManager.CurrentUserProfile.UpdateProfile("room", level.ToString());

        ConsoleInterpreter.Inst.Touch(); // preload console instance
        RoomJoinEvt = null;
    }