Browse Source

Added StarWarrior sample to the Samples.

Kenneth Pouncey 13 years ago
parent
commit
0ad38e51af
50 changed files with 2176 additions and 14 deletions
  1. 10 1
      Samples/MacOS/GooCursor/Game1.cs
  2. 13 1
      Samples/MacOS/ParticleSample/ParticleSampleGame.cs
  3. 324 0
      Samples/MacOS/StarWarrior/Artemis/PC/artemis.XML
  4. BIN
      Samples/MacOS/StarWarrior/Artemis/PC/artemis.dll
  5. 12 0
      Samples/MacOS/StarWarrior/Components/Enemy.cs
  6. 40 0
      Samples/MacOS/StarWarrior/Components/Expires.cs
  7. 53 0
      Samples/MacOS/StarWarrior/Components/Health.cs
  8. 30 0
      Samples/MacOS/StarWarrior/Components/SpatialForm.cs
  9. 75 0
      Samples/MacOS/StarWarrior/Components/Transform.cs
  10. 59 0
      Samples/MacOS/StarWarrior/Components/Velocity.cs
  11. 27 0
      Samples/MacOS/StarWarrior/Components/Weapon.cs
  12. BIN
      Samples/MacOS/StarWarrior/Content/Arial.xnb
  13. BIN
      Samples/MacOS/StarWarrior/Content/bullet.png
  14. BIN
      Samples/MacOS/StarWarrior/Content/enemy.png
  15. BIN
      Samples/MacOS/StarWarrior/Content/explosion.png
  16. 64 0
      Samples/MacOS/StarWarrior/Content/myFont.spritefont
  17. BIN
      Samples/MacOS/StarWarrior/Content/player.png
  18. 70 0
      Samples/MacOS/StarWarrior/EntityFactory.cs
  19. BIN
      Samples/MacOS/StarWarrior/Game.ico
  20. 187 0
      Samples/MacOS/StarWarrior/Game1.cs
  21. BIN
      Samples/MacOS/StarWarrior/GameThumbnail.png
  22. 16 0
      Samples/MacOS/StarWarrior/Info.plist
  23. BIN
      Samples/MacOS/StarWarrior/PhoneGameThumb.png
  24. 78 0
      Samples/MacOS/StarWarrior/Pool.cs
  25. 46 0
      Samples/MacOS/StarWarrior/Primitives/Lines.cs
  26. 234 0
      Samples/MacOS/StarWarrior/Primitives/PrimitiveBatch.cs
  27. 65 0
      Samples/MacOS/StarWarrior/Primitives/Triangles.cs
  28. 70 0
      Samples/MacOS/StarWarrior/Primitives/TrianglesStrip.cs
  29. 1 0
      Samples/MacOS/StarWarrior/Program.cs
  30. 7 0
      Samples/MacOS/StarWarrior/Readme.md
  31. 27 0
      Samples/MacOS/StarWarrior/Spatials/EnemyShip.cs
  32. 26 0
      Samples/MacOS/StarWarrior/Spatials/Explosion.cs
  33. 25 0
      Samples/MacOS/StarWarrior/Spatials/Missile.cs
  34. 28 0
      Samples/MacOS/StarWarrior/Spatials/PlayerShip.cs
  35. 26 0
      Samples/MacOS/StarWarrior/Spatials/ShipExplosion.cs
  36. 98 0
      Samples/MacOS/StarWarrior/StarWarrior.csproj
  37. 62 0
      Samples/MacOS/StarWarrior/Systems/CollisionSystem.cs
  38. 36 0
      Samples/MacOS/StarWarrior/Systems/EnemyShipMovementSystem.cs
  39. 42 0
      Samples/MacOS/StarWarrior/Systems/EnemyShooterSystem.cs
  40. 33 0
      Samples/MacOS/StarWarrior/Systems/EnemySpawnSystem.cs
  41. 28 0
      Samples/MacOS/StarWarrior/Systems/ExpirationSystem.cs
  42. 32 0
      Samples/MacOS/StarWarrior/Systems/HealthBarRenderSystem.cs
  43. 31 0
      Samples/MacOS/StarWarrior/Systems/HudRenderSystem.cs
  44. 36 0
      Samples/MacOS/StarWarrior/Systems/MovementSystem.cs
  45. 79 0
      Samples/MacOS/StarWarrior/Systems/PlayerShipControlSystem.cs
  46. 63 0
      Samples/MacOS/StarWarrior/Systems/RenderSystem.cs
  47. 21 1
      Samples/MonoGame.Samples.MacOS.sln
  48. 1 10
      Samples/iOS/Aiming/MonoGame.Samples.Aiming.csproj
  49. 1 1
      Samples/iOS/Draw2D/Game1.cs
  50. BIN
      Samples/iOS/GameStateManagement/.DS_Store

+ 10 - 1
Samples/MacOS/GooCursor/Game1.cs

@@ -30,6 +30,8 @@ namespace GooCursor
             cursor.BorderColor = Color.White;
             cursor.BorderColor = Color.White;
             cursor.FillColor = Color.Black;
             cursor.FillColor = Color.Black;
             Components.Add(cursor);
             Components.Add(cursor);
+			//graphics.IsFullScreen = true;
+			//IsMouseVisible = false;
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -64,6 +66,8 @@ namespace GooCursor
         {
         {
             // TODO: Unload any non ContentManager content here
             // TODO: Unload any non ContentManager content here
         }
         }
+		KeyboardState lastState = Keyboard.GetState();
+		KeyboardState state = Keyboard.GetState();
 
 
         /// <summary>
         /// <summary>
         /// Allows the game to run logic such as updating the world,
         /// Allows the game to run logic such as updating the world,
@@ -75,7 +79,9 @@ namespace GooCursor
             // Allows the game to exit
             // Allows the game to exit
             if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
             if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
                 this.Exit();
                 this.Exit();
-            KeyboardState state = Keyboard.GetState();
+			lastState = state;
+			state = Keyboard.GetState();
+
 
 
             float elapsed = (float)gameTime.ElapsedGameTime.TotalSeconds;
             float elapsed = (float)gameTime.ElapsedGameTime.TotalSeconds;
 
 
@@ -119,6 +125,9 @@ namespace GooCursor
             if (state.IsKeyDown(Keys.J))
             if (state.IsKeyDown(Keys.J))
                 cursor.TrailNodeMass -= 1.0f * elapsed;
                 cursor.TrailNodeMass -= 1.0f * elapsed;
 
 
+		if (state.IsKeyDown(Keys.F) && lastState.IsKeyUp(Keys.F))
+				graphics.ToggleFullScreen();
+
             base.Update(gameTime);
             base.Update(gameTime);
         }
         }
 
 

+ 13 - 1
Samples/MacOS/ParticleSample/ParticleSampleGame.cs

@@ -218,7 +218,8 @@ namespace ParticleSample
 
 
             // draw some instructions on the screen
             // draw some instructions on the screen
             string message = string.Format("Current effect: {0}!\n" + 
             string message = string.Format("Current effect: {0}!\n" + 
-                "Hit the A button or space bar, or tap the screen, to switch.\n\n" +
+                "Hit the A button or space bar, or tap the screen, to switch.\n" +
+				"Hit the F key to toggle full screen.\n\n" +
                 "Free particles:\n" +
                 "Free particles:\n" +
                 "    ExplosionParticleSystem:      {1}\n" +
                 "    ExplosionParticleSystem:      {1}\n" +
                 "    ExplosionSmokeParticleSystem: {2}\n" +
                 "    ExplosionSmokeParticleSystem: {2}\n" +
@@ -250,6 +251,10 @@ namespace ParticleSample
                 currentKeyboardState.IsKeyUp(Keys.Space) &&
                 currentKeyboardState.IsKeyUp(Keys.Space) &&
                 lastKeyboardState.IsKeyDown(Keys.Space);
                 lastKeyboardState.IsKeyDown(Keys.Space);
 
 
+            // check to see if someone has just released the 'F' key.
+            bool keyboardF =
+                currentKeyboardState.IsKeyUp(Keys.F) &&
+                lastKeyboardState.IsKeyDown(Keys.F);
 
 
             // check the gamepad to see if someone has just released the A button.
             // check the gamepad to see if someone has just released the A button.
             bool gamepadA =
             bool gamepadA =
@@ -278,6 +283,13 @@ namespace ParticleSample
                 currentState = (State)((int)(currentState + 1) % NumStates);
                 currentState = (State)((int)(currentState + 1) % NumStates);
             }
             }
 
 
+			if (keyboardF)
+			{
+				graphics.ToggleFullScreen();
+				//Window.Window.IsVisible = true;
+				//Window.Window.MakeKeyAndOrderFront(Window);
+			}
+
             lastKeyboardState = currentKeyboardState;
             lastKeyboardState = currentKeyboardState;
             lastGamepadState = currentGamePadState;
             lastGamepadState = currentGamePadState;
         }
         }

+ 324 - 0
Samples/MacOS/StarWarrior/Artemis/PC/artemis.XML

