Beispiel #1
0
    public static HeroCostume PhotonDataToHeroCostume2(PhotonPlayer player)
    {
        HeroCostume costume = new HeroCostume();
        SEX         sex     = IntToSex((int)player.customProperties[PhotonPlayerProperty.sex]);

        costume = new HeroCostume
        {
            sex              = sex,
            costumeId        = (int)player.customProperties[PhotonPlayerProperty.costumeId],
            id               = (int)player.customProperties[PhotonPlayerProperty.heroCostumeId],
            cape             = (bool)player.customProperties[PhotonPlayerProperty.cape],
            hairInfo         = (sex != SEX.MALE) ? CostumeHair.hairsF[(int)player.customProperties[PhotonPlayerProperty.hairInfo]] : CostumeHair.hairsM[(int)player.customProperties[PhotonPlayerProperty.hairInfo]],
            eye_texture_id   = (int)player.customProperties[PhotonPlayerProperty.eye_texture_id],
            beard_texture_id = (int)player.customProperties[PhotonPlayerProperty.beard_texture_id],
            glass_texture_id = (int)player.customProperties[PhotonPlayerProperty.glass_texture_id],
            skin_color       = (int)player.customProperties[PhotonPlayerProperty.skin_color],
            hair_color       = new Color((float)player.customProperties[PhotonPlayerProperty.hair_color1], (float)player.customProperties[PhotonPlayerProperty.hair_color2], (float)player.customProperties[PhotonPlayerProperty.hair_color3]),
            division         = IntToDivision((int)player.customProperties[PhotonPlayerProperty.division]),
            stat             = new HeroStat()
        };
        costume.stat.SPD     = (int)player.customProperties[PhotonPlayerProperty.statSPD];
        costume.stat.GAS     = (int)player.customProperties[PhotonPlayerProperty.statGAS];
        costume.stat.BLA     = (int)player.customProperties[PhotonPlayerProperty.statBLA];
        costume.stat.ACL     = (int)player.customProperties[PhotonPlayerProperty.statACL];
        costume.stat.skillId = (string)player.customProperties[PhotonPlayerProperty.statSKILL];
        if ((costume.costumeId == 0x19) && (costume.sex == SEX.FEMALE))
        {
            costume.costumeId = 0x1a;
        }
        costume.setBodyByCostumeId(-1);
        costume.setMesh2();
        costume.setTexture();
        return(costume);
    }
Beispiel #2
0
    public static HeroCostume PhotonDataToHeroCostume2(PhotonPlayer player)
    {
        HeroCostume costume = new HeroCostume();
        SEX         sex     = IntToSex(player.sex);

        costume = new HeroCostume
        {
            sex              = sex,
            costumeId        = player.costumeId,
            id               = player.heroCostumeId,
            cape             = player.cape,
            hairInfo         = (sex != SEX.MALE) ? CostumeHair.hairsF[player.hairInfo] : CostumeHair.hairsM[player.hairInfo],
            eye_texture_id   = player.eye_texture_id,
            beard_texture_id = player.beard_texture_id,
            glass_texture_id = player.glass_texture_id,
            skin_color       = player.skin_color,
            hair_color       = new Color(player.hair_color1, player.hair_color2, player.hair_color3),
            division         = IntToDivision(player.division),
            stat             = new HeroStat()
        };
        costume.stat.SPD     = player.statSPD;
        costume.stat.GAS     = player.statGAS;
        costume.stat.BLA     = player.statBLA;
        costume.stat.ACL     = player.statACL;
        costume.stat.skillId = player.statSKILL;
        if ((costume.costumeId == 0x19) && (costume.sex == SEX.FEMALE))
        {
            costume.costumeId = 0x1a;
        }
        costume.setBodyByCostumeId(-1);
        costume.setMesh2();
        costume.setTexture();
        return(costume);
    }
