root/lang/d/pythond/physical_object_action.d @ 232

Revision 232, 433 bytes (checked in by itkz, 6 years ago)

commit new D test program uses embedded Python is switched by PCL

Line 
1
2
3private import physical_object;
4
5
6class PhysicalObjectAction : Object
7{
8        this()
9        {
10        }
11
12        ~this()
13        {
14        }
15
16        void init(PhysicalObject physicalObject)
17        {
18                physicalObject_ = physicalObject;
19        }
20
21
22        void act()
23        {
24                for(int i = 0; i < 5; i++) {
25                        physicalObject_.x++;
26                        physicalObject_.y++;
27                        physicalObject_.resume();
28                }
29                physicalObject_.sleep(10);
30        }
31
32
33private:
34        PhysicalObject physicalObject_;
35}
36
Note: See TracBrowser for help on using the browser.