コード例 #1
0
 void Start()
 {
     mouseControls = GetComponent <Mouse_Look>();
     //npcBehavior = npcScript.GetComponent<NPCBehavior>();
     designerChanges = designerScript.GetComponent <DesignerChanges>();
     buttons         = buttonScript.GetComponent <Buttons>();
     // npcScript = GameObject.Find("NPC");
 }
コード例 #2
0
    // Start is called before the first frame update
    void Start()
    {
        _player            = GameObject.FindGameObjectWithTag("Player");
        _playerMouseScript = _player.GetComponent <Mouse_Look>();
        _mainCam           = GameObject.FindGameObjectWithTag("MainCamera");
        _cameraMouseScript = _mainCam.GetComponent <Mouse_Look>();

        if (damageOverlayImage == null)
        {
            damageOverlayImage = GameObject.FindGameObjectWithTag("Health Image").GetComponent <Image>();
        }
    }
コード例 #3
0
 //Initialization
 void Start()
 {
     //setting the in game gui on and the escape menu off
     m_InGameUI.SetActive(true);
     m_EscapeMenu.SetActive(false);
     //hiding the cursor and locking it so you cant accidentally click outside the window.
     Cursor.visible   = false;
     Cursor.lockState = CursorLockMode.Locked;
     //getting compnent references
     m_MouseLook      = m_Player.GetComponent <Mouse_Look>();
     m_MoveController = m_Player.GetComponent <MovementController>();
 }
コード例 #4
0
    private void Start()
    {
        _player          = GameObject.FindGameObjectWithTag("Player");
        _helditemsScript = _player.GetComponent <Held_Items>();

        _camera = GameObject.FindGameObjectWithTag("MainCamera");

        _playerMouseScript = _player.GetComponent <Mouse_Look>();
        _cameraMouseScript = _camera.GetComponent <Mouse_Look>();
        _controlScript     = _player.GetComponent <Player_Controller_v1>();

        if (inventory == null)
        {
            inventory = GameObject.FindGameObjectWithTag("Inventory");
            inventory.SetActive(false);
        }
    }
コード例 #5
0
 // Use this for initialization
 void Start()
 {
     camera     = GameObject.Find("Main Camera");
     cam_script = camera.GetComponent <Mouse_Look> ();
 }