//private Vector3 nextRespawnLocation; // Use this for initialization void Start() { rb = GetComponent <Rigidbody2D> (); GameObject cameraObject = GameObject.FindGameObjectWithTag("MainCamera"); myCamera = cameraObject.GetComponent <Camera> (); ghost = ghostObject.GetComponent <GhostController> (); controllerName = ""; getControllerName(); nextShot = 0.0f; currentHealth = maxHealth; blinkDamageAnimation = GetComponent <BlinkDamageAnimation> (); healthTracker = GetComponent <HealthTracker> (); healthTracker.startHealth(maxHealth); gameController = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameController> (); isDead = false; }
// Use this for initialization void Start() { coreBlinkAnimation = GetComponentInChildren <BlinkDamageAnimation> (); currentHealth = maxHealth; difficulty = 0; wanderBehavior = GetComponent <WanderBehavior> (); wanderBehavior.setActive(true); followBehavior = GetComponent <FollowBehavior> (); wanderBehavior.setActive(false); shieldSpawner = GetComponentInChildren <ShieldSpawner> (); gunSpawner = GetComponentInChildren <GunSpawner> (); wallGunSpawner = GetComponentInChildren <WallGunSpawner> (); targetFire = GetComponent <TargettedFireBehavior> (); trapSpawner = GetComponentInChildren <TrapSpawner> (); nextBehaviorStartTime = Time.time + behaviorDelay; nextBehaviorEndTime = nextBehaviorStartTime + behaviorDuration; // targetFire.setStatus (true); // wallGunSpawner.setStatus (true); gameController = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameController> (); }