Source:
local Animal = {
voice = "", name = ""
}
print("What's animal we should to program?")
answer = io.read()
print("What's noices that your animal says?")
answer_2 = io.read()
Animal.voice = answer_2
Animal.name = answer
print("Object created, do you want to use 'Voice!' command?")
command_check = io.read()
if command_check == "yes" then
print(Animal.voice)
end
print("Your animal: name:", Animal.name, "voice:", Animal.voice)
In questa pagina del sito puoi guardare il video online Lua: Simple OOP example della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Quantum 01 settembre 2022, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 77 volte e gli è piaciuto 0 spettatori. Buona visione!