public static Item GetTalkItemByType(PeEntity entity, AttribType _type, AttribType _typeMax) { Item curItem = null; float typevalue = entity.GetAttribute(_type); ETalkLevel typeLevel = SwichAtrrLevel(_type, typevalue, entity); if (typeLevel != ETalkLevel.Max) { curItem = GetTalkItem(_type, typeLevel); curItem.Type = _type; curItem.TypeMax = _typeMax; curItem.Level = typeLevel; } return(curItem); }
public static List <Item> GetPlyerTalkItems(PeEntity entity) { if (entity == null) { return(null); } List <Item> items = new List <Item>(); Item curItem; float Hp = entity.GetAttribute(AttribType.Hp); ETalkLevel HpLevel = SwichAtrrLevel(AttribType.Hp, Hp, entity); if (HpLevel != ETalkLevel.Max) { curItem = GetPlyerTalkItem(AttribType.Hp, HpLevel); curItem.Type = AttribType.Hp; curItem.Level = HpLevel; items.Add(curItem); } float Hunger = entity.GetAttribute(AttribType.Hunger); ETalkLevel Hungerlevel = SwichAtrrLevel(AttribType.Hunger, Hunger, entity); if (Hungerlevel != ETalkLevel.Max) { curItem = GetPlyerTalkItem(AttribType.Hunger, Hungerlevel); curItem.Type = AttribType.Hunger; curItem.Level = Hungerlevel; items.Add(curItem); } float Comfort = entity.GetAttribute(AttribType.Comfort); ETalkLevel Comfortevel = SwichAtrrLevel(AttribType.Comfort, Comfort, entity); if (Comfortevel != ETalkLevel.Max) { curItem = GetPlyerTalkItem(AttribType.Comfort, Comfortevel); curItem.Type = AttribType.Comfort; curItem.Level = Comfortevel; items.Add(curItem); } return(items); }
public TalkInfo(float time, float loopTime, ETalkLevel level) { mStartTime = time; mLevel = level; mLoopTime = loopTime; }
private static Item GetPlyerTalkItem(AttribType type, ETalkLevel level) { Dictionary <ETalkLevel, Item> Items = SwichMainPlyerItems(type); return(Items[level]); }