Advertisement
Guest User

Untitled

a guest
May 25th, 2015
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.12 KB | None | 0 0
  1. Case "goal"
  2. ; Update progress bar
  3. Game_Stage_UpdateProgressBar("Loading object n."+j+": Goal Ring", Float#(j)/Float#(xmlNodeChildCount(RootChildNode)))
  4.  
  5. positionX# = 0
  6. positionY# = 0
  7. positionZ# = 0
  8.  
  9. rotationX# = 0
  10. rotationY# = 0
  11. rotationZ# = 0
  12.  
  13.  
  14.  
  15. normalDest$ = xmlNodeAttributeValueGet(SceneChildNode, "dest")
  16. ; Setup position, rotation and scale.
  17. ScenePosition = xmlNodeFind("position", SceneChildNode)
  18. If (ScenePosition<>0) Then
  19. positionX# = Float(xmlNodeAttributeValueGet(ScenePosition, "x"))
  20. positionY# = Float(xmlNodeAttributeValueGet(ScenePosition, "y"))
  21. positionZ# = Float(xmlNodeAttributeValueGet(ScenePosition, "z"))
  22. End If
  23.  
  24. SceneRotation = xmlNodeFind("rotation", SceneChildNode)
  25. If (SceneRotation<>0) Then
  26. rotationX# = Float(xmlNodeAttributeValueGet(SceneRotation, "pitch"))
  27. rotationY# = Float(xmlNodeAttributeValueGet(SceneRotation, "yaw"))
  28. rotationZ# = Float(xmlNodeAttributeValueGet(SceneRotation, "roll"))
  29. End If
  30.  
  31. obj.tObject = Object_Goal_Create(positionX#, positionY#, positionZ#,rotationX#,rotationy#,rotationZ#,"")
  32.  
  33. Case "goalinvis"
  34. ; Update progress bar
  35. Game_Stage_UpdateProgressBar("Loading object n."+j+": Stage Gate", Float#(j)/Float#(xmlNodeChildCount(RootChildNode)))
  36.  
  37.  
  38.  
  39. positionX# = 0
  40. positionY# = 0
  41. positionZ# = 0
  42.  
  43. rotationX# = 0
  44. rotationY# = 0
  45. rotationZ# = 0
  46.  
  47. scaleX# = 5
  48. scaleY# = 5
  49. scaleZ# = 5
  50.  
  51. testDest$ = xmlNodeAttributeValueGet(SceneChildNode, "dest")
  52. ; Setup position, rotation and scale.
  53. ScenePosition = xmlNodeFind("position", SceneChildNode)
  54. If (ScenePosition<>0) Then
  55. positionX# = Float(xmlNodeAttributeValueGet(ScenePosition, "x"))
  56. positionY# = Float(xmlNodeAttributeValueGet(ScenePosition, "y"))
  57. positionZ# = Float(xmlNodeAttributeValueGet(ScenePosition, "z"))
  58. End If
  59.  
  60. SceneRotation = xmlNodeFind("rotation", SceneChildNode)
  61. If (SceneRotation<>0) Then
  62. rotationX# = Float(xmlNodeAttributeValueGet(SceneRotation, "pitch"))
  63. rotationY# = Float(xmlNodeAttributeValueGet(SceneRotation, "yaw"))
  64. rotationZ# = Float(xmlNodeAttributeValueGet(SceneRotation, "roll"))
  65. End If
  66.  
  67. SceneScale = xmlNodeFind("scale", SceneChildNode)
  68. If (SceneScale<>0) Then
  69. scaleX# = Float(xmlNodeAttributeValueGet(SceneScale, "x"))
  70. scaleY# = Float(xmlNodeAttributeValueGet(SceneScale, "y"))
  71. scaleZ# = Float(xmlNodeAttributeValueGet(SceneScale, "z"))
  72. End If
  73.  
  74. Object_GoalInvis_Create.tObject(x#, y#, z#,rx#=0, ry#=0, rz#=0,dest$,sx#,sy#,sz#,"")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement