I2DInput
Introduction
Code Example - Implementing Movement
using FlatRedBall.Input;
namespace ProjectName.Entities
{
public partial class Character
{
public I2DInput MovementInput
{
get;
set;
}
private void CustomInitialize()
{
}
private void CustomActivity()
{
// This would normally be a FRB variable on the entity, but added
// here to keep the example simpler
float movementSpeed = 100;
this.XVelocity = MovementInput.X * movementSpeed;
this.YVelocity = MovementInput.Y * movementSpeed;
}
private void CustomDestroy()
{
}
private static void CustomLoadStaticContent(string contentManagerName)
{
}
}
}Common Usage
Magnitude
Or Extension Method
Or Code Example
Last updated
Was this helpful?