/// <summary> /// Perform any initialization necessary before running the game. This /// includes both (preliminary) model and view creation. /// </summary> protected override void Initialize() { canvas.Initialize(this); canvas.Scale = scale * Vector2.One; world = new World(new Vector2(0, GRAVITY)); world.ContactManager.BeginContact += ContactStarted; world.ContactManager.EndContact += ContactEnded; canvas.LoadContent(content); ribbon_segment = canvas.GetTexture("ribbon_segment"); /*List<Vector2> path = new List<Vector2>(); * path.Add(new Vector2(100, 100)); * path.Add(new Vector2(500, 100));*/ //ribbon = new RibbonObject(world, ribbon_segment, new Vector2(100,100), ribbon_segment.Width, path); seamstress = new SeamstressObject(); seamstressController = new SeamstressForceController(seamstress); world.AddController(seamstressController); /*ribbonController = new RibbonForceController(ribbon); * world.AddController(ribbonController);*/ objects = new List <Object>(); //objects.Add(ribbon); objects.Add(seamstress); base.Initialize(); }
/// <summary> /// Create a new controller for the given avatar /// </summary> /// <param name="s">The avatar</param> public SeamstressForceController(SeamstressObject s) : base(ControllerType.AbstractForceController) { seamstress = s; }
/// <summary> /// Creates a new input controller. /// </summary> public MainInputController(SeamstressObject seamstress, CoolRibbonObject ribbon) { this.seamstress = seamstress; this.ribbon = ribbon; }
private bool sIsJumping; // seamstress is jumping? #endregion Fields #region Constructors /// <summary> /// Creates a new input controller. /// </summary> public MainInputController(SeamstressObject seamstress, CoolRibbonObject ribbon) { this.seamstress = seamstress; this.ribbon = ribbon; }
/// <summary> /// Perform any initialization necessary before running the game. This /// includes both (preliminary) model and view creation. /// </summary> protected override void Initialize() { canvas.Initialize(this); canvas.Scale = scale * Vector2.One; world = new World(new Vector2(0,GRAVITY)); world.ContactManager.BeginContact += ContactStarted; world.ContactManager.EndContact += ContactEnded; canvas.LoadContent(content); ribbon_segment = canvas.GetTexture("ribbon_segment"); /*List<Vector2> path = new List<Vector2>(); path.Add(new Vector2(100, 100)); path.Add(new Vector2(500, 100));*/ //ribbon = new RibbonObject(world, ribbon_segment, new Vector2(100,100), ribbon_segment.Width, path); seamstress = new SeamstressObject(); seamstressController = new SeamstressForceController(seamstress); world.AddController(seamstressController); /*ribbonController = new RibbonForceController(ribbon); world.AddController(ribbonController);*/ objects = new List<Object>(); //objects.Add(ribbon); objects.Add(seamstress); base.Initialize(); }