Пример #1
0
        void Awake()
        {
            try
            {
                if (CleanupConfig.Instance.configFileInfo.playbackType == WorldPlaybackCommon.PlaybackTypePlay)
                {
                    return;
                }

                this.tool = new CleanupModeratorTool(this);

                this.stepTimer = new StepTimer();

                this.executionMode = this.tool.GetExecutionMode();

                this.mainMenu            = GameObject.FindGameObjectWithTag("MainMenu");
                this.mainPanelController = mainMenu.GetComponent <PanelMainController>();
            }
            catch (Exception exception)
            {
                Debug.LogError(exception);
                SIGVerseLogger.Error(exception.Message);
                SIGVerseLogger.Error(exception.StackTrace);
                this.ApplicationQuitAfter1sec();
            }
        }
Пример #2
0
        void Awake()
        {
            try
            {
#if ENABLE_VRIK
                this.avatar               = this.avatarForFinalIK;
                this.head                 = this.headForFinalIK;
                this.body                 = this.bodyForFinalIK;
                this.LeftHand             = this.LeftHandForFinalIK;
                this.rightHand            = this.rightHandForFinalIK;
                this.noticePanelForAvatar = this.noticePanelForFinalIKAvatar;
                this.noticeTextForAvatar  = this.noticeTextForFinalIKAvatar;
#else
                this.avatar               = this.avatarForSimpleIK;
                this.head                 = this.headForSimpleIK;
                this.body                 = this.bodyForSimpleIK;
                this.LeftHand             = this.LeftHandForSimpleIK;
                this.rightHand            = this.rightHandForSimpleIK;
                this.noticePanelForAvatar = this.noticePanelForSimpleIKAvatar;
                this.noticeTextForAvatar  = this.noticeTextForSimpleIKAvatar;
#endif
                // Practice mode
                if (HumanNaviConfig.Instance.configInfo.executionMode == (int)ExecutionMode.Practice)
                {
                    this.isPracticeMode = true;
                }

                // Playback system
                this.playbackRecorder = this.playbackManager.GetComponent <HumanNaviPlaybackRecorder>();

                // Avatar
                this.initialAvatarPosition = this.avatar.transform.position;
                this.initialAvatarRotation = this.avatar.transform.eulerAngles;

                // GUI
                this.mainMenu            = GameObject.FindGameObjectWithTag("MainMenu");
                this.panelMainController = mainMenu.GetComponent <PanelMainController>();

                this.noticePanelForAvatar.SetActive(false);
                this.noticeTextForAvatar.text = "";

                // MessageMap
                this.receivedMessageMap = new Dictionary <string, bool>();
                this.receivedMessageMap.Add(MsgIamReady, false);
                this.receivedMessageMap.Add(MsgGetAvatarStatus, false);
                this.receivedMessageMap.Add(MsgGetObjectStatus, false);
                this.receivedMessageMap.Add(MsgGetSpeechState, false);
                this.receivedMessageMap.Add(MsgGiveUp, false);

                // Timer
                this.stepTimer = new StepTimer();
            }
            catch (Exception exception)
            {
                Debug.LogError(exception);
                SIGVerseLogger.Error(exception.Message);
                SIGVerseLogger.Error(exception.StackTrace);
                this.ApplicationQuitAfter1sec();
            }
        }
        void Awake()
        {
            this.timeLimit = HumanNaviConfig.Instance.configInfo.sessionTimeLimit;

            this.mainMenu = GameObject.FindGameObjectWithTag("MainMenu");

            this.panelMainController = this.mainMenu.GetComponent <PanelMainController>();

            this.timeIsUpDestinations = new List <GameObject>();
            foreach (string timeIsUpDestinationTag in this.timeIsUpDestinationTags)
            {
                GameObject[] timeIsUpDestinationArray = GameObject.FindGameObjectsWithTag(timeIsUpDestinationTag);

                foreach (GameObject timeIsUpDestination in timeIsUpDestinationArray)
                {
                    this.timeIsUpDestinations.Add(timeIsUpDestination);
                }
            }

            this.reachMaxWrongObjectGraspCountDestinations = new List <GameObject>();
            foreach (string reachMaxWrongObjectGraspCountDestinationTag in this.reachMaxWrongObjectGraspCountDestinationTags)
            {
                GameObject[] reachMaxWrongObjectGraspCountDestinationArray = GameObject.FindGameObjectsWithTag(reachMaxWrongObjectGraspCountDestinationTag);

                foreach (GameObject reachMaxWrongObjectGraspCountDestination in reachMaxWrongObjectGraspCountDestinationArray)
                {
                    this.reachMaxWrongObjectGraspCountDestinations.Add(reachMaxWrongObjectGraspCountDestination);
                }
            }
        }
