Frogleg
posted
831 posts
since
Aug 13, 2010
from
Australia
|
|
Re: Update Move player with Move Class
|
|
|
|
|
|
|
|
|
|
in game.cs ypu had
public Point playerMove(Mover.Direction direction,Rectangle boundaries,Point location) { player.Move(direction,boundaries,location);//Moves the player //Console.WriteLine(location); return location;// you returned original location }
should be
public Point playerMove(Mover.Direction direction,Rectangle boundaries,Point location) { Point p; p = player.Move(direction,boundaries,location);//Moves the player //Console.WriteLine(location); return p; }
|
|
|
|
|
|
albert albert
posted
151 posts
since
Dec 02, 2008
from
|
|
Re: Update Move player with Move Class
|
|
|
|
|
|
|
|
|
|
|
THX!!
stupid of me that I forgot to past the Point variable to the Move method.
This works ofcourse. To past directly the parameter location to the Move method;
[code] public Point MovePlayer(Mover.Direction direction,Rectangle boundaries,Point location) { //boundaries = new Rectangle(0, 0, 600, 600); //Point p; location = player.Move(direction,boundaries,location);//Moves the player Console.WriteLine(location); return location; } [/code]
|
|
|
|
|
|