Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8947


Ignore:
Timestamp:
Nov 23, 2011, 3:55:17 PM (13 years ago)
Author:
fmauro
Message:

Improved readability of lua code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/environment3/data/levels/includes/asteroidField.lua

    r8946 r8947  
    1818                print(pX) print(",")
    1919                print(pY) print(",")
    20                 print(pZ) print("\"")
     20                print(pZ) print("\" ")
    2121               
    22                 print("scale = \"") print(size) print("\"")
     22                print("scale = \"") print(size) print("\" ")
    2323               
    24                 print("collisionType = static linearDamping = 0.8 angularDamping = 1 collisiondamage = 1000 enablecollisiondamage = true>")
    25                 print("<attached> <Model mass=\"") print(size * 10) print("\" mesh=\"ast") print(math.mod(i,6) + 1) print(".mesh\" /> </attached>")
    26                 print("<attached> <ForceField position=\"0,0,0\" mode=\"newtonianGravity\" diameter=\"") print(size * 2.7) print("\" massDiameter=\"") print(size * 2) print("\" mass=\"") print(size * 1000) print("\" /> </attached>")
    27                 print("<collisionShapes> <SphereCollisionShape radius=\"") print(size*2.5) print("\" /> </collisionShapes>")
     24                print("collisionType = static linearDamping = 0.8 angularDamping = 1 ")
     25                print("collisiondamage = 1000 enablecollisiondamage = true>")
     26               
     27                print("<attached>")
     28                        print("<Model mass=\"") print(size * 10) print("\" ")
     29                        print("mesh=\"ast") print(math.mod(i,6) + 1) print(".mesh\" />")
     30                print("</attached>")
     31               
     32                print("<collisionShapes> ")
     33                        print("<SphereCollisionShape radius=\"")
     34                        print(size * 2.5) print("\" />")
     35                print("</collisionShapes>")
     36               
    2837                print("</StaticEntity>")
    2938        end
     
    4554        segmentCount = count / segments
    4655       
    47         print("<StaticEntity collisionType=static yaw=")
    48         print(yaw)
    49         print(" pitch=")
    50         print(pitch)
     56        print("<StaticEntity collisionType=static yaw=") print(yaw)
     57        print(" pitch=") print(pitch)
     58       
    5159        print(" position = \"")
    5260                print(centerX) print(",")
     
    5462                print(centerZ) print("\"")
    5563        print(">")
     64       
    5665        print("<attached>")
    5766       
Note: See TracChangeset for help on using the changeset viewer.