Пример #4
0
        void Awake()
        {
            this.mainMenu = GameObject.FindGameObjectWithTag("MainMenu");

            this.panelMainController = this.mainMenu.GetComponent <PanelMainController>();

            this.timeIsUpDestinations = new List <GameObject>();
            foreach (string timeIsUpDestinationTag in this.timeIsUpDestinationTags)
            {
                GameObject[] timeIsUpDestinationArray = GameObject.FindGameObjectsWithTag(timeIsUpDestinationTag);

                foreach (GameObject timeIsUpDestination in timeIsUpDestinationArray)
                {
                    this.timeIsUpDestinations.Add(timeIsUpDestination);
                }
            }
        }
Пример #5
0
        void Awake()
        {
            try
            {
                this.tool = new HandymanModeratorTool(this.environments, this.scoreManager, this.avatarMotionPlayback, this.playbackManager);

                this.stepTimer = new StepTimer();

                this.mainMenu            = GameObject.FindGameObjectWithTag("MainMenu");
                this.mainPanelController = mainMenu.GetComponent <PanelMainController>();
            }
            catch (Exception exception)
            {
                Debug.LogError(exception);
                SIGVerseLogger.Error(exception.Message);
                SIGVerseLogger.Error(exception.StackTrace);
                this.ApplicationQuitAfter1sec();
            }
        }
Пример #6
0
        void Awake()
        {
            try
            {
                // Playback system
                this.playbackRecorder = this.playbackManager.GetComponent <HumanNaviPlaybackRecorder>();

                // Avatar
                this.initialAvatarPosition = this.avatar.transform.position;
                this.initialAvatarRotation = this.avatar.transform.eulerAngles;

                // GUI
                this.mainMenu            = GameObject.FindGameObjectWithTag("MainMenu");
                this.panelMainController = mainMenu.GetComponent <PanelMainController>();

                this.noticePanelForAvatar.SetActive(false);
                this.noticeTextForAvatar.text = "";

                // MessageMap
                this.receivedMessageMap = new Dictionary <string, bool>();
                this.receivedMessageMap.Add(MsgIamReady, false);
                this.receivedMessageMap.Add(MsgGetAvatarPose, false);
                this.receivedMessageMap.Add(MsgConfirmSpeechState, false);
                this.receivedMessageMap.Add(MsgGiveUp, false);

                // ROSBridge
                // (Should be read after the robot is instantiated (after Awake process of SessionManager))
                this.rosConnections = SIGVerseUtils.FindObjectsOfInterface <IRosConnection>();
                SIGVerseLogger.Info("ROS connection : count=" + this.rosConnections.Length);

                // Timer
                this.stepTimer = new StepTimer();
            }
            catch (Exception exception)
            {
                Debug.LogError(exception);
                SIGVerseLogger.Error(exception.Message);
                SIGVerseLogger.Error(exception.StackTrace);
                this.ApplicationQuitAfter1sec();
            }
        }
        void Awake()
        {
            this.timeLimit = HandymanConfig.Instance.configFileInfo.sessionTimeLimit;

            this.mainMenu = GameObject.FindGameObjectWithTag("MainMenu");

            this.panelMainController = this.mainMenu.GetComponent <PanelMainController>();


            this.timeIsUpDestinations = new List <GameObject>();

            foreach (string timeIsUpDestinationTag in this.timeIsUpDestinationTags)
            {
                GameObject[] timeIsUpDestinationArray = GameObject.FindGameObjectsWithTag(timeIsUpDestinationTag);

                foreach (GameObject timeIsUpDestination in timeIsUpDestinationArray)
                {
                    this.timeIsUpDestinations.Add(timeIsUpDestination);
                }
            }
        }