LuaAPI.wiki
changeset 402 1e7586c110f6
parent 401 aee281298267
child 403 7642806ce7b9
equal deleted inserted replaced
401:aee281298267 402:1e7586c110f6
   251 <blockquote>This function is called when a hedgehog is hidden(removed from the map).</blockquote>
   251 <blockquote>This function is called when a hedgehog is hidden(removed from the map).</blockquote>
   252 
   252 
   253 === <tt>onHogRestore()</tt> (0.9.16) ===
   253 === <tt>onHogRestore()</tt> (0.9.16) ===
   254 
   254 
   255 <blockquote>This function is called when a hedgehog is restored (unhidden).<blockquote>
   255 <blockquote>This function is called when a hedgehog is restored (unhidden).<blockquote>
       
   256 
       
   257 === <tt>onGirderPlacement(frameIdx, centerX, centerY)</tt> (0.9.21) ===
       
   258 This function is called when a girder has been placed.
       
   259 
       
   260 `frameIdx` is an integer and declares the length and orientation of the girder:
       
   261 || `frameIdx` || length || orientation ||
       
   262 || 0 || short || horizontal ||
       
   263 || 1 || short || decreasing right ||
       
   264 || 2 || short || vertical ||
       
   265 || 3 || short || increasing right ||
       
   266 || 4 || long || horizontal ||
       
   267 || 5 || long || decreasing right ||
       
   268 || 6 || long || vertical ||
       
   269 || 7 || long || increasing right ||
       
   270 
       
   271 `centerX` and `centerY` are the coordinates of the girder’s center.
       
   272 
       
   273 === <tt>onRubberPlacement(frameIdx, centerX, centerY)</tt> (0.9.21) ===
       
   274 This function is called when a rubber has been placed.
       
   275 
       
   276 `frameIdx` is an integer which stands for the orientation of the rubber.
       
   277 
       
   278 || `frameIdx` || orientation ||
       
   279 || 0 || horizontal ||
       
   280 || 1 || decreasing right ||
       
   281 || 2 || vertical ||
       
   282 || 3 || increasing right ||
       
   283 
       
   284 `centerX` and `centerY` are the coordinates of the rubber’s center.
   256 
   285 
   257 == Functions for creating gears ==
   286 == Functions for creating gears ==
   258 
   287 
   259 === <tt>!AddGear(x, y, gearType, state, dx, dy, timer)</tt> ===
   288 === <tt>!AddGear(x, y, gearType, state, dx, dy, timer)</tt> ===
   260 
   289