예제 #1
0
    static public Color ValueToColor(int t)
    {
        int m = (t / 256) % 6;
        int n = t % 256;
        int r = GamingColor.C(n, m);
        int g = GamingColor.C(n, (m + 4) % 6);
        int b = GamingColor.C(n, (m + 2) % 6);

        return(new Color(r / 256f, g / 256f, b / 256f));
    }
 void DrawChildBone(Transform t, int depth)
 {
     for (int i = 0; i < t.childCount; ++i)
     {
         this.lines.Add(new Line(t.position, t.GetChild(i).position, GamingColor.ValueToColor(this.time * 8 + depth * 128)));
     }
     for (int i = 0; i < t.childCount; ++i)
     {
         this.DrawChildBone(t.GetChild(i), depth + 1);
     }
 }
예제 #3
0
 void DrawChildBone(Transform t, int depth)
 {
     Gizmos.color = GamingColor.ValueToColor(this.time * 8 + depth * 128);
     for (int i = 0; i < t.childCount; ++i)
     {
         this.DrawBone(t.position, t.GetChild(i).position, 0.1f);
     }
     for (int i = 0; i < t.childCount; ++i)
     {
         this.DrawChildBone(t.GetChild(i), depth + 1);
     }
 }