private void Awake()
    {
        controllerUI   = FindObjectOfType <ControllerUI>();
        OnPlayerDeath += gameManager.GameOver;
        playerRB2D     = GetComponent <Rigidbody2D>();
        Health         = playerHealth;

        controllerUI.SetHealthBarMax(playerHealth);
    }
예제 #2
0
    // Token: 0x06005569 RID: 21865 RVA: 0x001D7898 File Offset: 0x001D5C98
    private void EnableControllerVisibility(ControllerHand hand, bool enable)
    {
        ControllerUI controllerUI = VRCTrackingManager.GetControllerUI(hand);

        if (controllerUI != null)
        {
            controllerUI.EnableVisibility(enable);
        }
    }
예제 #3
0
    void Start()
    {
        cUI          = GetComponent <ControllerUI>();
        canvas       = gameObject.transform.GetChild(0).transform.gameObject;
        audioManager = gameObject.transform.GetChild(1).GetComponent <AudioManager>();
        activeState  = new BeginState(this);

        audioManager.PlaySong("Myspals_introSongStart");
    }
예제 #4
0
        public MainMenuState(GameStateManager managerRef)
        {
            Debug.Log("Constructing MainState");
            gameStateManager = managerRef;
            canvas           = gameStateManager.GetCavnas();
            cUI          = gameStateManager.GetControllerUI();
            audioManager = gameStateManager.GetAudioManager();

            ShowIt();
        }
예제 #5
0
	void Start () {
		cUI = GetComponent<ControllerUI>();
		canvas = gameObject.transform.GetChild(0).transform.gameObject;
		audioManager = gameObject.transform.GetChild(1).GetComponent<AudioManager>();
		activeState = new BeginState(this);

		audioManager.PlaySong("Myspals_introSongStart");


	}
예제 #6
0
		public MainMenuState (GameStateManager managerRef)
		{
			Debug.Log("Constructing MainState");
			gameStateManager = managerRef;
			canvas = gameStateManager.GetCavnas();
			cUI = gameStateManager.GetControllerUI();
			audioManager = gameStateManager.GetAudioManager();

			ShowIt();

		}
    //If this is the first and only controller, the following runtime assignments are made.
    void OnEnable()
    {
        CurrentDifficulty = difficulty;

        GetGameController = this.gameObject.GetComponent <ControllerGame> ();

        ControllerUI.InitializeUI(uiMainMenu, uiLevel, uiPause, uiDeath, uiVictory);

        SceneManager.sceneLoaded += OnSceneLoaded;

        InitializeAudio();
    }
예제 #8
0
    // Token: 0x06005579 RID: 21881 RVA: 0x001D7F30 File Offset: 0x001D6330
    private void DeactivateLabel(TutorialManager.ActiveLabel label)
    {
        label.TimeToLive = -1f;
        label.Label.Deactivate();
        ControllerUI controllerUI = VRCTrackingManager.GetControllerUI(label.Hand);

        if (controllerUI != null)
        {
            controllerUI.EnableHighlight(label.ControllerPart, false);
        }
        this.RefreshControllerUiVisibility(label.Hand);
    }
예제 #9
0
 // Token: 0x060056CC RID: 22220 RVA: 0x001DDBBC File Offset: 0x001DBFBC
 public static ControllerUI GetControllerUI(ControllerHand hand)
 {
     foreach (VRCTracking vrctracking in VRCTrackingManager.instance.activeTrackers)
     {
         ControllerUI controllerUI = vrctracking.GetControllerUI(hand);
         if (controllerUI != null)
         {
             return(controllerUI);
         }
     }
     return(null);
 }
예제 #10
0
        public PauseState(GameStateManager managerRef)
        {
            Debug.Log("Constructing PauseState");
            gameStateManager = managerRef;
            cUI          = gameStateManager.GetControllerUI();
            audioManager = gameStateManager.GetAudioManager();
            canvas       = gameStateManager.GetCavnas();

            audioManager.PauseMusic();

            Time.timeScale = 0;
            ShowIt();
        }
예제 #11
0
        public PlayState(GameStateManager managerRef)
        {
            Debug.Log("Constructing PlayState");
            gameStateManager = managerRef;
            canvas           = gameStateManager.GetCavnas();
            cUI          = gameStateManager.GetControllerUI();
            audioManager = gameStateManager.GetAudioManager();

            ShowIt();

            audioManager.PlaySong("Myspals_field");

            Time.timeScale = 1;
        }
