|
@@ -218,7 +218,7 @@ class EditLayer(cocos.layer.Layer):
|
218
|
218
|
# TODO: Hardcoded here, should be obtained from level properties or calc
|
219
|
219
|
# from available actors or current actors in worldview
|
220
|
220
|
gsize = 32 * 1.25
|
221
|
|
- self.collman = collision_model.CollisionManagerGrid(
|
|
221
|
+ self.collision_manager = collision_model.CollisionManagerGrid(
|
222
|
222
|
-gsize,
|
223
|
223
|
self.wwidth + gsize,
|
224
|
224
|
-gsize,
|
|
@@ -429,7 +429,7 @@ class EditLayer(cocos.layer.Layer):
|
429
|
429
|
del self.selection[actor]
|
430
|
430
|
|
431
|
431
|
def end_drag_selection(self, wx, wy, modify_selection):
|
432
|
|
- new_selection = self.collman.objs_into_box(*self.elastic_box_wminmax)
|
|
432
|
+ new_selection = self.collision_manager.objs_into_box(*self.elastic_box_wminmax)
|
433
|
433
|
if not modify_selection:
|
434
|
434
|
# new_selected becomes the current selected
|
435
|
435
|
self.selection.clear()
|
|
@@ -512,7 +512,7 @@ class EditLayer(cocos.layer.Layer):
|
512
|
512
|
self.drag_moving = False
|
513
|
513
|
|
514
|
514
|
def single_actor_from_mouse(self):
|
515
|
|
- under_mouse = self.collman.objs_touching_point(*self.world_mouse)
|
|
515
|
+ under_mouse = self.collision_manager.objs_touching_point(*self.world_mouse)
|
516
|
516
|
if len(under_mouse) == 0:
|
517
|
517
|
return None
|
518
|
518
|
# return the one with the center most near to mouse, if tie then
|
|
@@ -533,10 +533,10 @@ class EditLayer(cocos.layer.Layer):
|
533
|
533
|
self.selection_in_collman = bool_value
|
534
|
534
|
if bool_value:
|
535
|
535
|
for actor in self.selection:
|
536
|
|
- self.collman.add(actor)
|
|
536
|
+ self.collision_manager.add(actor)
|
537
|
537
|
else:
|
538
|
538
|
for actor in self.selection:
|
539
|
|
- self.collman.remove_tricky(actor)
|
|
539
|
+ self.collision_manager.remove_tricky(actor)
|
540
|
540
|
|
541
|
541
|
def on_mouse_scroll(self, x, y, scroll_x, scroll_y):
|
542
|
542
|
# TODO: check if mouse over scroller viewport?
|