public void Initialize(OnPointerEvent.Model model, DecentralandEntity entity) { this.model = model; this.entity = entity; if (eventHandler == null) { eventHandler = new OnPointerEventHandler(); } eventHandler?.SetColliders(entity); CollidersManager.i.AddOrUpdateEntityCollider(entity, collider); }
public override void Initialize(IParcelScene scene, DecentralandEntity entity) { base.Initialize(scene, entity); if (model == null) { model = new OnPointerEvent.Model(); } pointerEventHandler = new OnPointerEventHandler(); SetEventColliders(entity); entity.OnShapeUpdated -= SetEventColliders; entity.OnShapeUpdated += SetEventColliders; }