Ejemplo n.º 1
0
 void Awake()
 {
     player       = GameObject.FindGameObjectWithTag("Player");
     playerHealth = player.GetComponent <PlayerHealth> ();
     enemy        = GameObject.FindGameObjectWithTag("Enemy");
     //Change later to encompase all enemies
     vacHealth = enemy.GetComponent <VacuumHealth> ();
 }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     anim         = GetComponent <Animator> ();
     player       = GameObject.FindGameObjectWithTag("Player");
     vacuum       = GameObject.Find("VacuumRoombaPos");
     playerHealth = player.GetComponent <PlayerHealth> ();
     vacuumHealth = vacuum.GetComponent <VacuumHealth> ();
 }
Ejemplo n.º 3
0
 void Awake()
 {
     player       = GameObject.FindGameObjectWithTag("Player");
     playerHealth = player.GetComponent <PlayerHealth> ();
     vacuum       = GameObject.FindGameObjectWithTag("Enemy");
     //Change later to encompase all enemies
     vacHealth = vacuum.GetComponent <VacuumHealth> ();
     anim      = GameObject.Find("VacuumRoomba").GetComponent <Animator> ();
 }
Ejemplo n.º 4
0
 void Awake()
 {
     player               = GameObject.FindGameObjectWithTag("Player").transform;
     anim                 = GetComponent <Animator> ();
     animation            = GetComponent <Animation> ();
     playerHealth         = player.GetComponent <PlayerHealth> ();
     enemyHealth          = GetComponent <VacuumHealth> ();
     vac_nav              = GetComponent <NavMeshAgent> ();
     anim.applyRootMotion = false;
 }
Ejemplo n.º 5
0
    void Awake()
    {
        player               = GameObject.FindGameObjectWithTag("Player").transform;
        anim                 = GameObject.Find("VacuumRoomba").GetComponent <Animator> ();
        animation            = GetComponent <Animation> ();
        playerHealth         = player.GetComponent <PlayerHealth> ();
        enemyHealth          = GetComponent <VacuumHealth> ();
        vac_nav              = GetComponent <NavMeshAgent> ();
        anim.applyRootMotion = false;
        vacuum               = GameObject.Find("VacuumRoombaPos");
        GameObject cyclone = GameObject.Find("Cyclone");

        pSystem       = cyclone.GetComponent <ParticleSystem> ();
        finalPSystem  = GameObject.Find("Big Bang").GetComponent <ParticleSystem> ();
        spinPSystem   = GameObject.Find("Lightning Spark").GetComponent <ParticleSystem> ();
        meteorPSystem = GameObject.Find("Meteor Storm").GetComponent <ParticleSystem> ();
        rigidbody     = GetComponent <Rigidbody>();
        animation     = GetComponent <Animation> ();
    }
Ejemplo n.º 6
0
	// Use this for initialization
	void Start () {
		changeTimer = changeTimerDelay;
		shootingTimer = shootingTimeDelay;
		impacts = new GameObject[maxImpacts];
		for(int i = 0; i < maxImpacts; i++)
		{
			impacts[i] = (GameObject)Instantiate(impactPrefab);
		}

		anim = GetComponentInChildren<Animator> ();

		enemy = GameObject.FindGameObjectWithTag ("Enemy");
		//Change later to encompase all enemies
		vacHealth = enemy.GetComponent <VacuumHealth> ();

		//Set this for robot
		EnemyRobot = GameObject.FindGameObjectWithTag ("Robot");
		RobotHealth = EnemyRobot.GetComponent<EnemyHealth> ();

		//Set this for Helicopter
		EnemyHelicopter = GameObject.FindGameObjectWithTag ("Helicopter");
		HelicopterHealth = EnemyHelicopter.GetComponent<EnemyHealth> ();

		//Set this for Security camera
		EnemySecurityCamera = GameObject.FindGameObjectWithTag ("SecurityCamera");
		SecurityCameraHealth = EnemySecurityCamera.GetComponent<EnemyHealth> ();

		ammo = ammoAmount;
		changeToMain = false;

		playerpaw = GetComponent<PlayerPaw> ();

		//ToastAmmoText = GameObject.FindGameObjectWithTag ("ToastAmmoText");
		ToastAmmoText.enabled = false;

	}