private void Update() { if (_man == null) { var _gender = 0; var _proffesion = 0; _gender = Random.Range(0, 2); _proffesion = Random.Range(0, 5); string __name = null; Gender __gender = (Gender)_gender; __name = __gender == 0 ? Database._instance._namesManMale[Random.Range(0, 5)] : Database._instance._namesManFemale[Random.Range(0, 5)]; _man = new ManC(__name, __gender, AgeStage.Young, (Profession)_proffesion); } Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); if (Physics.Raycast(ray, out _hit, 100)) { if (_hit.transform.gameObject == gameObject) { if (Input.GetMouseButton(0)) { UIPanelCharacterInfo._instance.SetParam(_man); } } } }
public void SetParam(ManC _man) { _name.text = _man.GetName(); _gender.text = _man.GetGender(); _proffesion.text = _man.GetProfessionName(); }
public void Eat(ManC _man) => _man.SetHunger(_satiety);