private void OnVisitorCreated(Logic.Visitor visitor) { nameText.text = visitor.Info.Name; sexText.text = visitor.Info.Sex == Constants.SexType.Male ? "남자" : "여자"; raceText.text = visitor.Info.RaceName; jobText.text = visitor.Info.JobName; attributeText.text = visitor.Info.AttributeDescription; }
void Start() { var visitorInfos = SdbInstance <Sdb.VisitorInfo> .GetAll(); var selectedInfo = Constants.RaceType.Asmodian_W; //visitorInfos[Random.Range(0, visitorInfos.Count)]; Logic.Visitor newVisitor = Logic.VisitorFactory.Instance.Create(selectedInfo); newVisitor.MoveToCounter(Logic.VisitorFactory.Instance.CounterPosition); }
private int CalculateScore(Logic.Visitor visitor) { Constants.RaceType raceType = visitor.Info.RaceType; Sdb.VisitorInfo visitorInfo = SdbInstance <Sdb.VisitorInfo> .Get(raceType.ToString()); int score = 0; int selectedIndex = visitorInfo.Attributes.IndexOf(visitor.SelectedAttribute); score += GetElementScore(selectedIndex); selectedIndex = visitorInfo.Facilities.IndexOf(visitor.SelectedFacility); score += GetElementScore(selectedIndex); selectedIndex = visitorInfo.Foods.IndexOf(visitor.SelectedFood); score += GetElementScore(selectedIndex); return(score); }
private void Awake() { targetVisitor = GetComponent <Logic.Visitor>(); explosion = FindObjectOfType <Explosion>(); explosion.Init(); }