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; // } //} }
public void ResetVariables() { m_bunnyInside = false; m_bunnySize = 0; m_bunnyColour = null; m_bunnyMouthPart = null; m_bunnyBackPart = null; }
public void ResetVariables() { m_size = RabboidCalculator.SMALL_SIZE; m_colour = null; m_mouthPart = null; m_backPart = null; m_isActive = false; }
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); }
public void AddColour(RabboidColour _new) { m_colourModList.Add(_new); }