// Use this for initialization void Start() { tm = FindObjectOfType<turns_manager>(); attackdist = 4; maxdist = 15; speed = 0.2f; isMoving = true; entrance = GameObject.Find("Entrance"); entrancePos = entrance.transform.position; }
void Start() { //Do we reduce the summon points here or in game controller? //Searches for the class of the new unit charClass = transform.parent.gameObject; StatBlock statScript = charClass.GetComponent<StatBlock> (); //can someone get all of these at once? hp= statScript.HP (); maxhp = statScript.maxHP (); attack = statScript.attack (); critchance = statScript.critchance (); attackrange = statScript.attackRange (); armor = statScript.armor(); healval = statScript.heal (); tm = FindObjectOfType<turns_manager>(); }