// Use this for initialization
    void Start()
    {
        pauseGameController = GetComponentInParent <PauseGameController>();

        button = GetComponent <Button>();
        button.onClick.AddListener(new UnityAction(() => pauseGameController.Unpause()));
    }
예제 #2
0
    // Start is called before the first frame update
    void Start()
    {
        // Set current state
        currentState = GameState.Start;

        // Prepare the Components and Tracking
        rb                          = GetComponent <Rigidbody>();
        headset                     = GameObject.Find("CenterEyeAnchor");
        pauseGameController         = GetComponent <PauseGameController>();
        pauseGameController.enabled = false;

        //Import Settings
        Coins = LoadManager.instance.data.Coins;

        // set the effects to off
        LeftEmission.SetActive(false);
        RightEmission.SetActive(false);

        //SetStartLocation
        transform.position = startingPoint.transform.position;
    }
예제 #3
0
 void Start()
 {
     pgc         = FindObjectOfType <PauseGameController>();
     gameManager = FindObjectOfType <GameManager>();
 }