예제 #1
0
        public void FlipChanel(ColorChanel chan)
        {
            var val = chan.GetValueFrom(color);

            val = (val > 0.9f) ? 0 : 1;
            chan.SetValueOn(ref color, val);
        }
예제 #2
0
 private void SetChanel(ColorChanel chan, MeshPoint other, float val)
 {
     foreach (var u in vertices)
     {
         if (u.ConnectedTo(other))
         {
             chan.SetValueOn(ref u.color, val);
         }
     }
 }
예제 #3
0
        public bool ChannelSlider(ColorChanel chan, ref Color col)
        {
            chan.GetIcon().write();
            float val = chan.GetValueFrom(col);

            if (pegi.edit(ref val, 0, 1).nl())
            {
                chan.SetValueOn(ref col, val);
                return(true);
            }

            return(false);
        }