Ejemplo n.º 1
0
    void Start()
    {
        raycastShooting = GameObject.FindGameObjectWithTag("Player").GetComponent <RaycastShooting>();
        playerCam       = GameObject.FindGameObjectWithTag("PlayerCamera").GetComponent <Camera>();

        doorOpen = true;
    }
Ejemplo n.º 2
0
    void Start()
    {
        GameObject armObject = GameObject.FindWithTag("Arm");

        if (armObject != null)
        {
            raycastShooting = armObject.GetComponent <RaycastShooting>();
        }
        else
        {
            Debug.Log("Cannot find 'ArmObject' script");
        }

        GameObject gameControllerObject = GameObject.FindWithTag("GameController");

        if (gameControllerObject != null)
        {
            scoreManager = gameControllerObject.GetComponent <ScoreManager>();
            uiManager    = gameControllerObject.GetComponent <UIManager>();
        }
        else
        {
            Debug.Log("Cannot find 'GameController' script");
        }

        GameObject playerControllerObject = GameObject.FindWithTag("Player");

        if (playerControllerObject != null)
        {
            livesManager = playerControllerObject.GetComponent <LivesManager>();
        }
    }
Ejemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        raycastShooting = this.gameObject.GetComponent <RaycastShooting>();
        pause           = this.gameObject.GetComponent <Pause>();
        Vector3 rot = transform.localRotation.eulerAngles;

        rotY             = rot.y;
        rotX             = rot.x;
        Cursor.visible   = false;
        Cursor.lockState = CursorLockMode.Locked;
        GetComponent <Animator>().Play("Open Eyes");
    }
Ejemplo n.º 4
0
    void Start()
    {
        GameObject armObject = GameObject.FindWithTag("Arm");
        if (armObject != null)
        {
            raycastShooting = armObject.GetComponent<RaycastShooting>();
        }
        else
        {
            Debug.Log("Cannot find 'ArmObject' script");
        }

        GameObject gameControllerObject = GameObject.FindWithTag("GameController");
        if (gameControllerObject != null)
        {
            scoreManager = gameControllerObject.GetComponent<ScoreManager>();
            uiManager = gameControllerObject.GetComponent<UIManager>();
        }
        else
        {
            Debug.Log("Cannot find 'GameController' script");
        }

        GameObject playerControllerObject = GameObject.FindWithTag("Player");
        if(playerControllerObject != null)
        {
            livesManager = playerControllerObject.GetComponent<LivesManager>();
        }
    }
Ejemplo n.º 5
0
 public void Start()
 {
     playerController = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>();
     raycastShooting  = GameObject.FindGameObjectWithTag("Player").GetComponent <RaycastShooting>();
 }
Ejemplo n.º 6
0
 // Use this for initialization
 void Start()
 {
     raycastShooting = GameObject.FindGameObjectWithTag("Player").GetComponent <RaycastShooting>();
 }