@@ -0,0 +1,324 @@
+<?xml version="1.0"?>
+<doc>
+    <assembly>
+        <name>artemis</name>
+    </assembly>
+    <members>
+        <member name="M:Artemis.EntitySystem.Begin">
+            Called before processing of entities begins. 
+        </member>
+        <member name="M:Artemis.EntitySystem.End">
+            Called after the processing of entities ends.
+        </member>
+        <member name="M:Artemis.EntitySystem.ProcessEntities(System.Collections.Generic.Dictionary{System.Int32,Artemis.Entity})">
+            Any implementing entity system must implement this method and the logic
+            to process the given entities of the system.
+            
+            @param entities the entities this system contains.
+        </member>
+        <member name="M:Artemis.EntitySystem.CheckProcessing">
+            
+            @return true if the system should be processed, false if not.
+        </member>
+        <member name="M:Artemis.EntitySystem.Initialize">
+            Override to implement code that gets executed when systems are initialized.
+        </member>
+        <member name="M:Artemis.EntitySystem.Added(Artemis.Entity)">
+            Called if the system has received a entity it is interested in, e.g. created or a component was added to it.
+            @param e the entity that was added to this system.
+        </member>
+        <member name="M:Artemis.EntitySystem.Removed(Artemis.Entity)">
+            Called if a entity was removed from this system, e.g. deleted or had one of it's components removed.
+            @param e the entity that was removed from this system.
+        </member>
+        <member name="M:Artemis.EntitySystem.GetMergedTypes(System.Type,System.Type[])">
+            Merge together a required type and a array of other types. Used in derived systems.
+            @param requiredType
+            @param otherTypes
+            @return
+        </member>
+        <member name="M:Artemis.IntervalEntityProcessingSystem.#ctor(System.Int32,System.Type,System.Type[])">
+            Create a new IntervalEntityProcessingSystem. It requires at least one component.
+            @param requiredType the required component type.
+            @param otherTypes other component types.
+        </member>
+        <member name="M:Artemis.IntervalEntityProcessingSystem.Process(Artemis.Entity)">
+            Process a entity this system is interested in.
+            @param e the entity to process.
+        </member>
+        <member name="M:Artemis.DelayedEntitySystem.ProcessEntities(System.Collections.Generic.Dictionary{System.Int32,Artemis.Entity},System.Int32)">
+            The entities to process with accumulated delta.
+            @param entities read-only bag of entities.
+        </member>
+        <member name="M:Artemis.DelayedEntitySystem.StartDelayedRun(System.Int32)">
+            Start processing of entities after a certain amount of milliseconds.
+            
+            Cancels current delayed run and starts a new one.
+            
+            @param delay time delay in milliseconds until processing starts.
+        </member>
+        <member name="M:Artemis.DelayedEntitySystem.GetInitialTimeDelay">
+            Get the initial delay that the system was ordered to process entities after.
+            
+            @return the originally set delay.
+        </member>
+        <member name="M:Artemis.DelayedEntitySystem.IsRunning">
+            Check if the system is counting down towards processing.
+            
+            @return true if it's counting down, false if it's not running.
+        </member>
+        <member name="M:Artemis.DelayedEntitySystem.Stop">
+            Aborts running the system in the future and stops it. Call delayedRun() to start it again.
+        </member>
+        <member name="M:Artemis.TagSystem.Process(Artemis.Entity)">
+            Process a entity this system is interested in.
+            @param e the entity to process.
+        </member>
+        <member name="M:Artemis.EntityWorld.GetDelta">
+            Time since last game loop.
+            @return delta in milliseconds.
+        </member>
+        <member name="M:Artemis.EntityWorld.SetDelta(System.Int32)">
+            You must specify the delta for the game here.
+            
+            @param delta time since last game loop.
+        </member>
+        <member name="M:Artemis.EntityWorld.DeleteEntity(Artemis.Entity)">
+            Delete the provided entity from the world.
+            @param e entity
+        </member>
+        <member name="M:Artemis.EntityWorld.RefreshEntity(Artemis.Entity)">
+            Ensure all systems are notified of changes to this entity.
+            @param e entity
+        </member>
+        <member name="M:Artemis.EntityWorld.CreateEntity">
+            Create and return a new or reused entity instance.
+            @return entity
+        </member>
+        <member name="M:Artemis.EntityWorld.GetEntity(System.Int32)">
+            Get a entity having the specified id.
+            @param entityId
+            @return entity
+        </member>
+        <member name="M:Artemis.SystemManager.InitializeAll">
+            After adding all systems to the world, you must initialize them all.
+        </member>
+        <member name="M:Artemis.GroupSystem.Process(Artemis.Entity)">
+            Process a entity this system is interested in.
+            @param e the entity to process.
+        </member>
+        <member name="M:Artemis.EntityManager.IsActive(System.Int32)">
+            Check if this entity is active, or has been deleted, within the framework.
+            
+            @param entityId
+            @return active or not.
+        </member>
+        <member name="M:Artemis.EntityManager.GetEntityCount">
+            
+            @return how many entities are currently active.
+        </member>
+        <member name="M:Artemis.EntityManager.GetTotalCreated">
+            
+            @return how many entities have been created since start.
+        </member>
+        <member name="M:Artemis.EntityManager.GetTotalRemoved">
+            
+            @return how many entities have been removed since start.
+        </member>
+        <member name="M:Artemis.EntityProcessingSystem.#ctor(System.Type,System.Type[])">
+            Create a new EntityProcessingSystem. It requires at least one component.
+            @param requiredType the required component type.
+            @param otherTypes other component types.
+        </member>
+        <member name="M:Artemis.EntityProcessingSystem.Process(Artemis.Entity)">
+            Process a entity this system is interested in.
+            @param e the entity to process.
+        </member>
+        <member name="M:Artemis.ParallelEntityProcessingSystem.#ctor(System.Type,System.Type[])">
+            Create a new EntityProcessingSystem. It requires at least one component.
+            @param requiredType the required component type.
+            @param otherTypes other component types.
+        </member>
+        <member name="M:Artemis.ParallelEntityProcessingSystem.Process(Artemis.Entity)">
+            Process a entity this system is interested in.
+            @param e the entity to process.
+        </member>
+        <member name="M:Artemis.DelayedEntityProcessingSystem.#ctor(System.Type,System.Type[])">
+            Create a new DelayedEntityProcessingSystem. It requires at least one component.
+            @param requiredType the required component type.
+            @param otherTypes other component types.
+        </member>
+        <member name="M:Artemis.DelayedEntityProcessingSystem.Process(Artemis.Entity,System.Int32)">
+            Process a entity this system is interested in.
+            @param e the entity to process.
+        </member>
+        <member name="M:Artemis.GroupManager.Set(System.String,Artemis.Entity)">
+            Set the group of the entity.
+            
+            @param group group to set the entity into.
+            @param e entity to set into the group.
+        </member>
+        <member name="M:Artemis.GroupManager.getEntities(System.String)">
+            Get all entities that belong to the provided group.
+            @param group name of the group.
+            @return read-only bag of entities belonging to the group.
+        </member>
+        <member name="M:Artemis.GroupManager.Remove(Artemis.Entity)">
+            Removes the provided entity from the group it is assigned to, if any.
+            @param e the entity.
+        </member>
+        <member name="M:Artemis.GroupManager.GetGroupOf(Artemis.Entity)">
+            @param e entity
+            @return the name of the group that this entity belongs to, null if none.
+        </member>
+        <member name="M:Artemis.GroupManager.IsGrouped(Artemis.Entity)">
+            Checks if the entity belongs to any group.
+            @param e the entity to check.
+            @return true if it is in any group, false if none.
+        </member>
+        <member name="M:Artemis.Bag`1.#ctor">
+            Constructs an empty Bag with an initial capacity of 64.
+            
+        </member>
+        <member name="M:Artemis.Bag`1.#ctor(System.Int32)">
+            Constructs an empty Bag with the specified initial capacity.
+            
+            @param capacity
+                       the initial capacity of Bag
+        </member>
+        <member name="M:Artemis.Bag`1.Remove(System.Int32)">
+            Removes the element at the specified position in this Bag. does this by
+            overwriting it was last element then removing last element
+            
+            @param index
+                       the index of element to be removed
+            @return element that was removed from the Bag
+        </member>
+        <member name="M:Artemis.Bag`1.RemoveLast">
+            Remove and return the last object in the bag.
+            
+            @return the last object in the bag, null if empty.
+        </member>
+        <member name="M:Artemis.Bag`1.Remove(`0)">
+            Removes the first occurrence of the specified element from this Bag, if
+            it is present. If the Bag does not contain the element, it is unchanged.
+            does this by overwriting it was last element then removing last element
+            
+            @param o
+                       element to be removed from this list, if present
+            @return <tt>true</tt> if this list contained the specified element
+        </member>
+        <member name="M:Artemis.Bag`1.Contains(`0)">
+            Check if bag contains this element.
+            
+            @param o
+            @return
+        </member>
+        <member name="M:Artemis.Bag`1.RemoveAll(Artemis.Bag{`0})">
+            Removes from this Bag all of its elements that are contained in the
+            specified Bag.
+            
+            @param bag
+                       Bag containing elements to be removed from this Bag
+            @return {@code true} if this Bag changed as a result of the call
+        </member>
+        <member name="M:Artemis.Bag`1.Get(System.Int32)">
+            Returns the element at the specified position in Bag.
+            
+            @param index
+                       index of the element to return
+            @return the element at the specified position in bag
+        </member>
+        <member name="M:Artemis.Bag`1.Size">
+            Returns the number of elements in this bag.
+            
+            @return the number of elements in this bag
+        </member>
+        <member name="M:Artemis.Bag`1.GetCapacity">
+            Returns the number of elements the bag can hold without growing.
+            
+            @return the number of elements the bag can hold without growing.
+        </member>
+        <member name="M:Artemis.Bag`1.IsEmpty">
+            Returns true if this list contains no elements.
+            
+            @return true if this list contains no elements
+        </member>
+        <member name="M:Artemis.Bag`1.Add(`0)">
+            Adds the specified element to the end of this bag. if needed also
+            increases the capacity of the bag.
+            
+            @param o
+                       element to be added to this list
+        </member>
+        <member name="M:Artemis.Bag`1.Set(System.Int32,`0)">
+            Set element at specified index in the bag.
+            
+            @param index position of element
+            @param o the element
+        </member>
+        <member name="M:Artemis.Bag`1.Clear">
+            Removes all of the elements from this bag. The bag will be empty after
+            this call returns.
+        </member>
+        <member name="M:Artemis.Bag`1.AddAll(Artemis.Bag{`0})">
+            Add all items into this bag. 
+            @param added
+        </member>
+        <member name="M:Artemis.Entity.GetId">
+            The internal id for this entity within the framework. No other entity will have the same ID, but
+            ID's are however reused so another entity may acquire this ID if the previous entity was deleted.
+            
+            @return id of the entity.
+        </member>
+        <member name="M:Artemis.Entity.GetUniqueId">
+            Get the unique ID of this entity. Because entity instances are reused internally use this to identify between different instances.
+            @return the unique id of this entity.
+        </member>
+        <member name="M:Artemis.Entity.AddComponent(Artemis.Component)">
+            Add a component to this entity.
+            @param component to add to this entity
+        </member>
+        <member name="M:Artemis.Entity.RemoveComponent``1(Artemis.Component)">
+            Removes the component from this entity.
+            @param component to remove from this entity.
+        </member>
+        <member name="M:Artemis.Entity.RemoveComponent(Artemis.ComponentType)">
+            Faster removal of components from a entity.
+            @param component to remove from this entity.
+        </member>
+        <member name="M:Artemis.Entity.IsActive">
+            Checks if the entity has been deleted from somewhere.
+            @return if it's active.
+        </member>
+        <member name="M:Artemis.Entity.GetComponent(Artemis.ComponentType)">
+            This is the preferred method to use when retrieving a component from a entity. It will provide good performance.
+            
+            @param type in order to retrieve the component fast you must provide a ComponentType instance for the expected component.
+            @return
+        </member>
+        <!-- Badly formed XML comment ignored for member "M:Artemis.Entity.GetComponent``1" -->
+        <member name="M:Artemis.Entity.GetComponents">
+            Get all components belonging to this entity.
+            WARNING. Use only for debugging purposes, it is dead slow.
+            WARNING. The returned bag is only valid until this method is called again, then it is overwritten.
+            @return all components of this entity.
+        </member>
+        <member name="M:Artemis.Entity.Refresh">
+            Refresh all changes to components for this entity. After adding or removing components, you must call
+            this method. It will update all relevant systems.
+            It is typical to call this after adding components to a newly created entity.
+        </member>
+        <member name="M:Artemis.Entity.Delete">
+            Delete this entity from the world.
+        </member>
+        <member name="M:Artemis.Entity.SetGroup(System.String)">
+            Set the group of the entity. Same as World.setGroup().
+            @param group of the entity.
+        </member>
+        <member name="M:Artemis.Entity.SetTag(System.String)">
+            Assign a tag to this entity. Same as World.setTag().
+            @param tag of the entity.
+        </member>
+    </members>
+</doc>

BIN
Samples/MacOS/StarWarrior/Artemis/PC/artemis.dll


+ 12 - 0
Samples/MacOS/StarWarrior/Components/Enemy.cs

@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Artemis;
+
+namespace StarWarrior.Components
+{
+    class Enemy : Component
+    {
+    }
+}

+ 40 - 0
Samples/MacOS/StarWarrior/Components/Expires.cs

@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Artemis;
+
+namespace StarWarrior.Components
+{
+    class Expires : Component
+    {
+        private int lifeTime;
+
+        public Expires() { }
+
+        public Expires(int lifeTime)
+        {
+            this.lifeTime = lifeTime;
+        }
+
+        public int GetLifeTime()
+        {
+            return lifeTime;
+        }
+
+        public void SetLifeTime(int lifeTime)
+        {
+            this.lifeTime = lifeTime;
+        }
+
+        public void ReduceLifeTime(int lifeTime)
+        {
+            this.lifeTime -= lifeTime;
+        }
+
+        public bool IsExpired()
+        {
+            return lifeTime <= 0;
+        }
+    }
+}

