void Start()
 {
     hudDisplay    = GameObject.Find("/UserInterface/HUD");
     statusMessage = GameObject.Find("/UserInterface/HUD/StatusMsg").GetComponent <TextMesh>();
     this.sounds   = GetComponent <Sounds>();
     appStatus     = GameObject.Find("AppStatus").GetComponent <CalibrationAppState>();
     controls.Player.SetCallbacks(this);
     controls.Player.Enable();
 }
예제 #2
0
    // Start is called before the first frame update
    void Start()
    {
        appStatus        = GameObject.Find("AppStatus").GetComponent <CalibrationAppState>();
        previousStatus   = appStatus.GetState();
        sensitivityLevel = 5;

        statusMsg  = GameObject.Find("StatusMsg").GetComponent <TextMesh>();
        mode       = GameObject.Find("StatusDisplay/CurrentMode").GetComponent <TextMesh>();
        multiplier = GameObject.Find("StatusDisplay/MultiplierCount").GetComponent <TextMesh>();

        //Controls tips
        controlTips  = GameObject.Find("/UserInterface/ControlTips");
        aVisual      = GameObject.Find("/UserInterface/ControlTips/main_controls/a_button");
        aText        = GameObject.Find("/UserInterface/ControlTips/main_controls/a_button/a_button_text").GetComponent <TextMesh>();
        bVisual      = GameObject.Find("/UserInterface/ControlTips/main_controls/b_button");
        bText        = GameObject.Find("/UserInterface/ControlTips/main_controls/b_button/b_button_text").GetComponent <TextMesh>();
        moveControls = GameObject.Find("/UserInterface/ControlTips/manipulation_controls");
        upArrow      = GameObject.Find("/UserInterface/ControlTips/manipulation_controls/left_stick/up_arrow");
        downArrow    = GameObject.Find("/UserInterface/ControlTips/manipulation_controls/left_stick/down_arrow");
        leftArrow    = GameObject.Find("/UserInterface/ControlTips/manipulation_controls/left_stick/left_arrow");
        rightArrow   = GameObject.Find("/UserInterface/ControlTips/manipulation_controls/left_stick/right_arrow");
        menuButton   = GameObject.Find("/UserInterface/ControlTips/main_controls/menu_button");
        EventManager.OnStateChange       += OnStateChange;
        EventManager.OnMultiplierChanged += OnMultiplierChanged;



        //shift controls to initial position (not showing dpad)
        //control_tips.transform.Translate(0.0f, -shiftControls*scaleFactor, 0.0f);
        moveControls.SetActive(false);



        statusMsg.text  = "Align the hologram with the cube. Press A to begin.";
        multiplier.text = sensitivityLevel.ToString();
    }