Exemplo n.º 1
0
        // Use this for initialization
        void Start()
        {
			player = gameObject;
			drone = GameObject.FindGameObjectWithTag("Drone");

			cam = GetComponentInChildren<Camera>();
			DroneCAM = drone.GetComponentInChildren<Camera>();
            mainCharacter = GetComponent<ThirdPersonCharacter>();
			playerControl = mainCharacter.GetComponent<Player>();
			screenFocus = mainCharacter.GetComponent<ScreenFocus>();

			DroneCAM.enabled = false;
		}
Exemplo n.º 2
0
		// Use this for initialization
		void Awake()
		{
			enemySight = GetComponent<EnemySight2>();
			nav = GetComponent<NavMeshAgent>();
			player = GameObject.FindGameObjectWithTag("Player").transform;
			audioSource = GetComponent<AudioSource>();
			globalLastPlayerSighting = GameObject.FindGameObjectWithTag("GM").GetComponent<LastPlayerSighting>();
			character = GetComponent<ThirdPersonCharacter>();
			playerScript = player.GetComponent<Player>();

			nav.updatePosition = true;
			nav.updateRotation = false;

			currentState = AI_STATE.PATROLLING;
			animator = GetComponent<Animator>();

			nextShotDelay = 0.0f;
		}
Exemplo n.º 3
0
        void Awake()
        {
            mainPlayer = GameObject.FindGameObjectWithTag("Player").GetComponent<ThirdPersonCharacter>();
			playerControl = mainPlayer.GetComponent<Player>();
            Drone = GetComponent<GameObject>();
        }