Beispiel #3
0
        public Hero(String name = "Henry", string nickname = "Henrietta", SEX sex = SEX.MALE)
        {
            Name     = name;
            Nickname = nickname;
            Sex      = sex;
            //Will be using TYPESOFCLOTHING enum in multiple locations
            int clothingTypeSize = (int)Enum.GetNames(typeof(TYPESOFCLOTHING)).Length;

            //initlizie wardrobe array with first position being size of TYPESOF CLOTHING ENUM
            //setting second  number as maximum number of clothing pieces in here
            Wardrobe = new Clothing[clothingTypeSize][];
            Wardrobe[(int)TYPESOFCLOTHING.SHIRT]   = new Clothing[(int)Enum.GetNames(typeof(SHIRTSENUM)).Length];
            Wardrobe[(int)TYPESOFCLOTHING.PANTS]   = new Clothing[(int)Enum.GetNames(typeof(PANTSENUM)).Length];
            Wardrobe[(int)TYPESOFCLOTHING.FACE]    = new Clothing[(int)Enum.GetNames(typeof(FACES_ENUM)).Length];
            Wardrobe[(int)TYPESOFCLOTHING.HAIR]    = new Clothing[(int)Enum.GetNames(typeof(HAIR_ENUM)).Length];
            Wardrobe[(int)TYPESOFCLOTHING.GLASSES] = new Clothing[(int)Enum.GetNames(typeof(GLASSES_ENUM)).Length];
            Wardrobe[(int)TYPESOFCLOTHING.SHOES]   = new Clothing[(int)Enum.GetNames(typeof(SHOES_ENUM)).Length];
            Wardrobe[(int)TYPESOFCLOTHING.SOCKS]   = new Clothing[(int)Enum.GetNames(typeof(SOCKS_ENUM)).Length];


            Body = Properties.Resources.Henry004;

            //Will access the positions in this array bassed on DistinctClothing Pieces ENUM
            Outfit = new Clothing[clothingTypeSize];


            //This will be the outfit that Henry will be wearying when the game starts
            //layer order taken care of in dressHero(). Not important here
            //Should also add to Henry's wardrobe, so that later in the game he can select this again

            int outfitTypeNum = (int)TYPESOFCLOTHING.SHIRT;
            int subNum        = (int)SHIRTSENUM.WEAVY_BLUE;


            starterOutfit(outfitTypeNum, subNum);


            outfitTypeNum = (int)TYPESOFCLOTHING.PANTS;
            subNum        = (int)PANTSENUM.SKIRT_BLUE;

            starterOutfit(outfitTypeNum, subNum);


            outfitTypeNum = (int)TYPESOFCLOTHING.FACE;
            subNum        = (int)FACES_ENUM.DERP;

            starterOutfit(outfitTypeNum, subNum);

            outfitTypeNum = (int)TYPESOFCLOTHING.HAIR;
            subNum        = (int)HAIR_ENUM.CURLY_PURPLE;

            starterOutfit(outfitTypeNum, subNum);
            starterOutfit((int)TYPESOFCLOTHING.SOCKS, (int)SOCKS_ENUM.PINK);

            starterOutfit((int)TYPESOFCLOTHING.SHOES, (int)SHOES_ENUM.CLOGS_BROWN);


            DressedHero = dressHero();
        }
 protected PlayerData(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     HomeMapID  = (String)info.GetValue("HomeMapID", typeof(string));
     Playername = (String)info.GetValue("Playername", typeof(String));
     UserID     = (String)info.GetValue("Username", typeof(String));
     myRace     = (Race)info.GetValue("Race", typeof(Race));
     mySex      = (SEX)info.GetValue("Sex", typeof(SEX));
 }
Beispiel #5
0
 public static string GetCharaPathMsgPack(string charaName, SEX sex)
 {
     if (sex == SEX.MALE)
     {
         return(Path.GetFullPath(Path.Combine(Application.dataPath, "..\\UserData\\Chara\\male\\" + charaName + ".bonemod")));
     }
     return(Path.GetFullPath(Path.Combine(Application.dataPath, "..\\UserData\\Chara\\female\\" + charaName + ".bonemod")));
 }
Beispiel #6
0
 /// <summary>
 /// 用户初始化
 /// </summary>
 public User(string name, string signature, SEX sex, string bj, string teacher)
 {
     Name      = name;
     Signature = signature;
     Sex       = sex;
     Class     = bj;
     Teacher   = teacher;
 }