+ 53 - 0
Samples/MacOS/StarWarrior/Components/Health.cs

@@ -0,0 +1,53 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Artemis;
+
+namespace StarWarrior.Components
+{
+    class Health : Component
+    {
+        private float health = 0;
+        private float maximumHealth = 0;
+
+        public Health() { }
+
+        public Health(float health)
+        {
+            this.health = this.maximumHealth = health;
+        }
+
+        public float GetHealth()
+        {
+            return health;
+        }
+
+        public void SetHealth(float health)
+        {
+            this.health = this.maximumHealth = health;
+        }
+
+        public float GetMaximumHealth()
+        {
+            return maximumHealth;
+        }
+
+        public double GetHealthPercentage()
+        {
+            return Math.Round(health / maximumHealth * 100f);
+        }
+
+        public void AddDamage(int damage)
+        {
+            health -= damage;
+            if (health < 0)
+                health = 0;
+        }
+
+        public bool IsAlive()
+        {
+            return health > 0;
+        }
+    }
+}

+ 30 - 0
Samples/MacOS/StarWarrior/Components/SpatialForm.cs

@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Artemis;
+
+namespace StarWarrior.Components
+{
+    class SpatialForm : Component
+    {
+        private String spatialFormFile;
+
+        public SpatialForm() { }
+
+        public SpatialForm(String spatialFormFile)
+        {
+            this.spatialFormFile = spatialFormFile;
+        }
+
+        public String GetSpatialFormFile()
+        {
+            return spatialFormFile;
+        }
+
+        public void SetSpatialFormFile(string spatial)
+        {
+            spatialFormFile = spatial;
+        }
+    }
+}

+ 75 - 0
Samples/MacOS/StarWarrior/Components/Transform.cs

@@ -0,0 +1,75 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Artemis;
+using Microsoft.Xna.Framework;
+
+namespace StarWarrior.Components
+{
+    class Transform : Component
+    {
+        private Vector3 coords;
+
+        public Transform()
+        {
+        }
+
+	    public Transform(Vector3 coords) {
+		    this.coords = coords;
+	    }
+
+        public void SetCoords(Vector3 coords) {
+            this.coords = coords;
+        }
+
+	    public void AddX(float x) {
+		    this.coords.X += x;
+	    }
+
+	    public void AddY(float y) {
+		    this.coords.Y += y;
+	    }
+
+	    public float GetX() {
+		    return this.coords.X;
+	    }
+
+	    public void SetX(float x) {
+		    this.coords.X = x;
+	    }
+
+	    public float GetY() {
+		    return this.coords.Y;
+	    }
+
+	    public void SetY(float y) {
+		    this.coords.Y = y;
+	    }
+
+	    public void SetLocation(float x, float y) {
+		    this.coords.X = x;
+		    this.coords.Y = y;
+	    }
+
+	    public float GetRotation() {
+		    return this.coords.Z;
+	    }
+
+	    public void SetRotation(float rotation) {
+		    this.coords.Z = rotation;
+	    }
+
+	    public void AddRotation(float angle) {
+		    this.coords.Z = (this.coords.Z + angle) % 360;
+	    }
+
+	    public float GetRotationAsRadians() {
+            return (float)Math.PI * this.coords.Z / 180.0f;
+	    }
+	
+	    public float GetDistanceTo(Transform t) {
+		    return Artemis.Utils.Distance(t.GetX(), t.GetY(), GetX(), GetY());
+	    }
+    }
+}

+ 59 - 0
Samples/MacOS/StarWarrior/Components/Velocity.cs

@@ -0,0 +1,59 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Artemis;
+
+namespace StarWarrior.Components
+{
+    class Velocity : Component
+    {
+        private float velocity;
+        private float angle;
+
+        public Velocity()
+        {
+        }
+
+        public Velocity(float vector)
+        {
+            this.velocity = vector;
+        }
+
+        public Velocity(float velocity, float angle)
+        {
+            this.velocity = velocity;
+            this.angle = angle;
+        }
+
+        public float GetVelocity()
+        {
+            return velocity;
+        }
+
+        public void SetVelocity(float velocity)
+        {
+            this.velocity = velocity;
+        }
+
+        public void SetAngle(float angle)
+        {
+            this.angle = angle;
+        }
+
+        public float GetAngle()
+        {
+            return angle;
+        }
+
+        public void AddAngle(float a)
+        {
+            angle = (angle + a) % 360;
+        }
+
+        public float GetAngleAsRadians()
+        {
+            return (float)Math.PI * angle / 180.0f; ;
+        }
+    }
+}

+ 27 - 0
Samples/MacOS/StarWarrior/Components/Weapon.cs

@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Artemis;
+
+namespace StarWarrior.Components
+{
+    class Weapon : Component
+    {
+        private long shotAt;
+
+        public Weapon()
+        {
+        }
+
+        public void SetShotAt(long shotAt)
+        {
+            this.shotAt = shotAt;
+        }
+
+        public long GetShotAt()
+        {
+            return shotAt;
+        }
+    }
+}

BIN
Samples/MacOS/StarWarrior/Content/Arial.xnb


BIN
Samples/MacOS/StarWarrior/Content/bullet.png


BIN
Samples/MacOS/StarWarrior/Content/enemy.png


BIN
Samples/MacOS/StarWarrior/Content/explosion.png


+ 64 - 0
Samples/MacOS/StarWarrior/Content/myFont.spritefont

@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file contains an xml description of a font, and will be read by the XNA
+Framework Content Pipeline. Follow the comments to customize the appearance
+of the font in your game, and to change the characters which are available to draw
+with.
+-->
+<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
+  <Asset Type="Graphics:FontDescription">
+
+    <!--
+    Modify this string to change the font that will be imported.
+    -->
+    <FontName>Segoe Print</FontName>
+
+    <!--
+    Size is a float value, measured in points. Modify this value to change
+    the size of the font.
+    -->
+    <Size>20</Size>
+
+    <!--
+    Spacing is a float value, measured in pixels. Modify this value to change
+    the amount of spacing in between characters.
+    -->
+    <Spacing>0</Spacing>
+
+    <!--
+    UseKerning controls the layout of the font. If this value is true, kerning information
+    will be used when placing characters.
+    -->
+    <UseKerning>true</UseKerning>
+
+    <!--
+    Style controls the style of the font. Valid entries are "Regular", "Bold", "Italic",
+    and "Bold, Italic", and are case sensitive.
+    -->
+    <Style>Bold</Style>
+
+    <!--
+    If you uncomment this line, the default character will be substituted if you draw
+    or measure text that contains characters which were not included in the font.
+    -->
+    <DefaultCharacter>*</DefaultCharacter> 
+
+    <!--
+    CharacterRegions control what letters are available in the font. Every
+    character from Start to End will be built and made available for drawing. The
+    default range is from 32, (ASCII space), to 126, ('~'), covering the basic Latin
+    character set. The characters are ordered according to the Unicode standard.
+    See the documentation for more information.
+    -->
+    <CharacterRegions>
+      <CharacterRegion>
+        <Start>&#32;</Start>
+        <End>&#126;</End>
+      </CharacterRegion>
+      <CharacterRegion>
+        <Start>&#1024;</Start>
+        <End>&#1327;</End>
+      </CharacterRegion>
+    </CharacterRegions>
+  </Asset>
+</XnaContent>

BIN
Samples/MacOS/StarWarrior/Content/player.png


+ 70 - 0
Samples/MacOS/StarWarrior/EntityFactory.cs

@@ -0,0 +1,70 @@
+using System;
+using StarWarrior.Components;
+using Artemis;
+using Microsoft.Xna.Framework;
+namespace StarWarrior
+{
+	public class EntityFactory {
+
+        public static Entity CreateMissile(EntityWorld world)
+        {
+			Entity missile = world.CreateEntity();
+            GamePool pool = (GamePool)world.GetPool();
+			missile.SetGroup("BULLETS");
+			
+			missile.AddComponent(pool.TakeComponent<Transform>());
+			missile.AddComponent(pool.TakeComponent<SpatialForm>());
+			missile.AddComponent(pool.TakeComponent<Velocity>());
+			missile.AddComponent(pool.TakeComponent<Expires>());
+            missile.GetComponent<SpatialForm>().SetSpatialFormFile("Missile");
+            missile.GetComponent<Expires>().SetLifeTime(2000);
+	   		return missile;
+		}
+
+     	public static Entity CreateEnemyShip(EntityWorld world) {
+			Entity e = world.CreateEntity();
+			e.SetGroup("SHIPS");
+            GamePool pool = (GamePool)world.GetPool();
+			e.AddComponent(pool.TakeComponent<Transform>());
+			e.AddComponent(pool.TakeComponent<SpatialForm>());
+			e.AddComponent(pool.TakeComponent<Health>());
+			e.AddComponent(pool.TakeComponent<Weapon>());
+            e.AddComponent(pool.TakeComponent<Enemy>());
+			e.AddComponent(pool.TakeComponent<Velocity>());
+            e.GetComponent<SpatialForm>().SetSpatialFormFile("EnemyShip");
+            e.GetComponent<Health>().SetHealth(10);
+			return e;
+		}
+
+        public static Entity CreateBulletExplosion(EntityWorld world, float x, float y)
+        {
+			Entity e = world.CreateEntity();
+            GamePool pool = (GamePool)world.GetPool();
+			e.SetGroup("EFFECTS");
+			
+			e.AddComponent(pool.TakeComponent<Transform>());
+			e.AddComponent(pool.TakeComponent<SpatialForm>());
+			e.AddComponent(pool.TakeComponent<Expires>());
+            e.GetComponent<SpatialForm>().SetSpatialFormFile("BulletExplosion");
+            e.GetComponent<Expires>().SetLifeTime(1000);
+            e.GetComponent<Transform>().SetCoords(new Vector3(x, y, 0));
+			return e;
+		}
+
+        public static Entity CreateShipExplosion(EntityWorld world, float x, float y)
+        {
+			Entity e = world.CreateEntity();
+            GamePool pool = (GamePool)world.GetPool();
+			e.SetGroup("EFFECTS");
+			
+			e.AddComponent(pool.TakeComponent<Transform>());
+			e.AddComponent(pool.TakeComponent<SpatialForm>());
+			e.AddComponent(pool.TakeComponent<Expires>());
+            e.GetComponent<SpatialForm>().SetSpatialFormFile("ShipExplosion");
+            e.GetComponent<Transform>().SetCoords(new Vector3(x, y, 0));
+            e.GetComponent<Expires>().SetLifeTime(1000);
+			return e;
+		}
+	
+	}
+}

BIN
Samples/MacOS/StarWarrior/Game.ico


+ 187 - 0
Samples/MacOS/StarWarrior/Game1.cs

