示例#1
0
 public void Draw(SpriteBatch spriteBatch)
 {
     if (isStar && starTimer % modVal != 0)
     {
         state.Draw(spriteBatch, position, Color.Gold);
     }
     if (invicibilityFrames % modVal != 0)
     {
         state.Draw(spriteBatch, position, Color.White);
     }
     if (!isStar && !isNinja && invicibilityFrames == 0)
     {
         state.Draw(spriteBatch, position, Color.White);
     }
     if (isNinja)
     {
         if (ninjaTimer % modVal != 0)
         {
             state.Draw(spriteBatch, position, Color.DarkSlateGray);
         }
         else
         {
             if (!isStar)
             {
                 state.Draw(spriteBatch, position, Color.IndianRed);
             }
             else
             {
                 state.Draw(spriteBatch, position, Color.Gold);
             }
         }
     }
 }