comparison nagslang/game_object.py @ 429:46ecb2c4cb61

Special relativistic gravities again.
author davidsharpe@185.4.16.172.in-addr.arpa
date Sat, 07 Sep 2013 13:39:10 +0200
parents 3ee839f227ad
children d087dfb10896
comparison
equal deleted inserted replaced
428:6bbb0ac87acc 429:46ecb2c4cb61
661 # low, they shouldn't impact gameplay 661 # low, they shouldn't impact gameplay
662 self.apply_effect(furniture) 662 self.apply_effect(furniture)
663 663
664 def apply_effect(self, object_to_move): 664 def apply_effect(self, object_to_move):
665 movement = self.physicser.position - object_to_move.physicser.position 665 movement = self.physicser.position - object_to_move.physicser.position
666 force = self.force * (1 - (self._radius / movement.length)) 666 local_force = self.force * (1 - (self._radius / movement.length))
667 movement.length = force 667 movement.length = local_force
668 object_to_move.environmental_movement(-movement) 668 object_to_move.environmental_movement(-movement)
669 669
670 @classmethod 670 @classmethod
671 def requires(cls): 671 def requires(cls):
672 return [("name", "string"), ("position", "coordinates"), 672 return [("name", "string"), ("position", "coordinates"),