@@ -0,0 +1,187 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Audio;
+using Microsoft.Xna.Framework.Content;
+using Microsoft.Xna.Framework.GamerServices;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework.Input;
+using Microsoft.Xna.Framework.Media;
+using Artemis;
+using StarWarrior.Components;
+using StarWarrior.Systems;
+using StarWarrior.Primitives;
+
+namespace StarWarrior
+{
+    /// <summary>
+    /// This is the main type for your game
+    /// </summary>
+    /// 
+    public class Game1 : Microsoft.Xna.Framework.Game
+    {
+        GraphicsDeviceManager graphics;
+        SpriteBatch spriteBatch;
+        private EntityWorld world;
+
+        private EntitySystem renderSystem;
+        private EntitySystem hudRenderSystem;
+        private EntitySystem controlSystem;
+        private EntitySystem movementSystem;
+        private EntitySystem enemyShooterSystem;
+        private EntitySystem enemyShipMovementSystem;
+        private EntitySystem collisionSystem;
+        private EntitySystem healthBarRenderSystem;
+        private EntitySystem enemySpawnSystem;
+        private EntitySystem expirationSystem;
+        private SpriteFont font;
+        private GamePool pool;
+
+        int frameRate,frameCounter;
+        TimeSpan elapsedTime = TimeSpan.Zero;
+
+        public Game1()
+        {
+            graphics = new GraphicsDeviceManager(this);
+            graphics.SynchronizeWithVerticalRetrace = false;
+            this.IsFixedTimeStep = false;
+            //graphics.IsFullScreen = false;
+            graphics.PreferredBackBufferHeight = 600;
+            graphics.PreferredBackBufferWidth = 800;
+            Content.RootDirectory = "Content";
+        }
+
+        /// <summary>
+        /// Allows the game to perform any initialization it needs to before starting to run.
+        /// This is where it can query for any required services and load any non-graphic
+        /// related content.  Calling base.Initialize will enumerate through any components
+        /// and initialize them as well.
+        /// </summary>
+        /// 
+
+        private void RemovedComponent(Entity e,Component c)
+        {
+            if (c != null)
+            {
+                pool.AddComponent(c.GetType(), c);
+            }
+        }
+
+        protected override void Initialize()
+        {
+            // Create a new SpriteBatch, which can be used to draw textures.
+            Type[] types = new Type[] {typeof(Enemy),typeof(Expires),typeof(Health),typeof(SpatialForm),typeof(Transform),typeof(Velocity),typeof(Weapon)};
+            pool = new GamePool(100,types);
+            pool.Initialize();
+
+            spriteBatch = new SpriteBatch(GraphicsDevice);
+            world = new EntityWorld();
+            world.GetEntityManager().RemovedComponentEvent += new RemovedComponentHandler(RemovedComponent);
+            world.SetPool(pool);
+
+            font = Content.Load<SpriteFont>("Arial");
+            SystemManager systemManager = world.GetSystemManager();
+            renderSystem = systemManager.SetSystem(new RenderSystem(GraphicsDevice,spriteBatch,Content),ExecutionType.Draw);
+            hudRenderSystem = systemManager.SetSystem(new HudRenderSystem(spriteBatch, font), ExecutionType.Draw);
+            controlSystem = systemManager.SetSystem(new MovementSystem(spriteBatch), ExecutionType.Update,1);
+            movementSystem = systemManager.SetSystem(new PlayerShipControlSystem(spriteBatch),ExecutionType.Update);
+            enemyShooterSystem = systemManager.SetSystem(new EnemyShipMovementSystem(spriteBatch), ExecutionType.Update,1);
+            enemyShipMovementSystem = systemManager.SetSystem(new EnemyShooterSystem(), ExecutionType.Update);
+            collisionSystem = systemManager.SetSystem(new CollisionSystem(), ExecutionType.Update,1);
+            healthBarRenderSystem = systemManager.SetSystem(new HealthBarRenderSystem(spriteBatch, font), ExecutionType.Draw);
+            enemySpawnSystem = systemManager.SetSystem(new EnemySpawnSystem(500, spriteBatch), ExecutionType.Update);
+            expirationSystem = systemManager.SetSystem(new ExpirationSystem(), ExecutionType.Update);
+
+            systemManager.InitializeAll();
+
+            InitPlayerShip();
+            InitEnemyShips();
+
+            base.Initialize();
+        }
+
+        private void InitEnemyShips() {
+		    Random r = new Random();
+		    for (int i = 0; 2 > i; i++) {
+			    Entity e = EntityFactory.CreateEnemyShip(world);
+
+			    e.GetComponent<Transform>().SetLocation(r.Next(GraphicsDevice.Viewport.Width), r.Next(400)+50);
+			    e.GetComponent<Velocity>().SetVelocity(0.05f);
+			    e.GetComponent<Velocity>().SetAngle(r.Next() % 2 == 0 ? 0 : 180);
+			
+			    e.Refresh();
+		    }
+	    }
+
+	    private void InitPlayerShip() {
+		    Entity e = world.CreateEntity();
+		    e.SetGroup("SHIPS");
+
+            e.AddComponent(pool.TakeComponent<Transform>());
+		    e.AddComponent(pool.TakeComponent<SpatialForm>());
+		    e.AddComponent(pool.TakeComponent<Health>());
+            e.GetComponent<SpatialForm>().SetSpatialFormFile("PlayerShip");
+            e.GetComponent<Health>().SetHealth(30);
+            e.GetComponent<Transform>().SetCoords(new Vector3(GraphicsDevice.Viewport.Width / 2, GraphicsDevice.Viewport.Height - 50, 0));
+		    e.Refresh();
+            world.GetTagManager().Register("PLAYER", e);
+	    }
+
+        /// <summary>
+        /// LoadContent will be called once per game and is the place to load
+        /// all of your content.
+        /// </summary>
+        protected override void LoadContent()
+        {
+        }
+
+
+        DateTime dt = DateTime.Now;
+        /// <summary>
+        /// Allows the game to run logic such as updating the world,
+        /// checking for collisions, gathering input, and playing audio.
+        /// </summary>
+        /// <param name="gameTime">Provides a snapshot of timing values.</param>
+        protected override void Update(GameTime gameTime)
+        {
+            TimeSpan elapsed = DateTime.Now - dt;
+            dt = DateTime.Now;
+            frameCounter++;
+
+            world.LoopStart();
+            world.SetDelta(elapsed.Milliseconds);
+
+            world.GetSystemManager().UpdateAsynchronous(ExecutionType.Update);
+            //world.GetSystemManager().UpdateSynchronous(ExecutionType.Update);
+            
+            elapsedTime += elapsed;
+
+            if (elapsedTime > TimeSpan.FromSeconds(1))
+            {
+                elapsedTime -= TimeSpan.FromSeconds(1);
+                frameRate = frameCounter;
+                frameCounter = 0;
+            }
+
+            base.Update(gameTime);
+        }
+
+        /// <summary>
+        /// This is called when the game should draw itself.
+        /// </summary>
+        /// <param name="gameTime">Provides a snapshot of timing values.</param>
+        protected override void Draw(GameTime gameTime)
+        {            
+            string fps = string.Format("fps: {0}", frameRate);
+
+            GraphicsDevice.Clear(Color.Black);
+            spriteBatch.Begin();
+            spriteBatch.DrawString(font, fps, new Vector2(32,32), Color.Yellow);
+            world.GetSystemManager().UpdateSynchronous(ExecutionType.Draw);
+            spriteBatch.End();
+
+            base.Draw(gameTime);
+        }
+    }
+}

BIN
Samples/MacOS/StarWarrior/GameThumbnail.png


+ 16 - 0
Samples/MacOS/StarWarrior/Info.plist

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleIdentifier</key>
+	<string>com.yourcompany.StartWarrior</string>
+	<key>CFBundleName</key>
+	<string>StartWarrior</string>
+	<key>CFBundleVersion</key>
+	<string>1</string>
+	<key>LSMinimumSystemVersion</key>
+	<string>10.6</string>
+	<key>NSPrincipalClass</key>
+	<string>NSApplication</string>
+</dict>
+</plist>

BIN
Samples/MacOS/StarWarrior/PhoneGameThumb.png


+ 78 - 0
Samples/MacOS/StarWarrior/Pool.cs

@@ -0,0 +1,78 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Artemis;
+using System.Reflection;
+
+namespace StarWarrior
+{
+    public class GamePool : ArtemisPool
+    {
+        Dictionary<Type, Bag<Component>> componentPool = new Dictionary<Type, Bag<Component>>();
+        int limit = 0;
+        Type[] components;
+
+        public GamePool(int limit, Type[] components)
+        {
+            this.limit = limit;
+            this.components = components;
+        }
+
+        public void Initialize()
+        {
+            foreach (Type type in components)
+            {                
+                MethodInfo methodInfo = GetType().GetMethod("AddComponentType");
+                MethodInfo genericMethodInfo = methodInfo.MakeGenericMethod(new Type[] { type });
+                genericMethodInfo.Invoke(this, null);
+            }
+            Populate(limit);
+        }
+
+        public void Populate(int quantity)
+        {
+            for (int i = 0; i < quantity; i++)
+            {
+                foreach (Type type in components)
+                {
+                    AddComponent(type, (Component)Activator.CreateInstance(type));
+                }
+            }
+        }
+
+        public void AddComponentType<T>() where T : Component
+        {
+            Bag<Component> bag = new Bag<Component>();
+            componentPool.Add(typeof(T), bag);
+        }
+
+        public void AddComponent(Type type, Component c)
+        {
+            Bag<Component> bag;
+            if (componentPool.TryGetValue(type, out bag))
+            {
+                bag.Add(c);
+            }
+        }
+
+        public Component TakeComponent<T>() where T : Component
+        {
+            Bag<Component> bag;            
+            if (componentPool.TryGetValue(typeof(T), out bag))
+            {
+                Component c = bag.RemoveLast();
+                if (c == null)
+                {
+                    Populate((int)(limit * 0.25));
+                    c = bag.RemoveLast();
+                }
+                return c;
+            }
+            else
+            {
+                return null;
+            }
+        }
+    }
+}

+ 46 - 0
Samples/MacOS/StarWarrior/Primitives/Lines.cs

@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+
+namespace StarWarrior.Primitives
+{
+    public class Lines
+    {
+        PrimitiveBatch batch;
+        List<Vector2> lines = new List<Vector2>();
+        Color color = Color.White;                
+        GraphicsDevice device;
+
+
+        public Lines(GraphicsDevice device,PrimitiveBatch primitiveBatch)
+        {
+            this.device = device;
+            this.batch = primitiveBatch;            
+        }
+
+        public void AddLine(float x1, float y1, float x2, float y2)
+        {
+            lines.Add(new Vector2(x1,y1));
+            lines.Add(new Vector2(x2, y2));            
+        }
+
+        public void SetColor(Color color)
+        {
+            this.color = color;
+        }        
+        public void Draw(Vector2 transform)
+        {
+         
+            batch.Begin(PrimitiveType.LineList);
+            foreach (var item in lines)
+            {
+                batch.AddVertex(item + transform, color);       
+            }
+            batch.End();
+        }
+
+    }
+}

+ 234 - 0
Samples/MacOS/StarWarrior/Primitives/PrimitiveBatch.cs

