I am creating a VECTOR
object like so, but I am initializing it in the constructor:
public VECTOR position { get; private set; }
I am doing this operation:
position.x += 2;
VECTOR
has a variable x defined as:
public double x { get; set; }
I get the error when I do the +=2
operation that says:
Cannot modify the return value of 'Projectile.position' because it is not a variable
I want to be able to modify the position vector in the current class, and I want it to be accessible but not modifiable in other classes.