]> git.llucax.com Git - z.facultad/75.68/celdas.git/blob - trunk/src/breve/robot/Demo-2wheels2-5.tz
(no commit message)
[z.facultad/75.68/celdas.git] / trunk / src / breve / robot / Demo-2wheels2-5.tz
1
2 @use Celdas-2-5.
3 \r
4 @define CELDAS_MAX_TURN_VELOCITY 2.\r
5
6 Controller DemoController.
7
8 CeldasControl : DemoController {
9         + variables:
10                 vehicle (object).
11                 n (int).
12
13         + to init: \r
14                 obs(object).\r
15                 \r
16                 obs = new CeldasObstacle .
17                 obs init at-location (0,1,10)with-size (20,3,1).\r
18                 obs set-direction at (0,0,1) .\r
19                 obs = new CeldasObstacle. \r
20                 obs init at-location (-25,1,0) with-size (20,3,1).\r
21                 obs set-direction at (0,0,1).\r
22                 obs = new CeldasObstacle.\r
23                 obs init at-location (-10,1,-10) with-size (1,3,20).\r
24                 obs set-direction at (1,0,0).\r
25                 
26                 obs = new CeldasObstacle.\r
27                 obs init at-location (-10,1,10)  with-size (1,3,20).\r
28                 obs set-direction at (1,0,0).\r
29
30                 vehicle = new CeldasVehicle.
31                 self watch item vehicle.
32
33                 vehicle move to (-20, 0.8, -3).
34
35                 vehicle set-global-velocity to 15.0.
36 }