Thanks for the answer 
My idea is to create a Laser Machine that displays a laser (using the raycast function) and reflect on each obstacle.
My question is: What kind of objects can I use to make the laser beam? Drawing lines …?
Lines, rectangles, image rectangles… all will work, depending on the effect you’re looking for.
Hi.
What is the difference between properties and methods in corona?
For instance: https://docs.coronalabs.com/api/type/Body/index.html
thanks
Is this related to the initial question? It’s not good to add new questions to a single-topic forum post… having said that:
local bob -- a local variable \_G.bill = 10 -- a global variable billy = 9 -- a global variable local function ted() -- local function end local function sue() -- global function end function susan() -- global function end ------------------------------------------------------------ ------------------------------------------------------------ local obj = {} -- A Table obj.myName = "Bud" -- A user-defined field/property on a table function obj.doit() -- A user-defined function on a table. print("HI") end obj.doit() -- Calling the function function obj.doit2( self ) -- Another user-defined function (with explicit self as first argument) on a table. print("Hi, my name is", self.myName ) end obj.doit2() -- doit2( obj ) called as a function obj:doit2() -- doit2() called as a method function obj:doit3( ) -- A user-defined method (implied self as first argument) on a table. print("Hi, my name is", self.myName ) end obj.doit3() -- doit3( obj ) called as a function obj:doit3() -- doit3() called as a method ------------------------------------------------------------ ------------------------------------------------------------ local circ = display.newCirlce(0,0,100) -- A display object circ.myName = "Bud" -- A user defined field/property on a display object. function circ.doit() -- A user defined function on a display object. print("HI") end circ.doit() -- Calling the function function circ.doit2( self ) -- Another user defined function (with explicit self as first argument) on a display object. print("Hi, my name is", self.myName ) end circ.doit2() -- doit2( circ ) called as a function circ:doit2() -- doit2() called as a method function circ:doit3( ) -- A user defined method (implied self as first argument) on a display object. print("Hi, my name is", self.myName ) end circ.doit3() -- doit3( circ ) called as a function circ:doit3() -- doit3() called as a method
Hi gyus,
When I switch (using composer) from scene1 to scene2, my display objects inserted into scene1 are visible in scene2 … ??
What i’m doing wrong? I’m using scene:insert(…) to add my display objects
Thanks
@luisxpto32,
Not seeing what that has to do with the original question.