LuaDrawing.wiki
changeset 1392 b2b22eeaf5c1
parent 1389 b57ad8939f32
child 1393 0b22af910c31
equal deleted inserted replaced
1391:86bada04da8f 1392:b2b22eeaf5c1
    32 
    32 
    33 onPreviewInit = onGameInit
    33 onPreviewInit = onGameInit
    34 </code>
    34 </code>
    35 This one fills the map with solid land, and draws 4 circular erased points in it.
    35 This one fills the map with solid land, and draws 4 circular erased points in it.
    36 
    36 
    37 The final line `onPreviewInit = onGameInit` makes sure the map preview works properly. This is the simplest way to create the preview and is a perfectly reasonable approach in this case, because the code is very simple here. The reason why `onPreviewInit` is provided is because it allows you to avoid unneccessary overhead in more complex Lua scripts.
    37 The final line `onPreviewInit = onGameInit` makes sure the map preview works properly. This is the simplest way to create the preview and is a perfectly reasonable approach in this case, because the code is very simple here.
       
    38 
       
    39 Note: The reason why `onPreviewInit` is provided in the official Lua API is because it allows you to avoid unneccessary overhead in more complex Lua scripts.
    38 
    40 
    39 <a href="http://m8y.org/hw/draw2.jpeg">Screenshot here!</a>
    41 <a href="http://m8y.org/hw/draw2.jpeg">Screenshot here!</a>
    40 
    42 
    41 == Concentric circles and more ==
    43 == Concentric circles and more ==
    42 <code lang="lua">
    44 <code lang="lua">