RocksConfiguration.py 751B

1234567891011121314151617181920212223242526
  1. from synergine.synergy.collection.Configuration import Configuration
  2. from socialintengine.synergy.object.Rock import Rock
  3. from synergine.metas import metas
  4. from socialintengine.cst import IMPENETRABLE
  5. from synergine.synergy.Simulation import Simulation
  6. class RocksConfiguration(Configuration):
  7. def get_start_objects(self):
  8. rocks = []
  9. for i in range(20):
  10. rock = Rock()
  11. metas.list.add(Simulation.STATE, rock.get_id(), IMPENETRABLE)
  12. rock.add_trace((0, 10+i, 15))
  13. rocks.append(rock)
  14. for i in range(20):
  15. rock = Rock()
  16. rock.add_trace((0, 10+i, 25))
  17. metas.list.add(Simulation.STATE, rock.get_id(), IMPENETRABLE)
  18. rocks.append(rock)
  19. return rocks