Ejemplo n.º 1
0
        static List <FirstName> GetFirstName(PeSex sex)
        {
            List <FirstName> listName = new List <FirstName>(10);

            foreach (FirstName ite in sFirstNamePool)
            {
                if (PeGender.Convert(ite.mSex + 1) == sex)
                {
                    listName.Add(ite);
                }
            }

            return(listName);
        }
Ejemplo n.º 2
0
        static void InitEquipment(PeEntity entity, IEnumerable <int> equipmentItemProtoIds)
        {
            if (equipmentItemProtoIds == null)
            {
                return;
            }

            Pathea.EquipmentCmpt equipmentCmpt = entity.GetCmpt <Pathea.EquipmentCmpt>();
            if (null == equipmentCmpt)
            {
                Debug.LogError("no equipment cmpt");
                return;
            }

            PeSex entitySex = entity.ExtGetSex();

            foreach (int equipmentItemProtoId in equipmentItemProtoIds)
            {
                ItemAsset.ItemProto itemProto = ItemAsset.ItemProto.Mgr.Instance.Get(equipmentItemProtoId);
                if (itemProto == null)
                {
                    continue;
                }

                if (!PeGender.IsMatch(itemProto.equipSex, entitySex))
                {
                    continue;
                }

                ItemAsset.ItemObject itemObj = ItemAsset.ItemMgr.Instance.CreateItem(equipmentItemProtoId);
                if (itemObj != null)
                {
                    equipmentCmpt.PutOnEquipment(itemObj);
                }
            }
        }