Ejemplo n.º 1
0
    public Data(int key, InfoRandomizer.DB_Male dbMale, InfoRandomizer.DB_Female dbFemale)
    {
        infoRandomizer = new InfoRandomizer(dbMale, dbFemale);

        cardID     = $"{infoRandomizer.GetRandomizeCardID(GameConfiguration.minCardID, GameConfiguration.maxCardID)}{key}";
        firstName  = infoRandomizer.GetRandomizeFirstName(infoRandomizer.GetRandomizeGender());
        middleName = infoRandomizer.GetRandomizeMiddleName(infoRandomizer.GetRandomizeGender());
        lastName   = infoRandomizer.GetRandomizeLastName(infoRandomizer.GetRandomizeGender());
    }
Ejemplo n.º 2
0
    public void Create()
    {
        // Load names from database
        InfoRandomizer.DB_Male   dbMale   = JsonUtility.FromJson <InfoRandomizer.DB_Male>(databaseMale.text);
        InfoRandomizer.DB_Female dbFemale = JsonUtility.FromJson <InfoRandomizer.DB_Female>(databaseFemale.text);
        infoRandomizer = new InfoRandomizer(dbMale, dbFemale);

        genderType = infoRandomizer.GetRandomizeGender();
        firstName  = infoRandomizer.GetRandomizeFirstName(genderType);
        middleName = infoRandomizer.GetRandomizeMiddleName(genderType);
        lastName   = infoRandomizer.GetRandomizeLastName(genderType);

        info = CreateInfo();

        characterInfo = new Character(firstName, middleName, lastName, genderType, info);

        character = InstantiateCharacter();
        SetupCharacter(character, characterInfo);

        if (GameConfiguration.DebugMode)
        {
            Debug.Log("GenderType : " + genderType);
            Debug.Log("Gender : " + gender);
            Debug.Log("Skin : " + skin);
            Debug.Log("Rambut : " + rambut);
            Debug.Log("Baju : " + modelBaju);
        }
    }