Beispiel #7
0
 public Person(string name, SEX sex, string identityCode, string phoneNumber, string address, STATUS status = STATUS.AVAILABLE)
 {
     Name         = name;
     Sex          = sex;
     IdentityCode = identityCode;
     PhoneNumber  = phoneNumber;
     Address      = address;
     Status       = status;
 }
Beispiel #8
0
        public bool IsValidSex(SEX sex)
        {
            /*if(sex.GetType() == typeof(SEX))
             * {
             *  return true;
             * }
             * return false;*/

            return(sex is SEX);
        }
 public Customer(string name, string phoneNumber, string address, SEX sex, string username, string password, CUSTOMER_STATUS status = CUSTOMER_STATUS.ACTIVE)
 {
     Name        = name;
     PhoneNumber = phoneNumber;
     Address     = address;
     Sex         = sex;
     Status      = status;
     Username    = username;
     Password    = password;
 }
Beispiel #10
0
 public Nurse(Nurse _nurse)
 {
     name    = _nurse.name;
     sex     = _nurse.sex;
     id      = _nurse.id;
     pw      = _nurse.pw;
     licNum  = _nurse.licNum;
     phNum   = _nurse.phNum;
     groupID = _nurse.groupID;
     isChief = _nurse.isChief;
 }
Beispiel #11
0
    private void Start()
    {
        int num;

        QualitySettings.SetQualityLevel(5, true);
        this.costumeOption = HeroCostume.costumeOption;
        this.setup         = this.character.GetComponent <HERO_SETUP>();
        this.setup.init();
        this.setup.myCostume = new HeroCostume();
        this.copyCostume(HeroCostume.costume[2], this.setup.myCostume, false);
        this.setup.myCostume.setMesh2();
        this.setup.setCharacterComponent();
        SEX[] sexArray1 = new SEX[2];
        sexArray1[1]   = SEX.FEMALE;
        this.sexOption = sexArray1;
        this.eyeOption = new int[0x1c];
        for (num = 0; num < 0x1c; num++)
        {
            this.eyeOption[num] = num;
        }
        this.faceOption = new int[14];
        for (num = 0; num < 14; num++)
        {
            this.faceOption[num] = num + 0x20;
        }
        this.glassOption = new int[10];
        for (num = 0; num < 10; num++)
        {
            this.glassOption[num] = num + 0x30;
        }
        this.hairOption = new int[11];
        for (num = 0; num < 11; num++)
        {
            this.hairOption[num] = num;
        }
        this.skinOption = new int[3];
        for (num = 0; num < 3; num++)
        {
            this.skinOption[num] = num + 1;
        }
        this.capeOption = new int[2];
        for (num = 0; num < 2; num++)
        {
            this.capeOption[num] = num;
        }
        DIVISION[] divisionArray1 = new DIVISION[4];
        divisionArray1[1]   = DIVISION.TheGarrison;
        divisionArray1[2]   = DIVISION.TheMilitaryPolice;
        divisionArray1[3]   = DIVISION.TheSurveryCorps;
        this.divisionOption = divisionArray1;
        this.skillOption    = new string[] { "mikasa", "levi", "sasha", "jean", "marco", "armin", "petra" };
        this.CostumeDataToMyID();
        this.freshLabel();
    }
Beispiel #12
0
 private static int SexToInt(SEX id)
 {
     if (id == SEX.FEMALE)
     {
         return(0);
     }
     if (id == SEX.MALE)
     {
         return(1);
     }
     return(1);
 }
Beispiel #13
0
 public Monster(string _name, SEX _sex,
                int _level, int _speed, int _attack,
                int _defense, int _life,
                int _physical_capacity,
                int _magic_capacity,
                int _essence,
                int _hit,
                int _dodge,
                int _exercise) :
     base(_name, _sex, _level, _level, _attack, _defense, _life, _physical_capacity, _magic_capacity, _essence, _hit, _dodge)
 {
     exercise = _exercise;
 }
Beispiel #14
0
        public static string Convert(SEX sex)
        {
            switch (sex)
            {
            case SEX.FEMALE: return("Nữ");

            case SEX.MALE: return("Nam");

            case SEX.OTHER: return("Khác");

            default: return("");
            }
        }
        public static string Convert(SEX sex)
        {
            switch (sex)
            {
            case SEX.FEMALE: return("Female");

            case SEX.MALE: return("Male");

            case SEX.OTHER: return("Others");

            default: return("");
            }
        }
