示例#1
0
 /// <summary>
 /// Set the morph's weight to 1 and all others to 0
 /// </summary>
 /// <param name="index">The index of the morph which should be set to 1</param>
 public void SetMorphState(int index)
 {
     if (!hasMorph)
     {
         return;
     }
     for (int i = 0; i < _morph.GetChannelCount(); i++)
     {
         if (i != index)
         {
             _morph.SetWeight(i, 0f);
         }
         else
         {
             _morph.SetWeight(i, 1f);
         }
     }
 }