Beispiel #1
0
 // Start is called before the first frame update
 void Start()
 {
     //assegno tramite la funzione getComponent l'animetor all'interno del gameObject ad anim
     anim = GetComponent <Animator>();
     // inposto lo stato iniziale a processing
     CurrentState = TurnState.Processing;
     //assegno al battle manager un GameObject di nome BatleManager tramite la funzione find e tramite la funzuione get component
     // cerco in batleStateMachine che ho creato in gioco
     Bsm = GameObject.Find("BatleManager").GetComponent <BatleStateMachine>();
     //assegno a start position la posizione dell nemico
     startPosition = transform.position;
     // inposto il selector a false
     Selector.SetActive(false);
     //inposto la setMaxHealt della HealtBar del nemico
     healtBar.setMaxHealth(enemy.currHP);
 }
Beispiel #2
0
 // Start is called before the first frame update
 void Start()
 {
     //assegno tramite la funzione getComponent l'animetor all'interno del gameObject ad anim
     anim = GetComponent <Animator>();
     //creo un pannello eroe e lo riempio di informazioni (per maggiori informazioni vedi la funzione crete hero panel)
     createHeroPanel();
     //assegno a start position la posizione dell player
     startPosition = transform.position;
     // tolgo dal limite massimo la agiliti
     maxCoolDown -= agility;
     // inposto lo stato iniziale a processing
     CurrentState = TurnState.Processing;
     //assegno al battle manager un GameObject di nome BatleManager tramite la funzione find e tramite la funzuione get component
     // cerco in batleStateMachine che ho creato in gioco
     Bsm = GameObject.Find("BatleManager").GetComponent <BatleStateMachine>();
     // inposto il selector a false
     Selector.SetActive(false);
 }