Example #1
0
    // Start is called before the first frame update
    void Start()
    {
        item_manager = GameObject.Find("ItemManager").GetComponent <ItemManager>();

        cow       = null; tiger = null; chicken = null;
        HPMax     = 1000;
        hp        = HPMax;
        hp_bar    = GameObject.FindWithTag("EChickenHp");
        hpbar_sx  = hp_bar.transform.localScale.x;
        hpbar_tx  = hp_bar.transform.localPosition.x;
        hpbar_tmp = hpbar_sx / HPMax;   //최대 체력에 따른 hp바 이동량 설정

        chicken_hp = GameObject.FindWithTag("chicken").GetComponent <Chicken_Attack>();
        cow_hp     = GameObject.FindWithTag("cow").GetComponent <Cow_Attack>();
        tiger_hp   = GameObject.FindWithTag("tiger").GetComponent <Tiger_Attack>();

        e_attack_data = GameObject.Find("E_AttackData").GetComponent <E_AttackData>();
        attack        = e_attack_data.Echicken_attack;

        //농장씬에서 죽었는지 파악
        if (!item_manager.cow_die)
        {
            cow = GameObject.Find("Cow").gameObject;
        }
        if (!item_manager.chicken_die)
        {
            chicken = GameObject.Find("Chicken").gameObject;
        }
        if (!item_manager.tiger_die)
        {
            tiger = GameObject.Find("tiger").gameObject;
        }

        Debug.Log("적닭 공격력: " + attack);
    }
Example #2
0
    // Start is called before the first frame update
    void Start()
    {
        Screen.SetResolution(1368, 768, true);
        ItemSlot = GameObject.Find("ItemSlot");
        Pos      = ItemSlot.transform.position;//농장 가기 전 위치

        //적군 공격력 증가 시작(전투 진행중이 아님을 알림)
        e_attack_data          = GameObject.Find("E_AttackData").GetComponent <E_AttackData>();
        e_attack_data.isBattle = false;
    }
Example #3
0
    // Start is called before the first frame update
    void Start()
    {
        Screen.SetResolution(1368, 768, true);
        cow     = GameObject.FindWithTag("cow");
        tiger   = GameObject.FindWithTag("tiger");
        chicken = GameObject.FindWithTag("chicken");

        item_manager = GameObject.Find("ItemManager").GetComponent <ItemManager>();

        e_attack_data = GameObject.Find("E_AttackData").GetComponent <E_AttackData>();
    }
Example #4
0
 // Start is called before the first frame update
 void Start()
 {
     item_manager  = GameObject.Find("ItemManager").GetComponent <ItemManager>();
     e_attack_data = GameObject.Find("E_AttackData").GetComponent <E_AttackData>();
 }