示例#1
0
    void Start()
    {
        anim = GetComponent <Animator>();

        GameObject gameObjectPoint = GameObject.FindWithTag("PointsDemonFollow");

        pointDemonFollow = gameObjectPoint.GetComponentInChildren <PointEnemyFollow>();
        target           = pointDemonFollow.pointTransform[0];

        UIGamePlay = GameObject.Find("UIGamePlay");
    }
示例#2
0
    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];
    }
示例#3
0
    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;
    }
示例#4
0
    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");
    }
示例#5
0
    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");
    }
示例#6
0
    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);
    }
示例#7
0
    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);
    }