@@ -0,0 +1,234 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework.Content;
+using Microsoft.Xna.Framework.Input;
+
+namespace StarWarrior.Primitives
+{
+
+    // PrimitiveBatch is a class that handles efficient rendering automatically for its
+    // users, in a similar way to SpriteBatch. PrimitiveBatch can render lines, points,
+    // and triangles to the screen. In this sample, it is used to draw a spacewars
+    // retro scene.
+    public class PrimitiveBatch : IDisposable
+    {
+        #region Constants and Fields
+
+        // this constant controls how large the vertices buffer is. Larger buffers will
+        // require flushing less often, which can increase performance. However, having
+        // buffer that is unnecessarily large will waste memory.
+        const int DefaultBufferSize = 500;
+
+        // a block of vertices that calling AddVertex will fill. Flush will draw using
+        // this array, and will determine how many primitives to draw from
+        // positionInBuffer.
+        VertexPositionColor[] vertices = new VertexPositionColor[DefaultBufferSize];
+
+        // keeps track of how many vertices have been added. this value increases until
+        // we run out of space in the buffer, at which time Flush is automatically
+        // called.
+        int positionInBuffer = 0;
+
+        // a basic effect, which contains the shaders that we will use to draw our
+        // primitives.
+        BasicEffect basicEffect;
+
+        // the device that we will issue draw calls to.
+        GraphicsDevice device;
+
+        // this value is set by Begin, and is the type of primitives that we are
+        // drawing.
+        PrimitiveType primitiveType;
+
+        // how many verts does each of these primitives take up? points are 1,
+        // lines are 2, and triangles are 3.
+        int numVertsPerPrimitive;
+
+        // hasBegun is flipped to true once Begin is called, and is used to make
+        // sure users don't call End before Begin is called.
+        bool hasBegun = false;
+
+        bool isDisposed = false;
+
+        #endregion
+
+        // the constructor creates a new PrimitiveBatch and sets up all of the internals
+        // that PrimitiveBatch will need.
+        public PrimitiveBatch(GraphicsDevice graphicsDevice)
+        {
+            if (graphicsDevice == null)
+            {
+                throw new ArgumentNullException("graphicsDevice");
+            }
+            device = graphicsDevice;
+
+            // set up a new basic effect, and enable vertex colors.
+            basicEffect = new BasicEffect(graphicsDevice);
+            basicEffect.VertexColorEnabled = true;
+
+            // projection uses CreateOrthographicOffCenter to create 2d projection
+            // matrix with 0,0 in the upper left.
+            basicEffect.Projection = Matrix.CreateOrthographicOffCenter
+                (0, graphicsDevice.Viewport.Width,
+                graphicsDevice.Viewport.Height, 0,
+                0, 1);
+        }
+
+        public void Dispose()
+        {
+            this.Dispose(true);
+            GC.SuppressFinalize(this);
+        }
+
+        protected virtual void Dispose(bool disposing)
+        {
+            if (disposing && !isDisposed)
+            {
+                if (basicEffect != null)
+                    basicEffect.Dispose();
+
+                isDisposed = true;
+            }
+        }
+
+        // Begin is called to tell the PrimitiveBatch what kind of primitives will be
+        // drawn, and to prepare the graphics card to render those primitives.
+        public void Begin(PrimitiveType primitiveType)
+        {
+            if (hasBegun)
+            {
+                throw new InvalidOperationException
+                    ("End must be called before Begin can be called again.");
+            }
+
+            // these three types reuse vertices, so we can't flush properly without more
+            // complex logic. Since that's a bit too complicated for this sample, we'll
+            // simply disallow them.
+            if (primitiveType == PrimitiveType.LineStrip ||
+                primitiveType == PrimitiveType.TriangleStrip)
+            {
+                throw new NotSupportedException
+                    ("The specified primitiveType is not supported by PrimitiveBatch.");
+            }
+
+            this.primitiveType = primitiveType;
+
+            // how many verts will each of these primitives require?
+            this.numVertsPerPrimitive = NumVertsPerPrimitive(primitiveType);
+
+            //tell our basic effect to begin.
+            basicEffect.CurrentTechnique.Passes[0].Apply();
+
+            // flip the error checking boolean. It's now ok to call AddVertex, Flush,
+            // and End.
+            hasBegun = true;
+        }
+
+        // AddVertex is called to add another vertex to be rendered. To draw a point,
+        // AddVertex must be called once. for lines, twice, and for triangles 3 times.
+        // this function can only be called once begin has been called.
+        // if there is not enough room in the vertices buffer, Flush is called
+        // automatically.
+        public void AddVertex(Vector2 vertex, Color color)
+        {
+            if (!hasBegun)
+            {
+                throw new InvalidOperationException
+                    ("Begin must be called before AddVertex can be called.");
+            }
+
+            // are we starting a new primitive? if so, and there will not be enough room
+            // for a whole primitive, flush.
+            bool newPrimitive = ((positionInBuffer % numVertsPerPrimitive) == 0);
+
+            if (newPrimitive &&
+                (positionInBuffer + numVertsPerPrimitive) >= vertices.Length)
+            {
+                Flush();
+            }
+
+            // once we know there's enough room, set the vertex in the buffer,
+            // and increase position.
+            vertices[positionInBuffer].Position = new Vector3(vertex, 0);
+            vertices[positionInBuffer].Color = color;
+
+            positionInBuffer++;
+        }
+
+        // End is called once all the primitives have been drawn using AddVertex.
+        // it will call Flush to actually submit the draw call to the graphics card, and
+        // then tell the basic effect to end.
+        public void End()
+        {
+            if (!hasBegun)
+            {
+                throw new InvalidOperationException
+                    ("Begin must be called before End can be called.");
+            }
+
+            // Draw whatever the user wanted us to draw
+            Flush();
+
+            hasBegun = false;
+        }
+
+        // Flush is called to issue the draw call to the graphics card. Once the draw
+        // call is made, positionInBuffer is reset, so that AddVertex can start over
+        // at the beginning. End will call this to draw the primitives that the user
+        // requested, and AddVertex will call this if there is not enough room in the
+        // buffer.
+        private void Flush()
+        {
+            if (!hasBegun)
+            {
+                throw new InvalidOperationException
+                    ("Begin must be called before Flush can be called.");
+            }
+
+            // no work to do
+            if (positionInBuffer == 0)
+            {
+                return;
+            }
+
+            // how many primitives will we draw?
+            int primitiveCount = positionInBuffer / numVertsPerPrimitive;
+
+            // submit the draw call to the graphics card
+            device.DrawUserPrimitives<VertexPositionColor>(primitiveType, vertices, 0,
+                primitiveCount);
+
+            // now that we've drawn, it's ok to reset positionInBuffer back to zero,
+            // and write over any vertices that may have been set previously.
+            positionInBuffer = 0;
+        }
+
+        #region Helper functions
+
+        // NumVertsPerPrimitive is a boring helper function that tells how many vertices
+        // it will take to draw each kind of primitive.
+        static private int NumVertsPerPrimitive(PrimitiveType primitive)
+        {
+            int numVertsPerPrimitive;
+            switch (primitive)
+            {
+                case PrimitiveType.LineList:
+                    numVertsPerPrimitive = 2;
+                    break;
+                case PrimitiveType.TriangleList:
+                    numVertsPerPrimitive = 3;
+                    break;
+                default:
+                    throw new InvalidOperationException("primitive is not valid");
+            }
+            return numVertsPerPrimitive;
+        }
+
+        #endregion
+
+
+    }
+}

+ 65 - 0
Samples/MacOS/StarWarrior/Primitives/Triangles.cs

@@ -0,0 +1,65 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+
+namespace StarWarrior.Primitives
+{
+    public class Triangle
+    {
+        PrimitiveBatch batch;
+        List<Vector2> point = new List<Vector2>();
+        Color color = Color.White;
+        bool fill = true;
+        RasterizerState state;
+        GraphicsDevice device;       
+
+
+        public Triangle(GraphicsDevice device,PrimitiveBatch primitiveBatch)
+        {
+            this.device = device;
+            this.batch = primitiveBatch;
+            state = new RasterizerState();
+            state.CullMode = CullMode.CullCounterClockwiseFace;
+            state.FillMode = FillMode.WireFrame;
+        }
+
+        public void AddTriangle(float x1, float y1, float x2, float y2, float x3, float y3)
+        {
+            point.Add(new Vector2(x1,y1));
+            point.Add(new Vector2(x2, y2));
+            point.Add(new Vector2(x3, y3));
+        }
+
+        public void SetColor(Color color)
+        {
+            this.color = color;
+        }
+
+        public void SetFillMode(bool fill)
+        {
+            this.fill = fill;
+        }
+
+        public void Draw(Vector2 transform)
+        {
+            //if (fill == false)
+            //{
+            //    device.RasterizerState = state;
+            //}
+
+            foreach (var item in point)
+            {
+                batch.AddVertex(item + transform, color);       
+            }
+           
+            //if (fill == false)
+            //{
+            //    device.RasterizerState = RasterizerState.CullCounterClockwise;
+            //}
+        }
+
+    }
+}

+ 70 - 0
Samples/MacOS/StarWarrior/Primitives/TrianglesStrip.cs

@@ -0,0 +1,70 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+
+namespace StarWarrior.Primitives
+{
+    public class TrianglesStrip
+    {
+        PrimitiveBatch batch;
+        List<Vector2> point = new List<Vector2>();
+        Color color = Color.White;
+        bool fill = true;
+        RasterizerState state;
+        GraphicsDevice device;
+
+
+        public TrianglesStrip(GraphicsDevice device,PrimitiveBatch primitiveBatch)
+        {
+            this.device = device;
+            this.batch = primitiveBatch;
+            state = new RasterizerState();
+            state.CullMode = CullMode.CullCounterClockwiseFace;
+            state.FillMode = FillMode.WireFrame;
+        }
+
+        public void AddPoint(float x1, float y1)
+        {
+            point.Add(new Vector2(x1,y1));            
+        }
+
+        public void SetColor(Color color)
+        {
+            this.color = color;
+        }
+
+        public void SetFillMode(bool fill)
+        {
+            this.fill = fill;
+        }
+
+        public void Draw(Vector2 transform)
+        {
+            if (fill == false)
+            {
+                device.RasterizerState = state;
+            }
+
+            if (point.Count < 3)
+            {
+                throw new InvalidOperationException("precisa de 3 pontos pelo menos para poder desenhar os triangulos");
+            }
+
+            batch.Begin(PrimitiveType.TriangleStrip);
+            foreach (var item in point)
+            {
+                batch.AddVertex(item + transform, color);       
+            }
+            batch.End();
+
+            if (fill == false)
+            {
+                device.RasterizerState = RasterizerState.CullCounterClockwise;
+            }
+        }
+
+    }
+}

+ 1 - 0
Samples/MacOS/StarWarrior/Program.cs

@@ -0,0 +1 @@
+using System;

namespace StarWarrior
{

	static class Program
	{
		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		static void Main (string[] args)
		{
			MonoMac.AppKit.NSApplication.Init ();
			
			using (var p = new MonoMac.Foundation.NSAutoreleasePool ()) {
				MonoMac.AppKit.NSApplication.SharedApplication.Delegate = new AppDelegate();
				MonoMac.AppKit.NSApplication.Main(args);
			}
		}
	}
	
	class AppDelegate : MonoMac.AppKit.NSApplicationDelegate
	{
		
		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
		{
			using (Game1 game = new Game1()) {
				game.Run ();
			}
		}
		
		public override bool ApplicationShouldTerminateAfterLastWindowClosed (MonoMac.AppKit.NSApplication sender)
		{
			return true;
		}
	}


}


+ 7 - 0
Samples/MacOS/StarWarrior/Readme.md

@@ -0,0 +1,7 @@
+StarWarrior
+===========
+
+Shows an example of an entity system.
+
+Ported to MonoGame by Kenneth J. Pouncey from the original here: 
+https://github.com/thelinuxlich/starwarrior_CSharp

+ 27 - 0
Samples/MacOS/StarWarrior/Spatials/EnemyShip.cs

