H
Hvid Hat
class Sprite
{
private Vector2 position;
public Vector2 Position
{
get { return position; }
set { position = value; }
}
...
}
class Vehicle : Sprite
{
public void Update()
{
Position.X += velocity.X; // <--- Cannot modify the return value
}
}
How to fix? And yes, I'm not an experienced C#-programmer
{
private Vector2 position;
public Vector2 Position
{
get { return position; }
set { position = value; }
}
...
}
class Vehicle : Sprite
{
public void Update()
{
Position.X += velocity.X; // <--- Cannot modify the return value
}
}
How to fix? And yes, I'm not an experienced C#-programmer