Advertisement
Guest User

Untitled

a guest
May 9th, 2015
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.75 KB | None | 0 0
  1. <?xml version="1.0" encoding="iso-8859-1" ?>
  2. <ZApplication Name="App" Caption="ZGameEditor application" ClearColor="0.502 0.502 0.7529 1" FrameRateStyle="2" FixedFrameRate="60" Camera="ProjectionFrontal" MouseVisible="255" NoSound="1">
  3. <OnLoaded>
  4. <Group Comment="Generate compasses">
  5. <Children>
  6. <Repeat Name="SeedAlongY" Count="12">
  7. <OnIteration>
  8. <ZExpression>
  9. <Expression>
  10. <![CDATA[Follower.Position.Y =
  11. (0-1)+
  12. (2f/(SeedAlongY.Count-1))*SeedAlongY.Iteration
  13. ;]]>
  14. </Expression>
  15. </ZExpression>
  16. <Repeat Name="SeedAlongX" Count="16">
  17. <OnIteration>
  18. <ZExpression>
  19. <Expression>
  20. <![CDATA[Follower.Position.X =
  21. (0-(1f*App.ViewportWidth/App.ViewportHeight))+
  22. ((2f*App.ViewportWidth/App.ViewportHeight)/(SeedAlongX.Count-1))*SeedAlongX.Iteration
  23. ;]]>
  24. </Expression>
  25. </ZExpression>
  26. <SpawnModel Model="Follower"/>
  27. </OnIteration>
  28. </Repeat>
  29. </OnIteration>
  30. </Repeat>
  31. </Children>
  32. </Group>
  33. </OnLoaded>
  34. <Content>
  35. <Material Name="mat_Dual" Blend="1">
  36. <Textures>
  37. <MaterialTexture Texture="bmp_WhiteTop" TextureWrapMode="2" TexCoords="1"/>
  38. </Textures>
  39. </Material>
  40. <Bitmap Name="bmp_WhiteTop" Width="0" Height="0" Filter="1">
  41. <Producers>
  42. <BitmapRect Comment="Body" Color="1 0 0.502 1" Size="-0.2 -0.75 0.2 0.75"/>
  43. <BitmapRect Comment="Head" Color="1 1 1 1" Size="-0.2 0.75 0.2 0.5"/>
  44. </Producers>
  45. </Bitmap>
  46. <Camera Name="ProjectionFrontal" Comment="No rotation, for interface etc" Kind="1" Position="0 0 10"/>
  47. <Model Name="Follower" Position="1.9488 1 0" Scale="0.125 0.125 1">
  48. <OnUpdate>
  49. <ZExpression Comment="Rotate it">
  50. <Expression>
  51. <![CDATA[CurrentModel.Rotation.Z =0.25+
  52. atan2
  53. (
  54. (CurrentModel.Position.Y-App.MousePosition.Y),
  55. (CurrentModel.Position.X-App.MousePosition.X*(1f*App.ViewportWidth/App.ViewportHeight))
  56. )/PI/2;]]>
  57. </Expression>
  58. </ZExpression>
  59. <ZExpression Comment="Adjust color">
  60. <Expression>
  61. <![CDATA[float VisibilityX, VisibilityY;
  62.  
  63. VisibilityX = 1-Abs(App.MousePosition.X*(1f*App.ViewportWidth/App.ViewportHeight)-CurrentModel.Position.X)*0.9;
  64. VisibilityY = 1-Abs(App.MousePosition.Y-CurrentModel.Position.Y)*0.9;
  65.  
  66. PointerVisibility.Color.A = clamp(VisibilityX + VisibilityY,0,1);]]>
  67. </Expression>
  68. </ZExpression>
  69. </OnUpdate>
  70. <OnRender>
  71. <UseMaterial Material="mat_Dual"/>
  72. <RenderSetColor Name="PointerVisibility" Color="1 1 1 1"/>
  73. <RenderSprite/>
  74. </OnRender>
  75. </Model>
  76. </Content>
  77. </ZApplication>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement