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

        doorOpen = true;
    }
Example #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>();
        }
    }
Example #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");
    }
Example #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>();
        }
    }
Example #5
0
 public void Start()
 {
     playerController = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>();
     raycastShooting  = GameObject.FindGameObjectWithTag("Player").GetComponent <RaycastShooting>();
 }
Example #6
0
 // Use this for initialization
 void Start()
 {
     raycastShooting = GameObject.FindGameObjectWithTag("Player").GetComponent <RaycastShooting>();
 }