tanchiki
annotate body.py @ 1:78df8ab210fe
added stubs body , game, user
author | Olga Zolotareva <olya_zol@inbox.ru> |
---|---|
date | Sat, 18 Dec 2010 06:14:15 +0300 |
parents | |
children | e6e7b30ecde0 |
rev | line source |
---|---|
olya_zol@1 | 1 class Body(object): |
olya_zol@1 | 2 def __init__(self, position, velocity, next_position, radius): |
olya_zol@1 | 3 self.position = position |
olya_zol@1 | 4 self.velocity = velocity |
olya_zol@1 | 5 self.next_position = next_position |
olya_zol@1 | 6 self.radius = radius |
olya_zol@1 | 7 |
olya_zol@1 | 8 |
olya_zol@1 | 9 class Tank(Body): |
olya_zol@1 | 10 def __init__(self, strength, turret, base_orientation, game, user): |
olya_zol@1 | 11 self.strength = strength |
olya_zol@1 | 12 self.turret = turret |
olya_zol@1 | 13 self.base_orientation = orientation |
olya_zol@1 | 14 self.game = game |
olya_zol@1 | 15 self.user = user |
olya_zol@1 | 16 def rotate_base(angle): |
olya_zol@1 | 17 pass |
olya_zol@1 | 18 |
olya_zol@1 | 19 def rotate_turret(angle): |
olya_zol@1 | 20 pass |
olya_zol@1 | 21 |
olya_zol@1 | 22 def accelerate(speed_delta): |
olya_zol@1 | 23 pass |
olya_zol@1 | 24 |
olya_zol@1 | 25 def fire(): |
olya_zol@1 | 26 pass |
olya_zol@1 | 27 |
olya_zol@1 | 28 def on_tick(other_tanks, bullets): |
olya_zol@1 | 29 pass |
olya_zol@1 | 30 |
olya_zol@1 | 31 def on_spawn(): |
olya_zol@1 | 32 pass |
olya_zol@1 | 33 |
olya_zol@1 | 34 def on_death() : |
olya_zol@1 | 35 pass |
olya_zol@1 | 36 |
olya_zol@1 | 37 def on_hit(bullet): |
olya_zol@1 | 38 pass |
olya_zol@1 | 39 |
olya_zol@1 | 40 def on_collision(tank): |
olya_zol@1 | 41 pass |
olya_zol@1 | 42 |
olya_zol@1 | 43 def on_wall(): |
olya_zol@1 | 44 pass |
olya_zol@1 | 45 |
olya_zol@1 | 46 class Bullet(Body): |
olya_zol@1 | 47 pass |