HaxeFlixel / flixel-docs

Documentation for HaxeFlixel
72 stars 135 forks source link

Change the variables seePlayer and playerPosition #235

Closed manuelfs12 closed 4 years ago

manuelfs12 commented 4 years ago

During the tutorial, both of these variables are declared with just the var keyword, later on, when we create the function checkEnemyVision() inside the PlayerState class, we get an error because these variables are private in the Enemy class. I changed both variables to be public to match the demo files.

Gama11 commented 4 years ago

Thanks for pointing this out! I fixed this a bit differently, since it's generally good practice to only make things public once it becomes necessary, so the learning effect is probably better like this.

manuelfs12 commented 4 years ago

Thanks for taking a look at it.