togooreo.blogg.se

Gideros draw shape bluebilby
Gideros draw shape bluebilby











gideros draw shape bluebilby

MyText:setText (name ) -Update local xIni =. What is bugging me is that i can add the child but can't remove it. "bad argument #1 to 'removeChild' (Sprite expected, got nil)" x, yFim )Īs :endPath ( ) if floorcnt >= 1 thenīut, for some reason i keep getting this error: x local yIni, yFim = 191, 220 -local width = xFim - xIni -local height = yFim - yIni Īs :setFillStyle (Shape.SOLID, 00000000, 0.5 )Īs :moveTo (. MyText:setText (name ) print (floorcnt ) print (i ) -Update local xIni =.

#Gideros draw shape bluebilby code

Local xFim = Īs:lineTo(, yIni)Īs:lineTo(, yFim)ītw, how can i post my code like you do? Mine is so ugly and unorganized. I tried that and this happens: "attempt to index global 'gest' (a nil value)" You mean placing that code inside the callback function for the Line? I'm sorry for the long post, i'm new to Gideros and i'm currently having a lot of problems to learn it. So my question is, how can i access those values from another class and create shape using them? Also, would it be possible to limit the number of shapes on screen? Like, you can only have one at a time and if you draw another one the last one vanishes. The right thing would be to create the shape inside the game class, right? The Gestures class i'm using is the one found at with some modifications that follows:Īs:setFillStyle(Shape.SOLID, 00000000, 0.5)Īs you can see, i couldn't find a better way so i created the shape inside the Gestures class. In the Gestures class the values i need are the first and last points from the drawing made by the user that are stored in the self.points table. Gest:addGesture("Circle", circle, callback) Local newY = y*s(angle*step)+x*math.sin(angle*step) Local newX = x*s(angle*step)-y*math.sin(angle*step) Local myText = TextField.new(font, "Result: ") Local font = TTFont.new("Fontes/tahoma.ttf", 20) Here is my code so far (this is written at the init function on the game class):ĪreaGestures:setFillStyle(Shape.SOLID, 0xC0C0C0, 0.5)ĪreaGestures:lineTo(application:getContentWidth(), 190)ĪreaGestures:lineTo(application:getContentWidth(), 220)

gideros draw shape bluebilby

The idea is: I have this game class and by using some values given by another class (Gestures) i wanted to create a shape at my game when the user draws a line. I'm trying to create a shape at class X using a gestures module. Ok, i'll do my best to explain my problem, i'd really apreciate any help!













Gideros draw shape bluebilby