on 11-09-2012 05:05 PM
I accentidently posted this in General but I think it is better suited here. Moderator, if you wish, please delete my post in General.
So I am creating a RawSpriteTileList like this:
RawSpriteTileList rstl = new RawSpriteTileList(new TextureInfo(new Texture2D("/Application/woodland.png", false), new Vector2i(16, 16)));
int tileSize = 32;
for( int i=0; i < 30; i++) {
for( int y = 0; y < 17; y++ ) {
RawSpriteTile rst = new RawSpriteTile(new TRS(new Bounds2(new Vector2(i * tileSize, y * tileSize), new Vector2((i*tileSize) + 32, (y*tileSize) + 32))), new Vector2i(0, 15), false, false);
rstl.Sprites.Add(rst);
}
}
How does one go about scrolling this. In my game loop I was attempting to do something like this:
for( int i=0; i < rstl.Sprites.Count; i++)
{ rstl.Sprites[i].Quad.T.X += 1; }
But that isn't compiling. This is really basic as I am just trying to figure it out. Any help would be appreciated.
Thanks,
Mike
on 11-09-2012 06:02 PM
Hi:
Why it's not compiling post the error please =).
Cheers,
on 11-09-2012 11:27 PM
So the error that I am getting when trying to compile this is:
Error CS1612: Cannot modify the return value of 'System.Collections.Generic.List<Sce.PlayStation.H
I have tried it other way to where it would compile however the tiles never moved and the X value didn't appear to change.
If anyone has any suguestions to offer I would appreciate it.
Mike
on 12-09-2012 12:02 AM
When you got it to compile, they didn't appear to move because you didn't re-add the tiles afterwards. You need to clear before you re-add, or else you'll get a smearing effect I believe (and the list will just keep growing).
PSM Developer Registration (for free) on PSM DevPortal is required to post on the forum.
Please sign out then sign in again to the forum and PSM DevPortal after you have completed the registration.
フォーラムへ投稿をするにはPSM DevPortalへの登録(無料)が必要です。
登録後はフォーラムと
PSM DevPortalを一度ログアウトし、再度ログインしてください。


Website ©2013 Sony Computer Entertainment Europe
All content, game titles, trade names and/or trade dress, trademarks, artwork and associated imagery are trademarks and/or copyright material of their respective owners. All rights reserved. [more info]
%%http://community.eu.playstation.com/t5/Announcements/Beta-Trial-Information/td-p/11386362
best_shooter.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_driver.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_performer.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_footballer.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_fighter.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_creator.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_action_player.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
dev2.png%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/Producer-and-Developer-Ranks/td-p/18407352
trophy.gif%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/The-Community-Awards-FAQ/td-p/18407096
PSlogoSM.png%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/Online-Support-Coordinator-rank/td-p/18414870