Mercurial > fife-parpg
comparison demos/shooter/scripts/weapons.py @ 473:b78020d31186
Small update to ensure python doesn't try to delete objects that FIFE owns.
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Tue, 20 Apr 2010 20:36:58 +0000 |
parents | 3164715a0621 |
children | afde89c1d50b |
comparison
equal
deleted
inserted
replaced
472:3164715a0621 | 473:b78020d31186 |
---|---|
43 self._damage = 1 | 43 self._damage = 1 |
44 | 44 |
45 def create(self, location): | 45 def create(self, location): |
46 self._instance = self._layer.createInstance(self._obj, location.getExactLayerCoordinates(), "bullet") | 46 self._instance = self._layer.createInstance(self._obj, location.getExactLayerCoordinates(), "bullet") |
47 fife.InstanceVisual.create(self._instance) | 47 fife.InstanceVisual.create(self._instance) |
48 self._instance.thisown = 0 | |
48 | 49 |
49 def run(self, velocity, location): | 50 def run(self, velocity, location): |
50 if not self._running: | 51 if not self._running: |
51 self._velocity = velocity | 52 self._velocity = velocity |
52 self._velocity.x /= self._xscale | 53 self._velocity.x /= self._xscale |