Exemplo n.º 1
0
    void Awake()
    {
        UI = GameObject.Find("UI(Clone)");
        UI.transform.SetParent(transform);
        dagger         = gameObject.GetComponent <dagger>();
        halberd        = gameObject.GetComponent <halberd>();
        bow            = gameObject.GetComponent <bow>();
        currencyText   = GameObject.Find("Currency").GetComponent <Text>();
        rb             = GetComponent <Rigidbody2D>();
        anim           = GetComponent <Animator>();
        cont           = GetComponent <SceneController>();
        equippedWeapon = gameObject.GetComponent <dagger>();
        cam            = Camera.main;
        storeCont      = gameObject.GetComponent <StoreController>();

        HP = maxHP;
        renderhealth();
    }
Exemplo n.º 2
0
    void Awake()
    {
        UI = GameObject.Find("UI(Clone)");
        gameObject.GetComponent <halberd>().cooldownIconObject = GameObject.Find("HalberdCD");
        gameObject.GetComponent <dagger>().cooldownIconObject  = GameObject.Find("DaggerCD");
        gameObject.GetComponent <bow>().cooldownIconObject     = GameObject.Find("BowCD");
        dagger         = gameObject.GetComponent <dagger>();
        halberd        = gameObject.GetComponent <halberd>();
        bow            = gameObject.GetComponent <bow>();
        currencyText   = GameObject.Find("Currency").GetComponent <Text>();
        rb             = GetComponent <Rigidbody2D>();
        anim           = GetComponent <Animator>();
        cont           = GetComponent <SceneController>();
        equippedWeapon = gameObject.GetComponent <dagger>();
        cam            = Camera.main;
        storeCont      = gameObject.GetComponent <StoreController>();

        HP = maxHP;
        renderhealth();
    }