Beispiel #16
0
 public Dragon(string _name, SEX _sex,
               int _level, int _speed, int _attack,
               int _defense, int _life,
               int _physical_capacity,
               int _magic_capacity,
               int _essence,
               int _dragonType,
               int _loyalty,
               int _hit,
               int _dodge,
               Role _master) :
     base(_name, _sex, _level, _speed, _attack, _defense, _life, _physical_capacity, _magic_capacity, _essence, _hit, _dodge)
 {
     dragonType = _dragonType;
     loyalty    = _loyalty;
     master     = _master;
 }
Beispiel #17
0
        public string Description = ""; //TODO: add support in editor

        public void AddBodyTextures(SEX mySEx, Texture2D[] myLoadedFiles)
        {
            switch (mySEx)
            {
            case SEX.FEMALE:
                FemaleBodies = myLoadedFiles;
                break;

            case SEX.MALE:
                MaleBodies = myLoadedFiles;
                break;

            case SEX.NEUTRAL:

                break;
            }
        }
Beispiel #18
0
 public Role(string _name, SEX _sex, int _level, int _speed, int _attack, int _defense,
             int _life, int _physical_capacity, int _magic_capacity,
             int _essence, int _hit, int _dodge)
 {
     name = _name;
     sex  = _sex;
     physical_capacity = _physical_capacity;
     level             = _level;
     attack            = _attack;
     defense           = _defense;
     life           = _life;
     magic_capacity = _magic_capacity;
     essence        = _essence;
     hit            = _hit;
     dodge          = _dodge;
     moveSpeed      = _speed;
     skills         = new List <Skill>();
 }
        public IActionResult Register(string name, string phone, string address, int sex, string username, string password)
        {
            Dictionary <string, string> temp = new Dictionary <string, string>();

            if (this._unitofwork.CustomerRepos.IsUserNameExists(username))
            {
                temp.Add("Message", "Username has existed.");
                return(new JsonResult(temp));
            }
            else
            {
                SEX sexE    = (SEX)sex;
                var account = this._unitofwork.CustomerRepos.Add(new Customer(name, phone, address, sexE, username, password));
                HttpContext.Session.SetInt32("id", account.Id);
                HttpContext.Session.SetString("name", account.Name);
                return(PartialView("_Account"));
            }
        }
Beispiel #20
0
        public Nurse(string _info)
        {
            string[] str = _info.Split(',');
            name = str[0];              //1
            if (str[1].Equals("Male"))  //2
            {
                sex = SEX.Male;
            }
            else
            {
                sex = SEX.Female;
            }
            id     = str[2];        //3
            pw     = str[3];        //4
            licNum = str[4];        //5
            phNum  = str[5];        //6
            if (str[6].Equals("1")) //7
            {
                groupID = GROUP.Group1;
            }
            else if (str[6].Equals("2"))
            {
                groupID = GROUP.Group2;
            }
            else if (str[6].Equals("3"))
            {
                groupID = GROUP.Group3;
            }

            if (str[7].Equals("True"))  //8
            {
                isChief = true;
            }
            else
            {
                isChief = false;
            }
        }
Beispiel #21
0
 public Player(string _name, SEX _sex,
               int _level, int _speed, int _attack,
               int _defense, int _life,
               int _physical_capacity,
               int _magic_capacity,
               int _essence,
               int _hit,
               int _dodge,
               int _experience,
               int _life_resume, int _magic_resume, int _physic_resume, int _essence_resume) :
     base(_name, _sex, _level, _speed, _attack, _defense, _life, _physical_capacity, _magic_capacity, _essence, _hit, _dodge)
 {
     head            = new HeadEquipment();
     handguard       = new HandguardEquipment();
     cloth           = new ClothEquipment();
     shoe            = new ShoeEquipment();
     weapon          = new WeaponEquipment();
     items           = new List <Item>();
     Experience      = _experience;
     Life_Resume     = _life_resume;
     Magic_Resume    = _magic_resume;
     physical_resume = _physic_resume;
     Essence_Resume  = _essence_resume;
 }
 public void SetSex(SEX aSex)
 {
     this.mySex = aSex;
 }
