We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I have a variable, player.accel(0.2). I want to be able to access the variable, bullet.accel(player.accel()+70) but as you know that doesn't work. Got tips for the code?
Answers
In
player.accel(0.2);
, player is a variable, while accel() is a method.You're already accessing method accel(), but to execute an action. :-B
Take a look at the access operator
.
: https://Processing.org/reference/dot.htmlNo I don't know.
If I assume that the acceleration value is being stored as a float and the
accel()
method is used to get its value andaccel(float)
is used to set its value then there is nothing wrong with the statementbullet.accel(player.accel()+70)
To help further we need to see source code for the two
accel
methods code or the class code that contains this method.