Exemplo n.º 1
0
    void Awake()
    {
        GameObject gameObjectES = GameObject.Find("ES");

        es     = gameObjectES.GetComponentInChildren <EarthShaker>();
        source = GetComponent <AudioSource>();

        source.PlayOneShot(soundEarthSkill, Random.Range(0.3f, 0.6f));
    }
Exemplo n.º 2
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");
    }
Exemplo n.º 3
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");
    }
Exemplo n.º 4
0
 private void Attack()
 {
     if (gameObjectChoosedToAttack != null && gameObjectChoosedToAttack.layer == 10)
     {
         es = gameObjectChoosedToAttack.GetComponentInChildren <EarthShaker>();
         es.SubHealth(damageBasic);
     }
     else if (gameObjectChoosedToAttack != null && gameObjectChoosedToAttack.layer == 11)
     {
         dwarf = gameObjectChoosedToAttack.GetComponentInChildren <Dwarf>();
         dwarf.SubHealth(damageBasic);
     }
     else if (gameObjectChoosedToAttack != null && gameObjectChoosedToAttack.layer == 12)
     {
         naga = gameObjectChoosedToAttack.GetComponentInChildren <NagaSiren>();
         naga.SubHealth(damageBasic);
     }
 }
Exemplo n.º 5
0
 void Awake()
 {
     targetPosition = new Vector2(transform.position.x, transform.position.y);
     es             = earthShaker.GetComponentInChildren <EarthShaker>();
     chooseHero     = earthShaker.GetComponentInChildren <ChooseHero>();
 }