public override void Setup(ParcelScene scene, DecentralandEntity entity, UUIDComponent.Model model) { this.entity = entity; this.scene = scene; if (model == null) { this.model = new OnPointerEvent.Model(); } else { this.model = (OnPointerEvent.Model)model; } Initialize(); entity.OnShapeUpdated -= OnComponentUpdated; entity.OnShapeUpdated += OnComponentUpdated; }
// HACK: (Zak) will be removed when we separate each // uuid component as a different class id public UUIDComponent EntityUUIDComponentUpdate(DecentralandEntity entity, string type, UUIDComponent.Model model) { if (entity == null) { Debug.LogError($"Can't update the {type} uuid component of a nonexistent entity!", this); return(null); } if (!entity.uuidComponents.ContainsKey(type)) { Debug.LogError($"Entity {entity.entityId} doesn't have a {type} uuid component to update!", this); return(null); } UUIDComponent targetComponent = entity.uuidComponents[type]; targetComponent.Setup(this, entity, model); return(targetComponent); }