示例#1
0
        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);
        }
示例#2
0
        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;
        }