Advertisement
ldevillez

Untitled

Nov 19th, 2016
2,506
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Oz 1.87 KB | None | 0 0
  1. %====INFORMATION====%
  2. % LFSAB1402 Projet 2016
  3. % Nomas : NOMA1-NOMA2
  4. % Noms : (Nom1,Prenom1)-(Nom2,Prenom2)
  5. %====MODULELINK====%
  6. declare
  7. [Projet]={Module.link ["/home/louis/Projet-Info/ProjetOz2016/Projet2016.ozf"]}
  8.  
  9. %====CODE====%
  10. local
  11.    MaxTime = 15 % nombre de frame à l'animation
  12.    MyFunction
  13.    Map
  14.    CheckMap
  15.    Extensions = opt(withExtendedFormula:false
  16.             withIfThenElse:false
  17.             withComparison:false
  18.             withTimeWindow:false
  19.             withCheckMapEasy:false
  20.             withCheckMapComplete:false
  21.            )
  22.    Building = primitive(kind:building)
  23.    Water = primitive(kind:water)
  24.    Road = primitive(kind:road)
  25.    Pokemon = primitive(kind: pokemon)
  26.    Pokestop = primitive(kind: pokestop)
  27.    Arena = primitive(kind: arena)
  28.    X =scale(rx: 20.0 ry: 20.0 1:translate(dx: 200.0 dy: 200.0 1:Water))
  29.    Y =scale(rx: 12.0 ry: 24.0 1:translate(dx: 100.0 dy: 100.0 1:rotate(angle: 1.047 1:Building)))
  30.    Z =scale(rx: 120.0 ry: 0.0 rotate(angle: 0.7854 1:Road))
  31.    A = translate(dx:200.0 dy:200.0 1:translate(dx: cos(time) dy:sin(time) 1:Pokemon))
  32.    B = translate(dx:100.0 dy:200.0 1:translate(dx: tan(time) dy:sin(time) 1:Pokestop))
  33.    C = translate(dx:100.0 dy:100.0 1:translate(dx: cos(time) dy:sin(time) 1:Arena))
  34. in
  35.    Map = map(ru:X|Y|Z|nil pu:A|B|C|nil) %% TODO change the map here
  36.  
  37.    fun{MyFunction Map}
  38.       local FUN in
  39.      fun{FUN Time}
  40.         local Pos1 Pos2 Pos3 Pos4 X Y in
  41.            X = 200.0 + 10.0*Time
  42.            Y = 400.0 + 10.0*Time
  43.            Pos1 = pt(x:X y:200.0)
  44.            Pos2 = pt(x:X y:400.0)
  45.            Pos3 = pt(x:Y y:200.0)
  46.            Pos4 = pt(x:Y y:400.0)
  47.            realitem(kind:water p1:Pos1 p2:Pos2 p3:Pos3 p4:Pos4)
  48.         end
  49.      end
  50.      
  51.      FUN|nil
  52.       end
  53.      
  54.    end
  55.  
  56.    fun{CheckMap Map}
  57.       false %% TODO complete here the function for the checking of the maps
  58.    end
  59.    
  60.    {Projet.run MyFunction Map MaxTime Extensions CheckMap}
  61. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement