void Start() { anim = GetComponent <Animator>(); GameObject gameObjectPoint = GameObject.FindWithTag("PointsDemonFollow"); pointDemonFollow = gameObjectPoint.GetComponentInChildren <PointEnemyFollow>(); target = pointDemonFollow.pointTransform[0]; UIGamePlay = GameObject.Find("UIGamePlay"); }
void Start() { anim = GetComponent <Animator>(); sr = GetComponent <SpriteRenderer>(); UIGamePlay = GameObject.Find("UIGamePlay"); GameObject point = GameObject.FindWithTag("PointsBossFollow"); pointEnemyFollow = point.GetComponentInChildren <PointEnemyFollow>(); target = pointEnemyFollow.pointTransform[countPoint]; }
void Start() { anim = GetComponent <Animator>(); UIGamePlay = GameObject.Find("UIGamePlay"); GameObject gameObjectPoint = GameObject.FindWithTag("PointsBossFollow"); pointEnemyFollow = gameObjectPoint.GetComponent <PointEnemyFollow>(); target = pointEnemyFollow.pointTransform[0]; timeStartIdle = Time.time; }
void Start() { anim = GetComponent <Animator>(); GameObject gameObjectPoint = GameObject.FindWithTag("PointsDemonFollow"); pointMarauder = gameObjectPoint.GetComponentInChildren <PointEnemyFollow>(); target = pointMarauder.pointTransform[0]; heroEarthShaker = GameObject.Find("ES"); es = heroEarthShaker.GetComponent <EarthShaker>(); UIGamePlay = GameObject.Find("UIGamePlay"); }
void Start() { anim = GetComponent <Animator>(); GameObject gameObjectPoint = GameObject.Find("PointsEnemyFollow"); pointEnemyFollow = gameObjectPoint.GetComponent <PointEnemyFollow>(); target = pointEnemyFollow.pointTransform[0]; heroEarthShaker = GameObject.Find("ES"); es = heroEarthShaker.GetComponent <EarthShaker>(); UIGamePlay = GameObject.Find("UIGamePlay"); }
void Start() { anim = GetComponent <Animator>(); source = GetComponent <AudioSource>(); sr = GetComponent <SpriteRenderer>(); GameObject gameObjectPoint = GameObject.FindWithTag("PointsDemonFollow"); pointEnemyFollow = gameObjectPoint.GetComponent <PointEnemyFollow>(); targetMove = pointEnemyFollow.pointTransform[0]; scorchedEarth.GetComponent <ScorchedEarth>().SetDamage(damageMagic / 4); }
void Start() { GameObject gameObjectPoint = GameObject.FindWithTag("PointsDragonFollow"); pointEnemyFollow = gameObjectPoint.GetComponent <PointEnemyFollow>(); minDistance = Vector2.Distance(transform.position, pointEnemyFollow.pointTransform[0].position); for (int i = 0; i < pointEnemyFollow.pointTransform.Length - 1; i++) { if (minDistance > Vector2.Distance(transform.position, pointEnemyFollow.pointTransform[i + 1].position)) { targetPosition = pointEnemyFollow.pointTransform[i + 1].position; minDistance = Vector2.Distance(transform.position, targetPosition); } } targetPosition = new Vector3(targetPosition.x + Random.Range(-0.3f, 0.3f), targetPosition.y, targetPosition.z); }