RocksConfiguration.py 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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(50):
  10. rock = Rock()
  11. metas.list.add(Simulation.STATE, rock.get_id(), IMPENETRABLE)
  12. rock.set_position((0, 0+i, 0))
  13. rocks.append(rock)
  14. for i in range(50):
  15. rock = Rock()
  16. metas.list.add(Simulation.STATE, rock.get_id(), IMPENETRABLE)
  17. rock.set_position((0, 0+i, 50))
  18. rocks.append(rock)
  19. for i in range(50):
  20. rock = Rock()
  21. rock.set_position((0, 0, 0+i))
  22. metas.list.add(Simulation.STATE, rock.get_id(), IMPENETRABLE)
  23. rocks.append(rock)
  24. for i in range(50):
  25. rock = Rock()
  26. rock.set_position((0, 50, 0+i))
  27. metas.list.add(Simulation.STATE, rock.get_id(), IMPENETRABLE)
  28. rocks.append(rock)
  29. rock = Rock()
  30. rock.set_position((0, 50, 50))
  31. metas.list.add(Simulation.STATE, rock.get_id(), IMPENETRABLE)
  32. rocks.append(rock)
  33. return rocks