コード例 #1
0
ファイル: Test.cs プロジェクト: husathap/Charlotte
        public Test(GraphicsDevice gd)
        {
            test = new Selection(0, 0, new string[] { "Duck", "Fillet", "I just want to get out of here!", "LALA"},
            "Testington");
            Texture2DLoader tl = new Texture2DLoader(Main.ContentManager.RootDirectory + "/test.zip", true);
            tl.Load();
            AS = new AnimatedSprite(TemporaryContent.GetTexture("dragon"), 40, 40, 100);

            AS.Position = new Vector2(300, 300);
        }
コード例 #2
0
ファイル: Extension.cs プロジェクト: husathap/Charlotte
 /// <summary>
 /// Draw an animated sprite with a specific colour.
 /// </summary>
 /// <param name="sb">The sprite batch.</param>
 /// <param name="s">The sprite to be drawn.</param>
 /// /// <param name="c">The specific colour.</param>
 public static void Draw(this SpriteBatch sb, Sprite.AnimatedSprite s, Color c)
 {
     sb.Draw(s.Texture, s.Position, s.CurrentFrame, c, s.Rotation, s.Origin, s.Scale, s.SpriteEffects, 0);
 }