Ejemplo n.º 1
0
    private void Awake()
    {
        isOverloaded       = false;
        healthBar          = GetComponentInChildren <HealthBar>();
        characterPrefs     = GetComponent <CHARACTER_PREFS>();
        selectedGameObject = transform.Find("SelectedArrow").gameObject;
        characterManager   = GameObject.FindGameObjectWithTag("characterManager").GetComponent <CHARACTER_MNG>();

        SetHealth();
        healthSystem = new HealthSystem(maxHealth);
        curHealth    = maxHealth;
        healthBar.SetMaxHealth(maxHealth);
        healthBar.SetHealth(curHealth);
        healthBar.SetHealthNumber(curHealth);
        movePosition      = GetComponent <MovePositionPathfinding>();
        sceneCombatSystem = GameObject.FindWithTag("CombatHandler").GetComponent <GridCombatSystem>();
    }
Ejemplo n.º 2
0
 private void Awake()
 {
     rigidbody2D    = GetComponent <Rigidbody2D>();
     characterPrefs = GetComponent <CHARACTER_PREFS>();
 }