Ejemplo n.º 1
0
    void SetColours(RabboidColour _colours, Transform _newBack, Transform _newMouth)
    {
        Material newBodyMat = null;

        // Set colours - extra features
        foreach (MeshRenderer r in m_mainBodyRenderers)
        {
            newBodyMat       = new Material(r.sharedMaterial);
            newBodyMat.color = _colours.m_color;
            r.sharedMaterial = newBodyMat;
        }

        //if (_newBack)
        //{
        //    Renderer[] rendList = _newBack.GetComponentsInChildren<Renderer>();
        //    foreach (Renderer r in rendList)
        //    {
        //        newBodyMat = new Material(r.sharedMaterial);
        //        newBodyMat.color = _colours.m_color;
        //        r.sharedMaterial = newBodyMat;
        //    }
        //}

        //if (_newMouth)
        //{
        //    Renderer[] rendList = _newMouth.GetComponentsInChildren<Renderer>();
        //    foreach (Renderer r in rendList)
        //    {
        //        newBodyMat = new Material(r.sharedMaterial);
        //        newBodyMat.color = _colours.m_color;
        //        r.sharedMaterial = newBodyMat;
        //    }
        //}
    }
Ejemplo n.º 2
0
 public void ResetVariables()
 {
     m_bunnyInside    = false;
     m_bunnySize      = 0;
     m_bunnyColour    = null;
     m_bunnyMouthPart = null;
     m_bunnyBackPart  = null;
 }
Ejemplo n.º 3
0
 public void ResetVariables()
 {
     m_size      = RabboidCalculator.SMALL_SIZE;
     m_colour    = null;
     m_mouthPart = null;
     m_backPart  = null;
     m_isActive  = false;
 }
Ejemplo n.º 4
0
    string CalculateName(RabboidColour _color, float _size, RabboidBodyPart _mouthPart, RabboidBodyPart _backPart)
    {
        // Format = [SIZE] [BACK_MOD] & [MOUTH_MOD] [COLOR]-Rabboid
        string name = "";

        if (_size >= LARGE_SIZE)
        {
            name += "Large ";
        }
        else if (_size <= SMALL_SIZE)
        {
            name += "Small ";
        }

        if (_mouthPart && _backPart)
        {
            name += _backPart.m_modName + " & " + _mouthPart.m_modName + " ";
        }
        else
        {
            if (_mouthPart)
            {
                name += _mouthPart.m_modName + " ";
            }
            if (_backPart)
            {
                name += _backPart.m_modName + " ";
            }
        }

        if (_color)
        {
            name += _color.m_colourName + "-";
        }

        name += "Rabboid";

        return(name);
    }
Ejemplo n.º 5
0
 public void AddColour(RabboidColour _new)
 {
     m_colourModList.Add(_new);
 }