private float m_timer; // Keep track of time between ball drop fails // Use this for initialization void Start() { // Make the script a singleton if (s_Instance == null) { s_Instance = this; m_Manager = IntroSessionManager.s_Instance; m_RaycasterScript = IntroSessionManager.s_RaycasterScript; m_timer = 0; // Spawn a ball for the user m_Manager.SpawnNewBall(); // Display text and playback audio for dialogue, then wait for the audio to finish before continuing m_Manager.GlobalMessage(m_DialogueInstructions.DialogueElements[0]); // Open the trap door and reset the timer Debug.Log("STAGE4 CALLING OPENING SLIDING DOORS"); m_Manager.OpenSlidingDoors(); } else { Destroy(gameObject); } }
private GameObject m_CenterEyeAnchor; // Reference to the CenterEyeAnchor on the OVRCameraRig in Scene0 // Use this for initialization void Start() { if (s_Instance == null) { s_Instance = this; m_Manager = IntroSessionManager.s_Instance; m_CenterEyeAnchor = m_Manager.GetCenterEyeAnchor(); m_RaycasterScript = m_CenterEyeAnchor.GetComponent <RaycasterVR>(); m_LoadingBar = m_Manager.GetLoadingBar(); m_Reticle = m_Manager.GetReticle(); m_Manager.GetControllerModel().SetActive(false); // Make sure the controller model is hidden since it is shown after this scene. m_ArrowsList = new string[4] { "ArrowLeft", "ArrowUp", "ArrowRight", "ArrowDown" }; // The order in which the user is supposed to look at the arrows. i_CurrentArrow = 0; // Starts at the left arrow m_RaycasterScript.m_OverrideDefaultReticleControls = true; // Override the default controls of the reticle FaceArrowsToUser(); // Face the arrows towards the user m_Manager.GlobalMessage(m_DialogueInstructions.DialogueElements[0]); } else { Destroy(gameObject); } }
private bool m_IntroNotStarted = true; // If the scene has begun yet or not // Use this for initialization void Start() { if (s_Instance == null) { s_Instance = this; m_Manager = IntroSessionManager.s_Instance; } else { Destroy(gameObject); } }
private bool m_CanHitButton = true; // allows user to register one click for ending the stage // Use this for initialization void Start() { if (s_Instance == null) { s_Instance = this; m_Manager = IntroSessionManager.s_Instance; m_RaycasterScript = IntroSessionManager.s_RaycasterScript; StartCoroutine(Run()); // Begin the stage } else { Destroy(gameObject); } }
private int m_BallDroppedCount = 0; // Check How many times the ball has been dropped // Use this for initialization void Start() { if (s_Instance == null) { s_Instance = this; m_Manager = IntroSessionManager.s_Instance; m_RaycasterScript = IntroSessionManager.s_RaycasterScript; // Setting m_RaycasterScript // Start by making the robot give directions and then momentarilly dropping the ball Run(); } else { Destroy(gameObject); } }
private Color m_PrevColor; // Previous color of the message board. Used for when a toast is shown to save the state // Use this for initialization void Awake() { if (s_Instance == null) { s_Instance = this; ChangeMusic(0); m_Scenes = new string[7] { "Scene1", "Scene2", "Scene3", "Scene4", "Scene5", "Scene6", "EndScene" }; // The order of the scenes m_PlatformStartPos = m_StartingPlatform.transform.position; m_RobotAnimator = m_Robot.GetComponent <Animator>(); m_MaterialMap = new Hashtable(); s_RaycasterScript = m_CenterEyeAnchor.GetComponent <RaycasterVR>(); if (m_TestMode) { i_CurrentScene = m_StartScene - 1; } } else { Destroy(gameObject); } }