// Start is called before the first frame update
 void Start()
 {
     playerController = GetComponent <FirstPersonPlayerController>();
     camSmoothing     = playerController.GetCamSmoothingEnabled();
     lookSpeed        = playerController.GetLookSpeed();
     responsiveness   = playerController.GetCamResponsiveness();
 }
Пример #2
0
    void Start()
    {
        agent = GetComponent <NavMeshAgent>();

        target       = GameObject.FindGameObjectWithTag("Player").transform;
        PlayerScript = target.GetComponent <FirstPersonPlayerController>();
    }
Пример #3
0
    // Start is called before the first frame update
    void Start()
    {
        OnLevelStart.Invoke();
        victoryText.SetActive(false);

        fpControl     = player.GetComponent <FirstPersonPlayerController>();
        camController = player.GetComponent <CameraController>();
    }
    //GodCameraController godController; //We don't need the GodCameracontroller object atm because that is all handled in the actual camera itself, eg "godCamera", not on the gameobject it's attached to.

    private void Awake()
    {
        //Init canvas things
        uiCanvasWrapper = GameObject.FindGameObjectWithTag("ElementUI");
        reticalCanvas   = GameObject.FindGameObjectWithTag("ReticalCanvas").GetComponent <Canvas>();

        //Init camera things
        godCamera    = GameObject.FindGameObjectWithTag("GodCam").GetComponent <Camera>();
        playerCamera = GameObject.FindGameObjectWithTag("FPSCam").GetComponent <Camera>();

        //Init extra gameObjects and things
        godHand          = GameObject.FindGameObjectWithTag("GodHand");
        playerHand       = GameObject.FindGameObjectWithTag("Hand");
        playerController = GameObject.FindGameObjectWithTag("Player").GetComponent <FirstPersonPlayerController>();
    }
Пример #5
0
    void Start()
    {
        player        = FirstPersonPlayerController.FindObjectOfType <FirstPersonPlayerController>();
        canShoot      = true;
        poolMunicion  = GameObject.Find("PoolMunicionPlayer");
        listaMunicion = new List <GameObject>();

        armaActual     = null;
        armaPrincipal  = null;
        armaSecundaria = null;

        for (int i = 0; i < 30; i++)
        {
            GameObject bala = Instantiate(balaPrefab) as GameObject;
            bala.transform.parent = poolMunicion.transform;

            bala.SetActive(false);

            listaMunicion.Add(bala);
        }
    }
Пример #6
0
 // Start is called before the first frame update
 void Start()
 {
     fpControl     = player.GetComponent <FirstPersonPlayerController>();
     camController = player.GetComponent <CameraController>();
 }
Пример #7
0
 void Start()
 {
     player = FirstPersonPlayerController.FindObjectOfType <FirstPersonPlayerController>();
 }
Пример #8
0
 void Start()
 {
     control = GetComponent <FirstPersonPlayerController>();
 }
Пример #9
0
 void Start()
 {
     player       = FirstPersonPlayerController.FindObjectOfType <FirstPersonPlayerController>();
     hambreActual = hambreTotal;
     hambreTimer  = 1;
 }
Пример #10
0
 void Start()
 {
     controladorArma = ArmaController.FindObjectOfType <ArmaController>();
     player          = FirstPersonPlayerController.FindObjectOfType <FirstPersonPlayerController>();
 }
Пример #11
0
 void Start()
 {
     hambre           = SistemaDeHambre.FindObjectOfType <SistemaDeHambre>();
     player           = FirstPersonPlayerController.FindObjectOfType <FirstPersonPlayerController>();
     inventarioPlayer = InventarioManager.FindObjectOfType <InventarioManager>();
 }