예제 #12
0
		public PlayState (GameStateManager managerRef)
		{
			Debug.Log("Constructing PlayState");
			gameStateManager = managerRef;
			canvas = gameStateManager.GetCavnas();
			cUI = gameStateManager.GetControllerUI();
			audioManager = gameStateManager.GetAudioManager();

			ShowIt();

			audioManager.PlaySong("Myspals_field");

			Time.timeScale = 1;
		}
예제 #13
0
    void Start()
    {
        manager      = GetComponent <GameStateManager>();
        canvas       = GameObject.Find("Canvas");
        cUI          = GetComponent <ControllerUI>();
        audioManager = GetComponent <AudioManager>();

        pausePanel    = canvas.transform.GetChild(4).gameObject;
        areUSurePanel = canvas.transform.GetChild(5).gameObject;

        quittingText         = Resources.Load("Text/AreYouSure/Quitting") as TextAsset;
        returnToMainMenuText = Resources.Load("Text/AreYouSure/ReturntoMainMenu") as TextAsset;

        quitting = false;
    }
예제 #14
0
	void Start()
	{
		manager = GetComponent<GameStateManager>();
		canvas = GameObject.Find("Canvas");
		cUI = GetComponent<ControllerUI>();
		audioManager = GetComponent<AudioManager>();

		pausePanel = canvas.transform.GetChild(4).gameObject;
		areUSurePanel = canvas.transform.GetChild(5).gameObject;

		quittingText = Resources.Load("Text/AreYouSure/Quitting") as TextAsset;
		returnToMainMenuText = Resources.Load("Text/AreYouSure/ReturntoMainMenu") as TextAsset;

		quitting = false;
	}
예제 #15
0
        // Token: 0x06005580 RID: 21888 RVA: 0x001D8160 File Offset: 0x001D6560
        public void SetController(ControllerHand hand, ControllerInputUI part)
        {
            ControllerUI controllerUI = VRCTrackingManager.GetControllerUI(this.Hand);

            if (controllerUI != null)
            {
                controllerUI.EnableHighlight(this.ControllerPart, false);
            }
            ControllerUI controllerUI2 = VRCTrackingManager.GetControllerUI(hand);

            if (controllerUI2 != null)
            {
                controllerUI2.EnableHighlight(part, true);
            }
            this.Hand           = hand;
            this.ControllerPart = part;
        }
예제 #16
0
		public PauseState (GameStateManager managerRef)
		{
			Debug.Log("Constructing PauseState");
			gameStateManager = managerRef;
			cUI = gameStateManager.GetControllerUI();
			audioManager = gameStateManager.GetAudioManager();
			canvas = gameStateManager.GetCavnas();

			audioManager.PauseMusic();

			Time.timeScale = 0;
			ShowIt();




		}
예제 #17
0
    // Token: 0x06005570 RID: 21872 RVA: 0x001D79B4 File Offset: 0x001D5DB4
    public void ActivateControllerLabel(string id, ControllerHand hand, ControllerInputUI controllerPart, string text, float duration = 0.1f, int priority = 0)
    {
        ControllerUI controllerUI = VRCTrackingManager.GetControllerUI(hand);

        if (controllerUI == null)
        {
            return;
        }
        Transform transform;
        Transform transform2;

        if (!controllerUI.GetUIAttachmentPoints(controllerPart, out transform, out transform2))
        {
            return;
        }
        this.ActivateLabel(transform, id, TutorialLabelType.Controller, hand, controllerPart, text, ControllerActionUI.None, string.Empty, ControllerActionUI.None, duration, priority, new Vector3?(transform.position), new Vector3?(transform2.position), AttachMode.PositionAndRotation, true, 0.8f);
        this.RefreshControllerUiVisibility(hand);
    }
 //The Update functions are called every game cycle. They are broken into seperate methods for readability.
 void Update()
 {
     UpdateGameSpeed();
     ControllerInput.UpdateInput();
     ControllerUI.UpdateUI();
 }
예제 #19
0
 private void Awake()
 {
     s_singleton = this;
 }
 //Resets Per Level Values to Default
 private void ResetValues()
 {
     state       = GameState.Start;
     buildExists = true;
     ControllerUI.ResetUI();
 }