mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Merge remote-tracking branch 'docs/typo-fix/doc-fix' into develop
This commit is contained in:
commit
79db8b3858
|
@ -83,7 +83,7 @@ Note that here, because the C++ class is default-constructible, it will automati
|
||||||
-- note the ":" that is there: this is mandatory for member function calls
|
-- note the ":" that is there: this is mandatory for member function calls
|
||||||
-- ":" means "pass self" in Lua
|
-- ":" means "pass self" in Lua
|
||||||
local success = fwoosh:shoot()
|
local success = fwoosh:shoot()
|
||||||
local is_dead = fwoosh:hit(20)
|
local is_dead = fwoosh:hurt(20)
|
||||||
-- check if it works
|
-- check if it works
|
||||||
print(is_dead) -- the ship is not dead at this point
|
print(is_dead) -- the ship is not dead at this point
|
||||||
print(fwoosh.life .. "life left") -- 80 life left
|
print(fwoosh.life .. "life left") -- 80 life left
|
||||||
|
|
Loading…
Reference in New Issue
Block a user