Esempio n. 1
0
        public static void Draw()
        {
            BasicSpriteRegistry.Draw();

            foreach (IMultiSpriteInstance inst in _multiInstances)
            {
                foreach (IMovingSpriteInstance movinst in inst.Sprites)
                {
                    if (movinst.Drawing)
                    {
                        _advancedSource    = movinst.Animation.StartingSource;
                        _advancedSource.X += _advancedSource.Width * movinst.Frame;
                        _drawRect          = new Rectangle((int)movinst.Location.X, (int)(movinst.Location.Y), (int)(_advancedSource.Width * movinst.Scale.X), (int)(_advancedSource.Height * movinst.Scale.Y));
                        if (movinst.SpriteBase.Draw(movinst, _drawRect) == 0)
                        {
                            UniversalVariables.spriteBatch.Draw(_advancedInstance.Animation.SpriteSheet, _drawRect, _advancedSource, movinst.DrawColor, movinst.Rotation, movinst.SpriteBase.Origin, movinst.DrawEffects, movinst.Depth);
                        }
                    }
                }
            }
        }
Esempio n. 2
0
 public static void AddInstance(ISpriteInstance instance)
 {
     BasicSpriteRegistry.AddInstance(instance);
 }
Esempio n. 3
0
 public static bool CheckCollision(string instancename1, string instancename2, bool AllowTranslucent1, bool AllowTranslucent2)
 {
     return(BasicSpriteRegistry.CheckCollision(instancename1, instancename2, AllowTranslucent1, AllowTranslucent2));
 }
Esempio n. 4
0
 public static void UnLoadAll()
 {
     BasicSpriteRegistry.UnLoadAll();
 }
Esempio n. 5
0
 public static void UnLoad(string spriteID)
 {
     BasicSpriteRegistry.UnLoad(spriteID);
 }
Esempio n. 6
0
 public static void LoadAllSprites(ContentManager content)
 {
     BasicSpriteRegistry.LoadAllSprites(content);
 }
Esempio n. 7
0
 public static void Load(string spriteID, ContentManager content)
 {
     BasicSpriteRegistry.Load(spriteID, content);
 }
Esempio n. 8
0
 public static void Add(ISprite2 sprite, ContentManager content)
 {
     BasicSpriteRegistry.Add(sprite, content);
 }
Esempio n. 9
0
 public static void UnloadAllText()
 {
     BasicSpriteRegistry.UnloadAllText();
 }
Esempio n. 10
0
 public static void UnloadText(string TextID)
 {
     BasicSpriteRegistry.UnloadText(TextID);
 }
Esempio n. 11
0
 public static void LoadText(string TextID, ContentManager content)
 {
     BasicSpriteRegistry.LoadText(TextID, content);
 }
Esempio n. 12
0
 public static void Add(ISpriteText text, ContentManager content)
 {
     BasicSpriteRegistry.Add(text, content);
 }