In this video in my series Learn Programming and Game Development with Lua I introduce functions in Lua.
First I demonstrate a simple function that returns a single value.
Then I demonstrate returning mulitple values from a function.
#programming #gamedevelopment #gamedev #lua #love2d
Link to the code from this tutorial on GitHub:
https://github.com/CharlesKirkSD/Lear...
00:00 - Start
00:06 - Introduction
00:44 - Writing Our First Function in Lua
02:41 - Function Structure: Discussion of the structure of a function.
03:55 - Returning Multiple Values from a Function: Introduction - In this second example we look at returning multiple values from a function
04:15 - Returning Multiple Values from a Function: Color Components - Introduction to color representation in computer graphics.
04:23 - Returning Multiple Values from a Function: Adding Colors - Writing a function that adds colors
05:12 - Returning Multiple Values from a Function: Outputting the values returned from the function - Demonstration of using the print function to output the return values from a function that returns multiple values.
05:52 - Returning Multiple Values from a Function: Processing the values returned - Demonstration of the handling of return values from a function that returns multiple values.
07:13 - Returning Multiple Values from a Function: Demonstration of what happens when the last parameter returned, from a function that returns multiple values, is not assigned to a variable.
07:35 - Returning Multiple Values from a Function : Assigning too many variables for the number of values returned
Auf dieser Seite können Sie das Online-Video Functions In Lua: Learn Programming And Game Development With Lua mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Charles Studio Tech 08 Januar 2025 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 373 Mal angesehen und es wurde von 14 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!