Hi everyone,
I revived this thread since my problem meets the topic, hope you don't mind ;)
I am trying to pick up Delta right now and have trouble loading Images.
Using your Tutorials and reading a bit through your GhostWars I created following code to test
Code:
class RotatingSprite :Sprite
{
public ScreenSpace screenSpace { get; protected set; }
public RotatingSprite(ScreenSpace screenSpace)
:base("Btn_1",Rectangle.One)
{
this.DrawArea = Rectangle.FromCenter(Vector2D.Half, screenSpace.FromPixelSpace(new Size(70, 70)));
this.screenSpace = screenSpace;
this.StartRotating(45);
}
}
If I use it like this, nothing shows up, if instead I try to load the image as material (ContentLoader.Load<Material>("Btn_1");)
I get a ContentNotFound Exeption.
I tried both ways for importing Content, adding it in the editor and creating a "Content"-Folder in the project directory and using ContentLoader.Use<DiskContentLoader>();
I get the Images displayed correctly in the Editor but still can't load them.
I tried:
-Restarting VS2012
-Rebuilding the project
-Deleting and adding the Images again in the Delta-Editor
Although it shouldn't matter in Delta, but all my images i tried to load are Power of Two, but don't now if this is connected ?_?
PS: While debugging around a bit I found a little error in the Vector2D QuadraticScreenSpace.FromPixelSpace(Vector2D): if your input Vector2D has negative Values the resulting Vector2D will always have a positive Y-Value! I think there is something wrong with the offset used for calculating Y, since i even get a positive value in Y when i insert a Vector2D.Zero!