- Harlinn.WindowsPhone.XNA.zip
- AnatomyOfAGame
- AnatomyOfAGame
- AnatomyOfAGameContent
- AnatomyOfAGameContent.contentproj
- bin
- Windows Phone
- Debug
- obj
- Windows Phone
- Debug
- DesignTimeResolveAssemblyReferencesInput.cache
- TempPE
- Farseer Physics Engine 3.3.1 XNA
- DebugView XNA
- Farseer Physics Engine 3.3 XNA
- Samples XNA WP7.sln
- Samples XNA Xbox360.sln
- Samples XNA.sln
- Samples XNA
- Samples XNA
- Samples XNAContent
- Common
- arrow.png
- buttons.png
- cursor.png
- gradient.png
- logo.png
- popup.png
- slider.png
- socket.png
- stick.png
- Fonts
- detailsFont.spritefont
- frameRateCounterFont.spritefont
- menufont.spritefont
- Materials
- blank.png
- dots.png
- pavement.png
- squares.png
- waves.png
- Samples XNA Content.contentproj
- Samples
- alphabet.png
- car.png
- goo.png
- link.png
- object.png
- wheel.png
- FarseerPhysicsIntro
- FarseerPhysicsIntro
- FarseerPhysicsIntroContent
- bin
- Windows Phone
- Debug
- Release
- DefaultSpriteFont.spritefont
- FarseerPhysicsIntroContent.contentproj
- FarseerPhysicsIntroContent.contentproj.user
- Thumbs.db
- white.png
- Harlinn.WindowsPhone.XNA.sln
- HarlinnFarseerXNA
- XNAImageIntro
- XNAImageIntro
- XNAImageIntroContent
- bin
- Windows Phone
- Debug
- XNAImageIntroContent.contentproj
|
using System.Text;
using Microsoft.Xna.Framework;
namespace FarseerPhysics.SamplesFramework
{
public class SimpleDemo6 : PhysicsGameScreen, IDemoScreen
{
private Agent _agent;
private Border _border;
private Spider[] _spiders;
#region IDemoScreen Members
public string GetTitle()
{
return "Dynamic Angle Joints";
}
public string GetDetails()
{
StringBuilder sb = new StringBuilder();
sb.AppendLine("This demo demonstrates the use of revolute joints combined");
sb.AppendLine("with angle joints that have a dynamic target angle.");
sb.AppendLine(string.Empty);
sb.AppendLine("GamePad:");
sb.AppendLine(" - Rotate agent: left and right triggers");
sb.AppendLine(" - Move agent: right thumbstick");
sb.AppendLine(" - Move cursor: left thumbstick");
sb.AppendLine(" - Grab object (beneath cursor): A button");
sb.AppendLine(" - Drag grabbed object: left thumbstick");
sb.AppendLine(" - Exit to menu: Back button");
sb.AppendLine(string.Empty);
sb.AppendLine("Keyboard:");
sb.AppendLine(" - Rotate agent: left and right arrows");
sb.AppendLine(" - Move agent: A,S,D,W");
sb.AppendLine(" - Exit to menu: Escape");
sb.AppendLine(string.Empty);
sb.AppendLine("Mouse / Touchscreen");
sb.AppendLine(" - Grab object (beneath cursor): Left click");
sb.AppendLine(" - Drag grabbed object: move mouse / finger");
return sb.ToString();
}
#endregion
public override void LoadContent()
{
base.LoadContent();
World.Gravity = new Vector2(0f, 20f);
_border = new Border(World, this, ScreenManager.GraphicsDevice.Viewport);
_agent = new Agent(World, this, new Vector2(0f, 10f));
_spiders = new Spider[8];
for (int i = 0; i < _spiders.Length; i++)
{
_spiders[i] = new Spider(World, this, new Vector2(0f, 8f - (i + 1) * 2f));
}
SetUserAgent(_agent.Body, 1000f, 400f);
}
public override void Update(GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen)
{
if (IsActive)
{
for (int i = 0; i < _spiders.Length; i++)
{
_spiders[i].Update(gameTime);
}
}
base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen);
}
public override void Draw(GameTime gameTime)
{
ScreenManager.SpriteBatch.Begin(0, null, null, null, null, null, Camera.View);
_agent.Draw();
for (int i = 0; i < _spiders.Length; i++)
{
_spiders[i].Draw();
}
ScreenManager.SpriteBatch.End();
_border.Draw();
base.Draw(gameTime);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Chief Architect - Sea Surveillance AS.
Specializing in integrated operations and high performance computing solutions.
I’ve been fooling around with computers since the early eighties, I’ve even done work on CP/M and MP/M.
Wrote my first “real” program on a BBC micro model B based on a series in a magazine at that time. It was fun and I got hooked on this thing called programming ...
A few Highlights:
- High performance application server development
- Model Driven Architecture and Code generators
- Real-Time Distributed Solutions
- C, C++, C#, Java, TSQL, PL/SQL, Delphi, ActionScript, Perl, Rexx
- Microsoft SQL Server, Oracle RDBMS, IBM DB2, PostGreSQL
- AMQP, Apache qpid, RabbitMQ, Microsoft Message Queuing, IBM WebSphereMQ, Oracle TuxidoMQ
- Oracle WebLogic, IBM WebSphere
- Corba, COM, DCE, WCF
- AspenTech InfoPlus.21(IP21), OsiSoft PI
More information about what I do for a living can be found at:
harlinn.com or
LinkedIn
You can contact me at
espen@harlinn.no