Beispiel #23
0
        public void PlaySound_Result(ResultType result, SEX sex)
        {
            switch (result)
            {
            case ResultType.吃:
                if (sex == SEX.Boy)
                {
                    AudioManager.Play(Tags.Audio_Name.CPG.Boy_chi);
                }
                else
                {
                    AudioManager.Play(Tags.Audio_Name.CPG.Girl_chi);
                }
                break;

            case ResultType.碰:
                if (sex == SEX.Boy)
                {
                    AudioManager.Play(Tags.Audio_Name.CPG.Boy_peng);
                }
                else
                {
                    AudioManager.Play(Tags.Audio_Name.CPG.Girl_peng);
                }
                break;

            case ResultType.暗杠:
            case ResultType.杠:
                if (sex == SEX.Boy)
                {
                    AudioManager.Play(Tags.Audio_Name.CPG.Boy_gang);
                }
                else
                {
                    AudioManager.Play(Tags.Audio_Name.CPG.Girl_gang);
                }
                break;

            case ResultType.糊:
                if (sex == SEX.Boy)
                {
                    AudioManager.Play(Tags.Audio_Name.CPG.Boy_hu);
                }
                else
                {
                    AudioManager.Play(Tags.Audio_Name.CPG.Girl_hu);
                }
                break;

            case ResultType.过:
                break;

            case ResultType.自摸:
                if (sex == SEX.Boy)
                {
                    AudioManager.Play(Tags.Audio_Name.CPG.Boy_zimo);
                }
                else
                {
                    AudioManager.Play(Tags.Audio_Name.CPG.Girl_zimo);
                }
                break;
                break;

            default:
                break;
            }
        }
Beispiel #24
0
    private void Start()
    {
        int num;

        QualitySettings.SetQualityLevel(5, true);
        this.costumeOption = HeroCostume.costumeOption;
        this.setup         = this.character.GetComponent <HERO_SETUP>();
        this.setup.init();
        this.setup.myCostume = new HeroCostume();

        //The following statement currently only decides between an AHSS costume and another default blades costume based on the EquipmentType.
        //This will presumably be updated when the custom hero functionality is made better.
        //Previously the costume was hardcoded to always generate (soldier) Annie with blades.
        if (setup.getEquipmentType() == EquipmentType.Ahss)
        {
            this.copyCostume(HeroCostume.costume[0x25], this.setup.myCostume, false);  //This generates an AHSS soldier.
        }
        else
        {
            this.copyCostume(HeroCostume.costume[2], this.setup.myCostume, false);  //This generates Annie with blades.
        }

        this.setup.myCostume.setMesh2();
        this.setup.setCharacterComponent();
        SEX[] sexArray1 = new SEX[2];
        sexArray1[1]   = SEX.FEMALE;
        this.sexOption = sexArray1;
        this.eyeOption = new int[0x1c];
        for (num = 0; num < 0x1c; num++)
        {
            this.eyeOption[num] = num;
        }
        this.faceOption = new int[14];
        for (num = 0; num < 14; num++)
        {
            this.faceOption[num] = num + 0x20;
        }
        this.glassOption = new int[10];
        for (num = 0; num < 10; num++)
        {
            this.glassOption[num] = num + 0x30;
        }
        this.hairOption = new int[11];
        for (num = 0; num < 11; num++)
        {
            this.hairOption[num] = num;
        }
        this.skinOption = new int[3];
        for (num = 0; num < 3; num++)
        {
            this.skinOption[num] = num + 1;
        }
        this.capeOption = new int[2];
        for (num = 0; num < 2; num++)
        {
            this.capeOption[num] = num;
        }
        DIVISION[] divisionArray1 = new DIVISION[4];
        divisionArray1[1]   = DIVISION.TheGarrison;
        divisionArray1[2]   = DIVISION.TheMilitaryPolice;
        divisionArray1[3]   = DIVISION.TheSurveryCorps;
        this.divisionOption = divisionArray1;
        this.skillOption    = new string[] { "mikasa", "levi", "sasha", "jean", "marco", "armin", "petra" };
        this.CostumeDataToMyID();
        this.freshLabel();
    }
