示例#1
0
文件: Crafty.py 项目: needstuff/Game
 def __init__(self, vertices, pos=Vec2D(0,0),velocity=Vec2D(0,0), angularVelocity=0,orientation=0,  health=100, inverseMass=0, inertia=1, muS=0, muK=0,color='black'):
     RigidBody2D.__init__(self, vertices=vertices, pos=pos, velocity=velocity,angularVelocity=angularVelocity, orientation=orientation, inverseMass=inverseMass, inertia=inertia, 
                          muS=muS, muK=muK)
     self.health=health
     self.color= color
示例#2
0
文件: Crafty.py 项目: needstuff/Game
 def update(self, deltaTime):
     self.angularVelocity*=.97
     self.velocity*=.98
     RigidBody2D.update(self, deltaTime)