Пример #1
0
    // Start is called before the first frame update
    void Start()
    {
        player    = GameObject.Find("MonkE").GetComponent <PlayerController>();
        golemPath = GetComponent <AIPath>();


        if (gameObject.name == "crawler(Clone)")
        {
            golem_Right = "Crawler_Right";
            golem_Down  = "Crawler_Down";
            golem_Left  = "Crawler_Left";
            golem_Up    = "Crawler_Up";

            attack_down  = "Crawler_Attack_Down";
            attack_up    = "Crawler_Attack_Up";
            attack_left  = "Crawler_Attack_L";
            attack_right = "Crawler_Attack_R";
        }
        else if (gameObject.name == "shooting enemy (Clone)")
        {
            golem_Right = "Golem_Shoot_Right";
            golem_Left  = "Golem_Shoot_Left";
            golem_Down  = "Golem_Shoot_Down";
            golem_Up    = "Golem_Shoot_Up";
        }
        else if (gameObject.name == "Crouchie(Clone)")
        {
            golem_Right  = "Golem_Crouch_Right";
            golem_Left   = "Golem_Crouch_Left";
            golem_Down   = "Golem_Crouch_Down";
            golem_Up     = "Golem_Crouch_Up";
            attack_down  = "Crouchie_Attack_Down";
            attack_up    = "Crouchie_Attack_Up";
            attack_left  = "Crouchie_Attack_Left";
            attack_right = "Crouchie_Attack_Right";
        }
        else if (gameObject.name == "Golem(Clone)")
        {
            golem_Right  = "Golem_Right";
            golem_Left   = "Golem_Left";
            golem_Down   = "Golem_Down";
            golem_Up     = "Golem_UP";
            attack_down  = "Golem_Attack_Down";
            attack_up    = "Golem_Attack_Up";
            attack_left  = "Golem_Attack_Left";
            attack_right = "Golem_Attack_Right";
        }
        anim = GetComponent <AnimatorLogic>();
    }
Пример #2
0
 // Start is called before the first frame update
 void Start()
 {
     damageSound   = GetComponent <AudioSource>();
     target        = GameObject.FindGameObjectWithTag("Player").GetComponent <Transform>();
     spawn         = GameObject.Find("SpawnControl").GetComponent <SpawnLogic>();
     spawn.enabled = false;
     animator      = GetComponent <AnimatorLogic>();
     // rb = GetComponent<Rigidbody2D>();
     monkE      = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>();
     Max_Health = health;
     currentWaveText.enabled = false;
     numOfGolemsLeft.enabled = false;
     bossText.SetActive(true);
     bar.SetActive(true);
     StartCoroutine(BossIntro());
 }
Пример #3
0
 // Start is called before the first frame update
 void Start()
 {
     rb2D          = GetComponent <Rigidbody2D>();
     animatorLogic = GetComponent <AnimatorLogic>();
     camera        = GameObject.Find("Main Camera").GetComponent <Camera>();
 }