Пример #1
0
 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);
 }
Пример #2
0
 public void Redraw()
 {
     if (Own.Params.LegsParam.IsActive)
     {
         GetComponent <MeshFilter>().mesh = GetMesh();
         LegsParam p = Own.Params.LegsParam;
         GetComponent <MeshRenderer>().material.mainTexture = TextureGenerator.GetSkinTex(p.Color1, p.Color2, 32, 32, (int)p.SkinTextureOctave, p.SkinTextureFreq);
         Vector3 v = GetSize();
         Own.BoxCol.center = new Vector3(0, 0.5f - v.y * 0.5f, -0.5f);
         Own.BoxCol.size   = new Vector3(1f, 1f + v.y, 1f);
     }
     else
     {
         GetComponent <MeshFilter>().mesh = null;
         Own.BoxCol.center = new Vector3(0, 0.5f, -0.5f);
         Own.BoxCol.size   = new Vector3(1f, 1f, 1f);
     }
 }