Skip to content

Commit

Permalink
Update Generator - 2d Flasks or bottles - code example.monkey
Browse files Browse the repository at this point in the history
  • Loading branch information
Pakz001 committed Oct 23, 2017
1 parent 5ec6f7a commit d5c61c2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Generator - 2d Flasks or bottles - code example.monkey
Expand Up @@ -54,6 +54,7 @@ Class tile
Local c:Int
Local g:Int
Local b:Int
Local lightpointx:Int=Rnd(5,width-5)
For Local y:Int=0 Until height
For Local x:Int=0 Until width
If map[x][y] = 0 Then Continue
Expand All @@ -69,9 +70,9 @@ Class tile
g = ag-((ag/height)*y)
b = ab-((ab/height)*y)

c=-distance(width/2,0,x,0)+c
g=-distance(width/2,0,x,0)+g
b=-distance(width/2,0,x,0)+b
c=-distance(lightpointx,0,x,0)+c
g=-distance(lightpointx,0,x,0)+g
b=-distance(lightpointx,0,x,0)+b
If c>255 Then c=255
If g>255 Then g=255
If b>255 Then b=255
Expand Down

0 comments on commit d5c61c2

Please sign in to comment.