Beispiel #25
0
        public void Add(string HCN, string lastName, string firstName, string mInitial, DateTime DateOfBirth, SEX sex, string HOH)
        {
            var headOfHouse = _context.Patients.Find(HOH);

            if (headOfHouse != null)
            {
                Patient patient = new Patient
                {
                    HCN          = HCN,
                    LastName     = lastName,
                    FirstName    = firstName,
                    MInitial     = mInitial,
                    DateBirth    = DateOfBirth,
                    Sex          = sex,
                    HeadOfHouse  = HOH,
                    AddressLine1 = headOfHouse.AddressLine1,
                    AddressLine2 = headOfHouse.AddressLine2,
                    City         = headOfHouse.City,
                    Province     = headOfHouse.Province,
                    PostalCode   = headOfHouse.PostalCode,
                    PhoneNumber  = headOfHouse.PhoneNumber
                };

                Add(patient);
            }
        }
Beispiel #26
0
    private void Start()
    {
        int num;

        QualitySettings.SetQualityLevel(5, true);
        costumeOption = HeroCostume.costumeOption;
        setup         = character.GetComponent <HERO_SETUP>();
        setup.init();
        setup.myCostume = new HeroCostume();
        copyCostume(HeroCostume.costume[2], setup.myCostume);
        setup.myCostume.setMesh2();
        setup.setCharacterComponent();
        var sexArray1 = new SEX[2];

        sexArray1[1] = SEX.FEMALE;
        sexOption    = sexArray1;
        eyeOption    = new int[28];
        for (num = 0; num < 28; num++)
        {
            eyeOption[num] = num;
        }

        faceOption = new int[14];
        for (num = 0; num < 14; num++)
        {
            faceOption[num] = num + 32;
        }

        glassOption = new int[10];
        for (num = 0; num < 10; num++)
        {
            glassOption[num] = num + 48;
        }

        hairOption = new int[11];
        for (num = 0; num < 11; num++)
        {
            hairOption[num] = num;
        }

        skinOption = new int[3];
        for (num = 0; num < 3; num++)
        {
            skinOption[num] = num + 1;
        }

        capeOption = new int[2];
        for (num = 0; num < 2; num++)
        {
            capeOption[num] = num;
        }

        var divisionArray1 = new DIVISION[4];

        divisionArray1[1] = DIVISION.TheGarrison;
        divisionArray1[2] = DIVISION.TheMilitaryPolice;
        divisionArray1[3] = DIVISION.TheSurveryCorps;
        divisionOption    = divisionArray1;
        skillOption       = new[] { "mikasa", "levi", "sasha", "jean", "marco", "armin", "petra" };
        CostumeDataToMyID();
        freshLabel();
    }
Beispiel #27
0
        public static Dictionary <int, BoneModifier> LoadBoneModifiers(string charaName, SEX sex)
        {
            string path;

            if (sex == SEX.MALE)
            {
                path = defaultMaleBMPath;
                if (charaName != null || charaName != "")
                {
                    string fullPath = Path.GetFullPath(Path.Combine(Application.dataPath, "..\\UserData\\Chara\\male\\" + charaName + ".png.bmm.txt"));
                    if (File.Exists(fullPath))
                    {
                        path = fullPath;
                    }
                }
            }
            else
            {
                path = defaultBMPath;
                if (charaName != null || charaName != "")
                {
                    string fullPath2 = Path.GetFullPath(Path.Combine(Application.dataPath, "..\\UserData\\Chara\\female\\" + charaName + ".png.bmm.txt"));
                    if (File.Exists(fullPath2))
                    {
                        path = fullPath2;
                    }
                }
            }
            return(_LoadBoneModifiers(path));
        }
Beispiel #28
0
 public Customer(string name, SEX sex, string identityCode, string phoneNumber, string address, STATUS status = STATUS.AVAILABLE)
     : base(name, sex, identityCode, phoneNumber, address, status)
 {
 }
 private static string ToSexString(SEX? sex)
 {
     if (sex == null)
         return "";
     else if (sex == SEX.Male)
         return "1";
     else
         return "0";
     //return ((int)sex).ToString();
 }