Exemple #1
0
	def __init__(self, rectPos, bodyPos, orientation, friendlyFire, seconds, identifier, collisionType):
		pygame.sprite.Sprite.__init__(self)
		Physical.__init__(self, bodyPos, orientation, velocity=70, 
								mass=10, elasticity=0.9, shape={"circle": 10}, 
								maxVel=200, collisionType=collisionType)
		self.identifier = identifier
		imgPath = os.path.dirname(os.path.dirname( os.path.realpath( __file__ ) ) ) + "/images/arrow.png"
		self.image = pygame.image.load(imgPath)
		self.rect = self.image.get_rect()	
		self.rect.center = rectPos
		self.lastPos = bodyPos
		self.distTraveled = 0
		self.friendlyFire = friendlyFire
		self.seconds = seconds
		#self.rotate(orientation)
		self.applyImpulse()
Exemple #2
0
	def __init__(self, recPos, worldPos, resolution, collisionType):
		pygame.sprite.Sprite.__init__(self)
		Physical.__init__(self, worldPos, orientation=0, velocity=50, mass=10,
							elasticity=0.65, shape={"circle": 20}, maxVel=200, 
							angularVel=0.087, collisionType = collisionType)

		imgPath = os.path.dirname(os.path.dirname( os.path.realpath( __file__ ) ) ) + "/images/ship.gif"
		self.origImg = pygame.image.load(imgPath)
		self.image = pygame.image.load(imgPath)
		self.rect = self.image.get_rect()
		self.rect.center = recPos
		self.resolution = resolution
		self.direction= Vec2d(0,0) 
		self.observers = []
		self.coolDowns = [False]
		self.alive = True
		self.hp = 100
Exemple #3
0
 def __init__(self, rectPos, bodyPos, orientation, friendlyFire, seconds,
              identifier, collisionType):
     pygame.sprite.Sprite.__init__(self)
     Physical.__init__(self,
                       bodyPos,
                       orientation,
                       velocity=70,
                       mass=10,
                       elasticity=0.9,
                       shape={"circle": 10},
                       maxVel=200,
                       collisionType=collisionType)
     self.identifier = identifier
     imgPath = os.path.dirname(os.path.dirname(
         os.path.realpath(__file__))) + "/images/arrow.png"
     self.image = pygame.image.load(imgPath)
     self.rect = self.image.get_rect()
     self.rect.center = rectPos
     self.lastPos = bodyPos
     self.distTraveled = 0
     self.friendlyFire = friendlyFire
     self.seconds = seconds
     #self.rotate(orientation)
     self.applyImpulse()
Exemple #4
0
 def __init__(self, x, y):
     Physical.__init__(self, x, y, 0)
     return
Exemple #5
0
# app.add_url_rule('/questionaire/preboarding/',
#                  view_func=Qpreboarding.as_view('questionnaire-preboarding'),
#                  methods=["GET", "POST"])
# app.add_url_rule('/questionaire/onboarding/',
#                  view_func=Qonboarding.as_view('questionnaire-onboarding'),
#                  methods=["GET", "POST"])
# app.add_url_rule('/questionaire/24hfood/',
#                  view_func=Q24hfood.as_view('questionnaire-24hfood'),
#                  methods=["GET", "POST"])
# app.add_url_rule('/input/insidetracker/',
#                  view_func=QInsideTracker.as_view('input-insidetracker'),
#                  methods=["GET", "POST"])

# Physical Measurements Views
app.add_url_rule('/physical/',
                 view_func=Physical.as_view('physical'),
                 methods=["GET", "POST"])
app.add_url_rule('/activity/',
                 view_func=Activity.as_view('activity'),
                 methods=["GET", "POST"])
app.add_url_rule('/nutrition/',
                 view_func=Nutrition.as_view('nutrition'),
                 methods=["GET", "POST"])

# app.add_url_rule('/coach/physical/',
#                  view_func=coachPhysical.as_view('coach-physical'),
#                  methods=["GET", "POST"])
# app.add_url_rule('/client/physical/',
#                  view_func=clientPhysical.as_view('client-physical'),
#                  methods=["GET", "POST"])
# app.add_url_rule('/gformPhysical/',
Exemple #6
0
	def __init__( self, x, y ):
		Point2D.__init__( self, x, y )
		Physical.__init__( self )
		Drawable.__init__( self )
Exemple #7
0
 def move(self, x, y):
     Physical.move(self, x, y)
     return
Exemple #8
0
 def __init__(self, x, y, r):
     Physical.__init__(self, x, y, r)
     return
Exemple #9
0
 def move(self, x, y):
     Physical.move(self, x, y)
     for circle in self.circles:
         circle.move(x, y)
     return
Exemple #10
0
# app.add_url_rule('/questionaire/preboarding/',
#                  view_func=Qpreboarding.as_view('questionnaire-preboarding'),
#                  methods=["GET", "POST"])
# app.add_url_rule('/questionaire/onboarding/',
#                  view_func=Qonboarding.as_view('questionnaire-onboarding'),
#                  methods=["GET", "POST"])
# app.add_url_rule('/questionaire/24hfood/',
#                  view_func=Q24hfood.as_view('questionnaire-24hfood'),
#                  methods=["GET", "POST"])
# app.add_url_rule('/input/insidetracker/',
#                  view_func=QInsideTracker.as_view('input-insidetracker'),
#                  methods=["GET", "POST"])

# Physical Measurements Views
app.add_url_rule('/physical/',
                 view_func=Physical.as_view('physical'),
                 methods=["GET", "POST"])
app.add_url_rule('/activity/',
                 view_func=Activity.as_view('activity'),
                 methods=["GET", "POST"])
app.add_url_rule('/nutrition/',
                 view_func=Nutrition.as_view('nutrition'),
                 methods=["GET", "POST"])


# app.add_url_rule('/coach/physical/',
#                  view_func=coachPhysical.as_view('coach-physical'),
#                  methods=["GET", "POST"])
# app.add_url_rule('/client/physical/',
#                  view_func=clientPhysical.as_view('client-physical'),
#                  methods=["GET", "POST"])