public void onClickHobo() { Debug.Log("Clicked"); BumClass bum = new BumClass(); //bum.BumInit(1); Instantiate(hobo, new Vector3(0, 0, 15), transform.rotation); }
public void SetHoboStats(BumClass hoboStats) { hoboDamage.SetText(hoboStats.damage.ToString()); hoboHealth.SetText(hoboStats.hp.ToString()); hoboFireRate.SetText(hoboStats.fire_rate.ToString()); if (hoboStats.starving_on) { hoboTraits.SetText("Starving"); } else if (hoboStats.bum_aoe_on) { hoboTraits.SetText("AOE"); } else if (hoboStats.hostile_on) { //hoboStats.gameObject.GetComponent<Renderer>().material.color = Color.red; hoboStats.gameObject.transform.Find("Beard").GetComponent <Renderer>().material.color = Color.red; hoboTraits.SetText("Hostile"); } else { hoboTraits.SetText("No trait"); } }