@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Artemis;
+using StarWarrior.Components;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using StarWarrior.Primitives;
+using Microsoft.Xna.Framework.Content;
+
+namespace StarWarrior.Spatials
+{
+    static class EnemyShip
+    {
+        private static Texture2D ship = null;
+      
+	    public static void Render(SpriteBatch spriteBatch, ContentManager contentManager, Transform transform) {
+            if (ship == null)
+            {
+                ship = contentManager.Load<Texture2D>("enemy");
+            }
+            Rectangle rect = new Rectangle((int)transform.GetX(),(int)transform.GetY(),ship.Width,ship.Height);
+            spriteBatch.Draw(ship, rect, Color.Red);
+	    }
+    }
+}

+ 26 - 0
Samples/MacOS/StarWarrior/Spatials/Explosion.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Artemis;
+using StarWarrior.Components;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework.Content;
+
+namespace StarWarrior.Spatials
+{
+    static class Explosion
+    {
+        static Texture2D circle = null;
+
+        public static void Render(SpriteBatch spriteBatch, ContentManager contentManager, Transform transform,Color color,int radius)
+        {
+            if (circle == null)
+            {
+                circle = contentManager.Load<Texture2D>("explosion");
+            }
+            spriteBatch.Draw(circle, new Vector2((float)transform.GetX() - radius, (float)transform.GetY() - radius),null,Color.White,0,new Vector2(0,0),0.3f,SpriteEffects.None,0);
+	    }
+    }
+}

+ 25 - 0
Samples/MacOS/StarWarrior/Spatials/Missile.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Artemis;
+using StarWarrior.Components;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework.Content;
+
+namespace StarWarrior.Spatials
+{
+    static class Missile
+    {
+        static Texture2D bullet = null;
+	   
+	    public static void Render(SpriteBatch spriteBatch,ContentManager contentManager,Transform transform) {
+            if (bullet == null)
+            {
+                bullet = contentManager.Load<Texture2D>("bullet");
+            }
+		    spriteBatch.Draw(bullet, new Vector2(transform.GetX(), transform.GetY()), Color.White);
+	    }
+    }
+}

+ 28 - 0
Samples/MacOS/StarWarrior/Spatials/PlayerShip.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Artemis;
+using StarWarrior.Components;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using StarWarrior.Primitives;
+using Microsoft.Xna.Framework.Content;
+
+namespace StarWarrior.Spatials
+{
+    static class PlayerShip
+    {
+        private static Texture2D ship = null;
+
+        public static void Render(SpriteBatch spriteBatch, ContentManager contentManager, Transform transform)
+        {
+            if (ship == null)
+            {
+                ship = contentManager.Load<Texture2D>("player");
+            }
+            Rectangle rect = new Rectangle((int)transform.GetX(), (int)transform.GetY(), ship.Width, ship.Height);
+            spriteBatch.Draw(ship, rect, Color.White);
+        }
+    }
+}

+ 26 - 0
Samples/MacOS/StarWarrior/Spatials/ShipExplosion.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Artemis;
+using StarWarrior.Components;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework.Content;
+
+namespace StarWarrior.Spatials
+{
+    static class ShipExplosion
+    {
+        static Texture2D circle = null;
+
+        public static void Render(SpriteBatch spriteBatch, ContentManager contentManager, Transform transform, Color color, int radius)
+        {
+            if (circle == null)
+            {
+                circle = contentManager.Load<Texture2D>("explosion");
+            }
+            spriteBatch.Draw(circle, new Vector2((float)transform.GetX() - radius, (float)transform.GetY() - radius), null, Color.White, 0, new Vector2(0, 0), 0.8f, SpriteEffects.None, 0);
+        }
+    }
+}

+ 98 - 0
Samples/MacOS/StarWarrior/StarWarrior.csproj

@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>10.0.0</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{C9382003-668B-48E6-86BC-7ECDE3ECFDBE}</ProjectGuid>
+    <ProjectTypeGuids>{948B3504-5B70-4649-8FE4-BDE1FB46EC69};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>StartWarrior</RootNamespace>
+    <AssemblyName>StartWarrior</AssemblyName>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug</OutputPath>
+    <DefineConstants>DEBUG;</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>none</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="MonoMac" />
+    <Reference Include="artemis">
+      <HintPath>Artemis\PC\artemis.dll</HintPath>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Info.plist" />
+    <None Include="Game.ico" />
+    <None Include="GameThumbnail.png" />
+    <None Include="PhoneGameThumb.png" />
+    <None Include="Content\myFont.spritefont" />
+    <None Include="Readme.md" />
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\..\MonoGame\MonoGame.Framework\MonoGame.Framework.MacOS.csproj">
+      <Project>{36C538E6-C32A-4A8D-A39C-566173D7118E}</Project>
+      <Name>MonoGame.Framework.MacOS</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Program.cs" />
+    <Compile Include="Game1.cs" />
+    <Compile Include="Components\Enemy.cs" />
+    <Compile Include="Components\Expires.cs" />
+    <Compile Include="Components\Health.cs" />
+    <Compile Include="Components\SpatialForm.cs" />
+    <Compile Include="Components\Transform.cs" />
+    <Compile Include="Components\Velocity.cs" />
+    <Compile Include="Components\Weapon.cs" />
+    <Compile Include="Systems\CollisionSystem.cs" />
+    <Compile Include="Systems\EnemyShipMovementSystem.cs" />
+    <Compile Include="Systems\EnemyShooterSystem.cs" />
+    <Compile Include="Systems\EnemySpawnSystem.cs" />
+    <Compile Include="Systems\ExpirationSystem.cs" />
+    <Compile Include="Systems\HealthBarRenderSystem.cs" />
+    <Compile Include="Systems\HudRenderSystem.cs" />
+    <Compile Include="Systems\MovementSystem.cs" />
+    <Compile Include="Systems\PlayerShipControlSystem.cs" />
+    <Compile Include="Systems\RenderSystem.cs" />
+    <Compile Include="Spatials\EnemyShip.cs" />
+    <Compile Include="Spatials\Explosion.cs" />
+    <Compile Include="Spatials\Missile.cs" />
+    <Compile Include="Spatials\PlayerShip.cs" />
+    <Compile Include="Spatials\ShipExplosion.cs" />
+    <Compile Include="Primitives\Lines.cs" />
+    <Compile Include="Primitives\PrimitiveBatch.cs" />
+    <Compile Include="Primitives\Triangles.cs" />
+    <Compile Include="Primitives\TrianglesStrip.cs" />
+    <Compile Include="EntityFactory.cs" />
+    <Compile Include="Pool.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="Content\Arial.xnb" />
+    <Content Include="Content\bullet.png" />
+    <Content Include="Content\enemy.png" />
+    <Content Include="Content\explosion.png" />
+    <Content Include="Content\player.png" />
+  </ItemGroup>
+</Project>

+ 62 - 0
Samples/MacOS/StarWarrior/Systems/CollisionSystem.cs

@@ -0,0 +1,62 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Artemis;
+using StarWarrior.Components;
+
+namespace StarWarrior.Systems
+{
+    class CollisionSystem : EntitySystem
+    {
+        private ComponentMapper<Transform> transformMapper;
+	    private ComponentMapper<Velocity> velocityMapper;
+	    private ComponentMapper<Health> healthMapper;
+
+	    public CollisionSystem() : base(typeof(Transform)){
+	    }
+
+	    public override void Initialize() {
+		    transformMapper = new ComponentMapper<Transform>(world);
+		    velocityMapper = new ComponentMapper<Velocity>(world);
+		    healthMapper = new ComponentMapper<Health>(world);
+	    }
+
+        protected override void ProcessEntities(Dictionary<int, Entity> entities)
+        {
+            Bag<Entity> bullets = world.GetGroupManager().getEntities("BULLETS");
+		    Bag<Entity> ships = world.GetGroupManager().getEntities("SHIPS");            
+            if(bullets != null && ships != null) {                
+			    for(int a = 0; ships.Size() > a; a++) {                    
+				    Entity ship = ships.Get(a);
+				    for(int b = 0; bullets.Size() > b; b++) {
+					    Entity bullet = bullets.Get(b);
+					
+					    if(CollisionExists(bullet, ship)) {
+						    Transform tb = transformMapper.Get(bullet);
+						    EntityFactory.CreateBulletExplosion(world, tb.GetX(), tb.GetY()).Refresh();
+						    world.DeleteEntity(bullet);
+						
+						    Health health = healthMapper.Get(ship);
+						    health.AddDamage(4);
+	
+						    if(!health.IsAlive()) {
+							    Transform ts = transformMapper.Get(ship);	
+							    EntityFactory.CreateShipExplosion(world, ts.GetX(), ts.GetY()).Refresh();
+							    world.DeleteEntity(ship);
+                                break;
+						    }
+					    }
+				    }                    
+			    }
+		    }
+	    }
+
+	    private bool CollisionExists(Entity e1, Entity e2) {
+		    Transform t1 = transformMapper.Get(e1);
+		    Transform t2 = transformMapper.Get(e2);
+            return t1.GetDistanceTo(t2) < 15;
+            
+	    }
+    }
+}

+ 36 - 0
Samples/MacOS/StarWarrior/Systems/EnemyShipMovementSystem.cs

@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Artemis;
+using StarWarrior.Components;
+using Microsoft.Xna.Framework.Graphics;
+
+namespace StarWarrior.Systems
+{
+    class EnemyShipMovementSystem : EntityProcessingSystem
+    {
+        private SpriteBatch spriteBatch;
+	    private ComponentMapper<Transform> transformMapper;
+	    private ComponentMapper<Velocity> velocityMapper;
+        
+	    public EnemyShipMovementSystem(SpriteBatch spriteBatch) : base(typeof(Transform), typeof(Velocity),typeof(Enemy)) {
+		    this.spriteBatch = spriteBatch;
+	    }
+
+	    public override void Initialize() {
+		    transformMapper = new ComponentMapper<Transform>(world);
+		    velocityMapper = new ComponentMapper<Velocity>(world);
+	    }
+
+	    public override void Process(Entity e) {
+            Transform transform = transformMapper.Get(e);
+            Velocity velocity = velocityMapper.Get(e);
+
+            if (transform.GetX() > spriteBatch.GraphicsDevice.Viewport.Width || transform.GetX() < 0)
+            {
+                velocity.AddAngle(180);
+            }
+	    }
+    }
+}

+ 42 - 0
Samples/MacOS/StarWarrior/Systems/EnemyShooterSystem.cs

@@ -0,0 +1,42 @@
+using System;
+using Artemis;
+using StarWarrior.Components;
+namespace StarWarrior.Systems
+{
+	public class EnemyShooterSystem : EntityProcessingSystem {
+
+		private ComponentMapper<Weapon> weaponMapper;		
+		private ComponentMapper<Transform> transformMapper;
+        Random rd = new Random();
+        long playerId = -1;
+	
+		public EnemyShooterSystem() : base(typeof(Transform), typeof(Weapon),typeof(Enemy)) {
+		}
+	
+		public override void Initialize() {
+			weaponMapper = new ComponentMapper<Weapon>(world);
+			transformMapper = new ComponentMapper<Transform>(world);
+		}
+	
+		protected override void Begin() {			
+		}
+	
+		public override void Process(Entity e) {
+            Weapon weapon = weaponMapper.Get(e);
+
+            long t = weapon.GetShotAt() + TimeSpan.FromSeconds(2).Ticks;
+            if (t < DateTime.Now.Ticks)
+            {
+                Transform transform = transformMapper.Get(e);
+
+                Entity missile = EntityFactory.CreateMissile(world);
+                missile.GetComponent<Transform>().SetLocation(transform.GetX() + 20, transform.GetY() + 20);
+                missile.GetComponent<Velocity>().SetVelocity(-0.5f);
+                missile.GetComponent<Velocity>().SetAngle(270);
+                missile.Refresh();
+
+                weapon.SetShotAt(DateTime.Now.Ticks);
+            }
+		}
+    }
+}

