Пример #1
0
 void Start()
 {
     monster       = GameObject.Find("Enemy");
     monster_behav = monster.GetComponent <Monster_behavior>();
     a_button      = GameObject.Find("AttackButton");
     att           = a_button.GetComponent <AttackButton>();
 }
    void Start()
    {
        M_collision_enabled         = monster_area.GetComponent <BoxCollider2D>();
        M_collision_enabled.enabled = false;

        rend            = GetComponent <Renderer>();
        rend.enabled    = true;
        monster         = GameObject.FindGameObjectWithTag("Enemy");
        next_t          = monster.GetComponent <Monster_behavior>();
        attackButton    = attack_Button.GetComponent <AttackButton>();
        m_status        = monster.GetComponent <MonsterStatus>();
        m_status.attack = false;
    }