Exemplo n.º 1
0
    private string GenerateEyeBrowKey(int eyeBrowColor, string eyeBrowType)
    {
        string eyeBrowColorName = _dropdown.options[eyeBrowColor].text;

        EyeBrow.EyeBrowColor eyeBrowColorValue = (EyeBrow.EyeBrowColor)eyeBrowColor;

        string key = eyeBrowColorValue.ToString() + "EyeBrow_" + eyeBrowType;

        return(key);
    }
Exemplo n.º 2
0
    private string GenerateEyeBrowKey()
    {
        int eyeBrowColorCount = System.Enum.GetNames(typeof(EyeBrow.EyeBrowColor)).Length;

        int randomColor = Random.Range(0, eyeBrowColorCount);

        EyeBrow.EyeBrowColor eyeBrowColor = (EyeBrow.EyeBrowColor)randomColor;

        int eyeBrowType = Random.Range(1, _eyeBrowTypeCount + 1);

        string key = eyeBrowColor.ToString() + "EyeBrow_" + eyeBrowType;

        return(key);
    }
Exemplo n.º 3
0
    public void GenerateEyeBrows(float eyeBrowType)
    {
        if (eyeBrowDictionary.Count <= 0 || invertedEyeBrowDictionary.Count <= 0)
        {
            return;
        }

        Vector3 cachedEyeBrowPosition         = _eyeBrowInstance.transform.position;
        Vector3 cachedInvertedEyeBrowPosition = _invertedEyeBrowInstance.transform.position;

        ClearEyeBrowsInstance();

        EyeBrow.EyeBrowColor eyeBrowColorValue = (EyeBrow.EyeBrowColor)_dropdown.value;

        int eyeBrowColor     = (int)eyeBrowColorValue;
        int eyeBrowTypeValue = System.Convert.ToInt32(eyeBrowType);

        string currentKey = GenerateEyeBrowKey(eyeBrowColor, eyeBrowTypeValue.ToString());

        InstantiateEyeBrows(currentKey, out eyeBrowColor, out eyeBrowTypeValue);

        _eyeBrowInstance.transform.position         = cachedEyeBrowPosition;
        _invertedEyeBrowInstance.transform.position = cachedInvertedEyeBrowPosition;
    }
Exemplo n.º 4
0
    private string GenerateInvertedEyeBrowKey(EyeBrow.EyeBrowColor eyeBrowColor, string eyeBrowType)
    {
        string key = eyeBrowColor.ToString() + "EyeBrowInverted_" + eyeBrowType;

        return(key);
    }