public Params() { Own = null; paramsList = new List <AParam>(); BodyParam = new BodyParam(); paramsList.Add(BodyParam); NoseParam = new NoseParam { IsActive = true }; paramsList.Add(NoseParam); JawsParam = new JawsParam { IsActive = true }; paramsList.Add(JawsParam); EyesParam = new EyesParam(); paramsList.Add(EyesParam); LegsParam = new LegsParam(); paramsList.Add(LegsParam); EarsParam = new EarsParam(); paramsList.Add(EarsParam); WingsParam = new WingsParam(); paramsList.Add(WingsParam); ShellParam = new ShellParam(); paramsList.Add(ShellParam); ThornsParam = new ThornsParam(); paramsList.Add(ThornsParam); }
public void Redraw() { if (Own.Params.WingsParam.IsActive) { WingsParam p = Own.Params.WingsParam; GetComponent <MeshRenderer>().material.mainTexture = TextureGenerator.GetSkinTex(p.Color1, p.Color2, 32, 32, (int)p.SkinTextureOctave, p.SkinTextureFreq); GetComponent <MeshFilter>().mesh = GetMesh(); } else { GetComponent <MeshFilter>().mesh = null; } }