+ 33 - 0
Samples/MacOS/StarWarrior/Systems/EnemySpawnSystem.cs

@@ -0,0 +1,33 @@
+using System;
+using Artemis;
+using StarWarrior.Components;
+using Microsoft.Xna.Framework.Graphics;
+using System.Collections.Generic;
+namespace StarWarrior.Systems
+{
+	public class EnemySpawnSystem : IntervalEntitySystem {
+
+		private SpriteBatch spriteBatch;
+		private Random r;
+	
+		public EnemySpawnSystem(int interval, SpriteBatch spriteBatch) : base(interval){
+			this.spriteBatch = spriteBatch;
+		}
+	
+		public override void Initialize() {
+			r = new Random();
+		}
+        
+       protected override void ProcessEntities(Dictionary<int, Entity> entities)
+        {            
+			Entity e = EntityFactory.CreateEnemyShip(world);
+			
+			e.GetComponent<Transform>().SetLocation(r.Next(spriteBatch.GraphicsDevice.Viewport.Width), r.Next(400)+50);
+			e.GetComponent<Velocity>().SetVelocity(0.05f);
+			e.GetComponent<Velocity>().SetAngle(r.Next() % 2  == 0 ? 0 : 180);
+			
+			e.Refresh();
+		}
+    }
+}
+

+ 28 - 0
Samples/MacOS/StarWarrior/Systems/ExpirationSystem.cs

@@ -0,0 +1,28 @@
+using System;
+using Artemis;
+using StarWarrior.Components;
+namespace StarWarrior.Systems
+{
+	public class ExpirationSystem : EntityProcessingSystem {
+
+		private ComponentMapper<Expires> expiresMapper;
+	
+		public ExpirationSystem() : base(typeof(Expires)) {
+		}
+	
+		public override void Initialize() {
+			expiresMapper = new ComponentMapper<Expires>(world);
+		}
+	
+		public override void Process(Entity e) {
+			Expires expires = expiresMapper.Get(e);
+			expires.ReduceLifeTime(world.GetDelta());
+	
+			if (expires.IsExpired()) {
+				world.DeleteEntity(e);
+			}
+	
+		}
+    }
+}
+

+ 32 - 0
Samples/MacOS/StarWarrior/Systems/HealthBarRenderSystem.cs

@@ -0,0 +1,32 @@
+using System;
+using Artemis;
+using StarWarrior.Components;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+namespace StarWarrior.Systems
+{
+	public class HealthBarRenderSystem : EntityProcessingSystem {
+		private SpriteBatch spriteBatch;
+		private ComponentMapper<Health> healthMapper;
+		private ComponentMapper<Transform> transformMapper;
+        private SpriteFont font;
+	
+		public HealthBarRenderSystem(SpriteBatch spriteBatch,SpriteFont font) : base(typeof(Health), typeof(Transform)) {
+			this.spriteBatch = spriteBatch;
+            this.font = font;
+		}
+	
+		public override void Initialize() {
+			healthMapper = new ComponentMapper<Health>(world);
+			transformMapper = new ComponentMapper<Transform>(world);
+		}
+	
+		public override void Process(Entity e) {
+			Health health = healthMapper.Get(e);
+			Transform transform = transformMapper.Get(e);
+			Vector2 textPosition = new Vector2((float)transform.GetX()-10, (float)transform.GetY()-30);
+			spriteBatch.DrawString(font,health.GetHealthPercentage() + "%",textPosition,Color.White);
+		}
+    }
+}
+

+ 31 - 0
Samples/MacOS/StarWarrior/Systems/HudRenderSystem.cs

@@ -0,0 +1,31 @@
+using System;
+using Artemis;
+using StarWarrior.Components;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework.Content;
+using System.Collections.Generic;
+namespace StarWarrior.Systems
+{
+	public class HudRenderSystem : TagSystem {
+		private SpriteBatch spriteBatch;
+		private ComponentMapper<Health> healthMapper;
+        private SpriteFont font;
+       
+		public HudRenderSystem(SpriteBatch spriteBatch,SpriteFont font) : base("PLAYER") {
+			this.spriteBatch = spriteBatch;
+            this.font = font;
+		}
+	
+		public override void Initialize() {
+            healthMapper = new ComponentMapper<Health>(world);
+		}
+	
+        public override void Process(Entity e) {
+            Health health = healthMapper.Get(e);
+            Vector2 textPosition = new Vector2(20, spriteBatch.GraphicsDevice.Viewport.Height);
+            spriteBatch.DrawString(font, "Health: " + health.GetHealthPercentage() + "%", textPosition, Color.White);
+		}
+    }
+}
+

+ 36 - 0
Samples/MacOS/StarWarrior/Systems/MovementSystem.cs

@@ -0,0 +1,36 @@
+using System;
+using Artemis;
+using StarWarrior.Components;
+using Microsoft.Xna.Framework.Graphics;
+namespace StarWarrior.Systems
+{
+	public class MovementSystem : EntityProcessingSystem {
+		private SpriteBatch spriteBatch;
+		private ComponentMapper<Velocity> velocityMapper;
+		private ComponentMapper<Transform> transformMapper;
+	
+		public MovementSystem(SpriteBatch spriteBatch) : base(typeof(Transform), typeof(Velocity)) {
+			this.spriteBatch = spriteBatch;
+		}
+	
+		public override void Initialize() {
+			velocityMapper = new ComponentMapper<Velocity>(world);
+			transformMapper = new ComponentMapper<Transform>(world);
+		}
+	
+		public override void Process(Entity e) {
+			Velocity velocity = velocityMapper.Get(e);
+			float v = velocity.GetVelocity();
+	
+			Transform transform = transformMapper.Get(e);
+	
+			float r = velocity.GetAngleAsRadians();
+	
+			float xn = transform.GetX() + (TrigLUT.Cos(r) * v * world.GetDelta());
+			float yn = transform.GetY() + (TrigLUT.Sin(r) * v * world.GetDelta());
+	
+			transform.SetLocation(xn, yn);
+		}
+    }
+}
+

+ 79 - 0
Samples/MacOS/StarWarrior/Systems/PlayerShipControlSystem.cs

@@ -0,0 +1,79 @@
+using System;
+using Artemis;
+using StarWarrior.Components;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework.Input;
+using System.Collections.Generic;
+namespace StarWarrior.Systems
+{
+	public class PlayerShipControlSystem : TagSystem {
+		private SpriteBatch spriteBatch;
+		private bool moveRight;
+		private bool moveLeft;
+		private bool shoot;
+		private ComponentMapper<Transform> transformMapper;
+        private KeyboardState oldState;
+        
+		public PlayerShipControlSystem(SpriteBatch spriteBatch) : base("PLAYER") {
+			this.spriteBatch = spriteBatch;
+		}
+	
+		public override void Initialize() {
+            transformMapper = new ComponentMapper<Transform>(world);
+            oldState = Keyboard.GetState();
+		}
+
+        public override void Process(Entity e)
+        {
+            Transform transform = transformMapper.Get(e);
+            UpdateInput();
+            if (moveLeft)
+            {
+                transform.AddX(world.GetDelta() * -0.3f);
+            }
+            if (moveRight)
+            {
+                transform.AddX(world.GetDelta() * 0.3f);
+            }
+
+            if (shoot)
+            {
+                Entity missile = EntityFactory.CreateMissile(world);
+                missile.GetComponent<Transform>().SetLocation(transform.GetX()+30, transform.GetY() - 20);
+                missile.GetComponent<Velocity>().SetVelocity(-0.5f);
+                missile.GetComponent<Velocity>().SetAngle(90);
+                missile.Refresh();
+
+                shoot = false;
+            }
+		}
+	
+		public void UpdateInput() {
+            KeyboardState ks = Keyboard.GetState();
+			if (ks.IsKeyDown(Keys.A)) {
+				moveLeft = true;
+				moveRight = false;
+            }
+            else if (oldState.IsKeyDown(Keys.A)) {
+                moveLeft = false;
+            }
+            if (ks.IsKeyDown(Keys.D)) {
+                moveRight = true;
+                moveLeft = false;
+            }
+            else if (oldState.IsKeyDown(Keys.D))
+            {
+                moveRight = false;
+            }
+            if (ks.IsKeyDown(Keys.Space) == true && oldState.IsKeyDown(Keys.Space) == false)
+            {
+                shoot = true;
+            }
+            else if (oldState.IsKeyDown(Keys.Space))
+            {
+                shoot = false;
+            }
+            oldState = ks;
+		}
+    }
+}

+ 63 - 0
Samples/MacOS/StarWarrior/Systems/RenderSystem.cs

@@ -0,0 +1,63 @@
+using System;
+using Artemis;
+using StarWarrior.Components;
+using StarWarrior.Spatials;
+using Microsoft.Xna.Framework.Graphics;
+using StarWarrior.Primitives;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Content;
+namespace StarWarrior.Systems	
+{
+	public class RenderSystem : EntityProcessingSystem {
+		private ComponentMapper<SpatialForm> spatialFormMapper;
+		private ComponentMapper<Transform> transformMapper;
+        private SpriteBatch spriteBatch;
+        private Transform transform;
+        private string spatialName;
+        private ContentManager contentManager;
+        GraphicsDevice device;
+	
+		public RenderSystem(GraphicsDevice device,SpriteBatch spriteBatch,ContentManager contentManager) : base(typeof(Transform), typeof(SpatialForm)) {
+            this.spriteBatch = spriteBatch;
+            this.device = device;
+            this.contentManager = contentManager;
+		}
+	
+		public override void Initialize() {
+			spatialFormMapper = new ComponentMapper<SpatialForm>(world);
+			transformMapper = new ComponentMapper<Transform>(world);
+        }
+	
+		public override void Process(Entity e) {
+			transform = transformMapper.Get(e);
+            SpatialForm spatialForm = spatialFormMapper.Get(e);
+            spatialName = spatialForm.GetSpatialFormFile();
+	
+			if (transform.GetX() >= 0 && transform.GetY() >= 0 && transform.GetX() < spriteBatch.GraphicsDevice.Viewport.Width && transform.GetY() < spriteBatch.GraphicsDevice.Viewport.Height && spatialForm != null) {
+                CreateSpatial(e); 
+			}
+		}
+
+		private void CreateSpatial(Entity e) {
+			if (String.Compare("PlayerShip",spatialName,StringComparison.InvariantCultureIgnoreCase) == 0) {
+                PlayerShip.Render(spriteBatch, contentManager,transform);
+            }
+            else if (String.Compare("Missile", spatialName, StringComparison.InvariantCultureIgnoreCase) == 0)
+            {
+                Missile.Render(spriteBatch, contentManager, transform);
+            }
+            else if (String.Compare("EnemyShip", spatialName, StringComparison.InvariantCultureIgnoreCase) == 0)
+            {
+                EnemyShip.Render(spriteBatch, contentManager, transform);
+            }
+            else if (String.Compare("BulletExplosion", spatialName, StringComparison.InvariantCultureIgnoreCase) == 0)
+            {
+                Explosion.Render(spriteBatch, contentManager, transform,Color.Red,10);
+            }
+            else if (String.Compare("ShipExplosion", spatialName, StringComparison.InvariantCultureIgnoreCase) == 0)
+            {
+                ShipExplosion.Render(spriteBatch, contentManager, transform, Color.Yellow, 30);
+			}
+		}
+    }
+}

