Sheepolution / how-to-love

LÖVE tutorials
MIT License
97 stars 25 forks source link

Chapter 11 has some issue #33

Closed kwccoin closed 1 month ago

kwccoin commented 2 months ago

The Circle is not consistent with the Rect. My working one use

For circle

  1. the request of Shape may be required like the Rect one, but if so like the Rect one one should not have .lua and I keep the Shape local
  2. as in the text use Global Circle
  3. Add a return Circle in the last line

For Rect

  1. I drop the local Rect so make the Rect Global
  2. I do not change others such as require local Shape except remove .lua there
  3. There is a return Rect statement

Just to my taste, I also handle the default case and use a GLOBALVAR for the 100 speed

Sheepolution commented 2 months ago

It is implied that you also need to change the Circle class to use a local variable.