예제 #1
0
 private void Awake()
 {
     characterBase      = GetComponent <Character_Base>();
     selectedGameObject = transform.Find("Selected").gameObject;
     movePosition       = GetComponent <MovePositionPathfinding>();
     //SetSelectedVisible(false);
     state        = State.Normal;
     healthSystem = new HealthSystem(100);
     healthBar    = new World_Bar(transform, new Vector3(0, 10), new Vector3(10, 1.3f), Color.grey, Color.red, 1f, 10000, new World_Bar.Outline {
         color = Color.black, size = .5f
     });
     healthSystem.OnHealthChanged += HealthSystem_OnHealthChanged;
 }
예제 #2
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>();
    }
 private void Start()
 {
     _movePositionPathfinding = GetComponent <MovePositionPathfinding>();
     Debug.Log($"MOVE POSITION PATH FINDING {_movePositionPathfinding}");
     OnActiveChanged += ActiveUnitChanged;
 }