+ 21 - 1
Samples/MonoGame.Samples.MacOS.sln

@@ -65,6 +65,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ParticleSample", "MacOS\Par
 EndProject
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Samples.VideoPlayer.MacOS", "MacOS\VideoPlayer\MonoGame.Samples.VideoPlayer.MacOS.csproj", "{71192C89-7FB6-49A4-A19D-FC89E3D18248}"
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Samples.VideoPlayer.MacOS", "MacOS\VideoPlayer\MonoGame.Samples.VideoPlayer.MacOS.csproj", "{71192C89-7FB6-49A4-A19D-FC89E3D18248}"
 EndProject
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StarWarrior", "MacOS\StarWarrior\StarWarrior.csproj", "{C9382003-668B-48E6-86BC-7ECDE3ECFDBE}"
+EndProject
 Global
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
 		Debug|Any CPU = Debug|Any CPU
@@ -348,6 +350,24 @@ Global
 		{AE483C29-042E-4226-BA52-D247CE7676DA}.Distribution|Any CPU.Build.0 = Debug|Any CPU
 		{AE483C29-042E-4226-BA52-D247CE7676DA}.Distribution|Any CPU.Build.0 = Debug|Any CPU
 		{AE483C29-042E-4226-BA52-D247CE7676DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{AE483C29-042E-4226-BA52-D247CE7676DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{AE483C29-042E-4226-BA52-D247CE7676DA}.Release|Any CPU.Build.0 = Release|Any CPU
 		{AE483C29-042E-4226-BA52-D247CE7676DA}.Release|Any CPU.Build.0 = Release|Any CPU
+		{C9382003-668B-48E6-86BC-7ECDE3ECFDBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{C9382003-668B-48E6-86BC-7ECDE3ECFDBE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{C9382003-668B-48E6-86BC-7ECDE3ECFDBE}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+		{C9382003-668B-48E6-86BC-7ECDE3ECFDBE}.Debug|iPhone.Build.0 = Debug|Any CPU
+		{C9382003-668B-48E6-86BC-7ECDE3ECFDBE}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+		{C9382003-668B-48E6-86BC-7ECDE3ECFDBE}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+		{C9382003-668B-48E6-86BC-7ECDE3ECFDBE}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{C9382003-668B-48E6-86BC-7ECDE3ECFDBE}.Debug|x86.Build.0 = Debug|Any CPU
+		{C9382003-668B-48E6-86BC-7ECDE3ECFDBE}.Distribution|Any CPU.ActiveCfg = Debug|Any CPU
+		{C9382003-668B-48E6-86BC-7ECDE3ECFDBE}.Distribution|Any CPU.Build.0 = Debug|Any CPU
+		{C9382003-668B-48E6-86BC-7ECDE3ECFDBE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{C9382003-668B-48E6-86BC-7ECDE3ECFDBE}.Release|Any CPU.Build.0 = Release|Any CPU
+		{C9382003-668B-48E6-86BC-7ECDE3ECFDBE}.Release|iPhone.ActiveCfg = Release|Any CPU
+		{C9382003-668B-48E6-86BC-7ECDE3ECFDBE}.Release|iPhone.Build.0 = Release|Any CPU
+		{C9382003-668B-48E6-86BC-7ECDE3ECFDBE}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+		{C9382003-668B-48E6-86BC-7ECDE3ECFDBE}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+		{C9382003-668B-48E6-86BC-7ECDE3ECFDBE}.Release|x86.ActiveCfg = Release|Any CPU
+		{C9382003-668B-48E6-86BC-7ECDE3ECFDBE}.Release|x86.Build.0 = Release|Any CPU
 		{D03F3BAF-E4D0-4B6B-A567-9A0E2F882335}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{D03F3BAF-E4D0-4B6B-A567-9A0E2F882335}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{D03F3BAF-E4D0-4B6B-A567-9A0E2F882335}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{D03F3BAF-E4D0-4B6B-A567-9A0E2F882335}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{D03F3BAF-E4D0-4B6B-A567-9A0E2F882335}.Debug|x86.ActiveCfg = Debug|Any CPU
 		{D03F3BAF-E4D0-4B6B-A567-9A0E2F882335}.Debug|x86.ActiveCfg = Debug|Any CPU
@@ -389,6 +409,6 @@ Global
 		{098BBC2D-63A6-4C22-8A30-E6C4F4FC0AC4} = {D8364542-40DC-4D3C-9893-5DF46B9CEF77}
 		{098BBC2D-63A6-4C22-8A30-E6C4F4FC0AC4} = {D8364542-40DC-4D3C-9893-5DF46B9CEF77}
 	EndGlobalSection
 	EndGlobalSection
 	GlobalSection(MonoDevelopProperties) = preSolution
 	GlobalSection(MonoDevelopProperties) = preSolution
-		StartupItem = MacOS\Draw2D\MonoGame.Samples.Draw2D.MacOS.csproj
+		StartupItem = MacOS\ParticleSample\ParticleSample.csproj
 	EndGlobalSection
 	EndGlobalSection
 EndGlobal
 EndGlobal

+ 1 - 10
Samples/iOS/Aiming/MonoGame.Samples.Aiming.csproj

@@ -6,13 +6,10 @@
     <ProductVersion>9.0.21022</ProductVersion>
     <ProductVersion>9.0.21022</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{E4C7960D-E564-4CD5-85D6-2B7B0B3DA5BA}</ProjectGuid>
     <ProjectGuid>{E4C7960D-E564-4CD5-85D6-2B7B0B3DA5BA}</ProjectGuid>
-    <ProjectTypeGuids>{E613F3A2-FE9C-494F-B74E-F63BCB86FEA6};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <ProjectTypeGuids>{6BC8ED88-2882-458C-8E55-DFD12B67127B};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
     <OutputType>Exe</OutputType>
     <OutputType>Exe</OutputType>
     <RootNamespace>MonoGame.Samples.Aiming</RootNamespace>
     <RootNamespace>MonoGame.Samples.Aiming</RootNamespace>
     <TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
     <TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
-    <BundleDisplayName>Aiming</BundleDisplayName>
-    <BundleIcon>GameThumbnail.png</BundleIcon>
-    <BundleIdentifier>project.MonoGame.Aiming</BundleIdentifier>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
     <DebugSymbols>true</DebugSymbols>
     <DebugSymbols>true</DebugSymbols>
@@ -31,7 +28,6 @@
     <MtouchUseArmv7>false</MtouchUseArmv7>
     <MtouchUseArmv7>false</MtouchUseArmv7>
     <MtouchUseThumb>false</MtouchUseThumb>
     <MtouchUseThumb>false</MtouchUseThumb>
     <MtouchUseSGen>false</MtouchUseSGen>
     <MtouchUseSGen>false</MtouchUseSGen>
-    <MtouchMinimumOS>3.1</MtouchMinimumOS>
     <MtouchArch>ARMv6</MtouchArch>
     <MtouchArch>ARMv6</MtouchArch>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
@@ -51,7 +47,6 @@
     <MtouchUseThumb>false</MtouchUseThumb>
     <MtouchUseThumb>false</MtouchUseThumb>
     <MtouchUseSGen>false</MtouchUseSGen>
     <MtouchUseSGen>false</MtouchUseSGen>
     <MtouchSdkVersion>3.0</MtouchSdkVersion>
     <MtouchSdkVersion>3.0</MtouchSdkVersion>
-    <MtouchMinimumOS>3.0</MtouchMinimumOS>
     <MtouchArch>ARMv6</MtouchArch>
     <MtouchArch>ARMv6</MtouchArch>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
@@ -72,7 +67,6 @@
     <MtouchUseThumb>false</MtouchUseThumb>
     <MtouchUseThumb>false</MtouchUseThumb>
     <MtouchUseSGen>false</MtouchUseSGen>
     <MtouchUseSGen>false</MtouchUseSGen>
     <MtouchSdkVersion>3.0</MtouchSdkVersion>
     <MtouchSdkVersion>3.0</MtouchSdkVersion>
-    <MtouchMinimumOS>3.0</MtouchMinimumOS>
     <MtouchArch>ARMv6</MtouchArch>
     <MtouchArch>ARMv6</MtouchArch>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
@@ -90,7 +84,6 @@
     <MtouchUseThumb>false</MtouchUseThumb>
     <MtouchUseThumb>false</MtouchUseThumb>
     <MtouchUseSGen>false</MtouchUseSGen>
     <MtouchUseSGen>false</MtouchUseSGen>
     <MtouchSdkVersion>3.0</MtouchSdkVersion>
     <MtouchSdkVersion>3.0</MtouchSdkVersion>
-    <MtouchMinimumOS>3.0</MtouchMinimumOS>
     <MtouchArch>ARMv6</MtouchArch>
     <MtouchArch>ARMv6</MtouchArch>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Distribution|iPhone' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Distribution|iPhone' ">
@@ -108,7 +101,6 @@
     <MtouchUseThumb>false</MtouchUseThumb>
     <MtouchUseThumb>false</MtouchUseThumb>
     <MtouchUseSGen>false</MtouchUseSGen>
     <MtouchUseSGen>false</MtouchUseSGen>
     <MtouchSdkVersion>3.0</MtouchSdkVersion>
     <MtouchSdkVersion>3.0</MtouchSdkVersion>
-    <MtouchMinimumOS>3.0</MtouchMinimumOS>
     <MtouchArch>ARMv6</MtouchArch>
     <MtouchArch>ARMv6</MtouchArch>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Distribution|iPhoneSimulator' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Distribution|iPhoneSimulator' ">
@@ -117,7 +109,6 @@
     <OutputPath>bin\Distribution</OutputPath>
     <OutputPath>bin\Distribution</OutputPath>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <MtouchUseSGen>false</MtouchUseSGen>
     <MtouchUseSGen>false</MtouchUseSGen>
-    <MtouchMinimumOS>3.0</MtouchMinimumOS>
     <MtouchDebug>False</MtouchDebug>
     <MtouchDebug>False</MtouchDebug>
     <AssemblyName>MonoGameSamplesAiming</AssemblyName>
     <AssemblyName>MonoGameSamplesAiming</AssemblyName>
     <MtouchUseLlvm>false</MtouchUseLlvm>
     <MtouchUseLlvm>false</MtouchUseLlvm>

+ 1 - 1
Samples/iOS/Draw2D/Game1.cs

@@ -34,7 +34,7 @@ namespace Microsoft.Xna.Samples.Draw2D
 			Content.RootDirectory = "Content";
 			Content.RootDirectory = "Content";
 			
 			
 			graphics.PreferMultiSampling = true;
 			graphics.PreferMultiSampling = true;
-			graphics.IsFullScreen = true;	
+			graphics.IsFullScreen = true;
 
 
 			graphics.SupportedOrientations = DisplayOrientation.Portrait | DisplayOrientation.LandscapeLeft | DisplayOrientation.LandscapeRight | DisplayOrientation.PortraitUpsideDown;
 			graphics.SupportedOrientations = DisplayOrientation.Portrait | DisplayOrientation.LandscapeLeft | DisplayOrientation.LandscapeRight | DisplayOrientation.PortraitUpsideDown;
 		}
 		}

BIN
Samples/iOS/GameStateManagement/.DS_Store